Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: boxcox and test


From   David Airey <[email protected]>
To   [email protected]
Subject   st: boxcox and test
Date   Fri, 4 Aug 2006 15:09:09 -0500

If I do a simple linear model with two factors and an interaction, I can test the terms for the interaction using "test".

When I do the same thing after a boxcox model, I cannot do the same test using "test". Anyone understand why?

. xi: regress la i.gf*i.gd
i.gf _Igf_0-2 (naturally coded; _Igf_0 omitted)
i.gd _Igd_0-2 (naturally coded; _Igd_0 omitted)
i.gf*i.gd _IgfXgd_#_# (coded as above)

Source | SS df MS Number of obs = 599
-------------+------------------------------ F( 8, 590) = 5.10
Model | 56.1889027 8 7.02361283 Prob > F = 0.0000
Residual | 811.983485 590 1.37624319 R-squared = 0.0647
-------------+------------------------------ Adj R-squared = 0.0520
Total | 868.172387 598 1.45179329 Root MSE = 1.1731

------------------------------------------------------------------------ ------
la | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------- +----------------------------------------------------------------
_Igf_1 | -.2585714 .2684938 -0.96 0.336 -. 7858914 .2687485
_Igf_2 | .1110119 .2789682 0.40 0.691 -. 4368797 .6589035
_Igd_1 | .4551786 .2575938 1.77 0.078 -. 0507339 .9610911
_Igd_2 | 1.160559 .3301336 3.52 0.000 . 5121789 1.808939
_IgfXgd_1_1 | .1260119 .3122241 0.40 0.687 -.4871941 . 7392178
_IgfXgd_1_2 | -.7744614 .3856281 -2.01 0.045 -1.531832 -. 0170906
_IgfXgd_2_1 | -.5876191 .3386546 -1.74 0.083 -1.252734 . 0774962
_IgfXgd_2_2 | -1.562642 .4148084 -3.77 0.000 -2.377323 -. 7479615
_cons | 1.178571 .2217015 5.32 0.000 . 7431513 1.613992
------------------------------------------------------------------------ ------

. test _IgfXgd_1_1 _IgfXgd_1_2 _IgfXgd_2_1 _IgfXgd_2_2

( 1) _IgfXgd_1_1 = 0
( 2) _IgfXgd_1_2 = 0
( 3) _IgfXgd_2_1 = 0
( 4) _IgfXgd_2_2 = 0

F( 4, 590) = 4.77
Prob > F = 0.0009

. xi: boxcox la i.gf*i.gd, model(lhsonly) lrtest nolog
i.gf _Igf_0-2 (naturally coded; _Igf_0 omitted)
i.gd _Igd_0-2 (naturally coded; _Igd_0 omitted)
i.gf*i.gd _IgfXgd_#_# (coded as above)
Fitting comparison model

Fitting full model

Fitting comparison models for LR tests

Iteration 0: log likelihood = -941.52802
Iteration 1: log likelihood = -729.28071
Iteration 2: log likelihood = -712.61307
Iteration 3: log likelihood = -712.61277
Iteration 4: log likelihood = -712.61277

Iteration 0: log likelihood = -941.13797
Iteration 1: log likelihood = -728.93451
Iteration 2: log likelihood = -712.11616
Iteration 3: log likelihood = -712.10848
Iteration 4: log likelihood = -712.10848

Iteration 0: log likelihood = -942.63844
Iteration 1: log likelihood = -729.92924
Iteration 2: log likelihood = -712.52812
Iteration 3: log likelihood = -712.51975
Iteration 4: log likelihood = -712.51975

Iteration 0: log likelihood = -947.26615
Iteration 1: log likelihood = -734.06093
Iteration 2: log likelihood = -716.36727
Iteration 3: log likelihood = -716.36482
Iteration 4: log likelihood = -716.36482

Iteration 0: log likelihood = -941.14027
Iteration 1: log likelihood = -728.82513
Iteration 2: log likelihood = -712.0049
Iteration 3: log likelihood = -712.00324
Iteration 4: log likelihood = -712.00324

Iteration 0: log likelihood = -943.09805
Iteration 1: log likelihood = -730.50236
Iteration 2: log likelihood = -713.29541
Iteration 3: log likelihood = -713.29536

Iteration 0: log likelihood = -942.58206
Iteration 1: log likelihood = -730.14825
Iteration 2: log likelihood = -713.22914
Iteration 3: log likelihood = -713.21722
Iteration 4: log likelihood = -713.21722

Iteration 0: log likelihood = -948.17624
Iteration 1: log likelihood = -736.09204
Iteration 2: log likelihood = -719.30185
Iteration 3: log likelihood = -719.30096
Iteration 4: log likelihood = -719.30096

Number of obs = 599
LR chi2(8) = 32.15
Log likelihood = -711.88092 Prob > chi2 = 0.000
------------------------------------------------------------------------ ------
la | Coef. Std. Err. z P>|z| [95% Conf. Interval]
------------- +----------------------------------------------------------------
/theta | .0766468 .0412206 1.86 0.063 -. 004144 .1574377
------------------------------------------------------------------------ ------
Estimates of scale-variant parameters
-------------------------------------------------------------
| Coef. chi2(df) P>chi2(df) df of chi2
-------------+-----------------------------------------------
Notrans |
_Igf_1 | -.2285903 1.464 0.226 1
_Igf_2 | .1323904 0.455 0.500 1
_Igd_1 | .2050526 1.278 0.258 1
_Igd_2 | .6985838 8.968 0.003 1
_IgfXgd_1_1 | .1086209 0.245 0.621 1
_IgfXgd_1_2 | -.456846 2.829 0.093 1
_IgfXgd_2_1 | -.389851 2.673 0.102 1
_IgfXgd_2_2 | -1.130939 14.840 0.000 1
_cons | -.0550481
-------------+-----------------------------------------------
/sigma | .8250483
-------------------------------------------------------------

---------------------------------------------------------
Test Restricted LR statistic P-Value
H0: log likelihood chi2 Prob > chi2
---------------------------------------------------------
theta = -1 -1057.5776 691.39 0.000
theta = 0 -713.61738 3.47 0.062
theta = 1 -941.05759 458.35 0.000
---------------------------------------------------------

. test _IgfXgd_1_1 _IgfXgd_1_2 _IgfXgd_2_1 _IgfXgd_2_2

( 1) [Notrans]_IgfXgd_1_1 = 0
( 2) [Notrans]_IgfXgd_1_2 = 0
( 3) [Notrans]_IgfXgd_2_1 = 0
( 4) [Notrans]_IgfXgd_2_2 = 0
Constraint 1 dropped
Constraint 2 dropped
Constraint 3 dropped
Constraint 4 dropped

F( 0, 3) = .
Prob > F = .


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index