Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Gordon Hughes <G.A.Hughes@ed.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: xtmixed model |

Date |
Sun, 27 Feb 2011 11:18:23 +0000 |

Gordon Hughes g.a.hughes@ed.ac.uk

------------------------------ Date: Sat, 26 Feb 2011 19:30:30 +0000 From: "Grove-White, Dai" <D.H.Grove-White@liverpool.ac.uk> Subject: st: xtmixed model Dear listI am relatively new to multi level modelling so please excuse thequery if silly! I am running a mixed effects linear model on aweight loss study. Due to the large range of horses and smallnumber (n=12 horses and weight range is 200 - 600kg) I am modellingthe weight loss as a proportion of the weight at the start of thestudy transformed as arcsin(square_root wt_proportion)the model is . xtmixed transprop_wt week c.week#c.week ||id: week, var Performing EM optimization: Performing gradient-based optimization: Iteration 0: log restricted-likelihood = 366.38495 Iteration 1: log restricted-likelihood = 366.38495 Computing standard errors: Mixed-effects REML regression Number of obs = 192 Group variable: id Number of groups = 12Obs per group: min= 16avg= 16.0max= 16Waldchi2(2) = 273.25Log restricted-likelihood = 366.38495 Prob > chi2 = 0.0000-------------------------------------------------------------------------------transprop_wt | Coef. Std. Err. z P>|z| [95% Conf. Interval]--------------+----------------------------------------------------------------week| -.0307454 .0020573 -14.94 0.000 -.0347776 -.0267131| c.week#|c.week| .001064 .0001071 9.94 0.000 .0008541 .0012739|_cons| 1.58295 .0137351 115.25 0.000 1.556029 1.60987--------------------------------------------------------------------------------------------------------------------------------------------------------------Random-effects Parameters | Estimate Std. Err. [95%Conf. Interval]------------------------------+------------------------------------------------id: Independent |var(week)| 8.70e-06 4.62e-06 3.07e-06 .0000246var(_cons)| .0016897 .0007985 .0006692 .0042662------------------------------+------------------------------------------------var(Residual)| .0007861 .0000862 .0006341 .0009746-------------------------------------------------------------------------------LR test vs. linear regression: chi2(2) = 184.98 Prob > chi2 = 0.0000 Note: LR test is conservative and provided only for reference. .where week is week of study - I have put in week squared since itimproves model fit as judged by LR test. When I plot out fittedvalues the starting value ie for week 1 is different for differenthorses. This does not seem logical since the proportional weight ofall horses at the start should be the same (= 1.0) by definition asshould the transformed prop_weight. In fact it seems that maybe Ishould not have a random intercept at all ie just have a randomslope model. Is that correct and if so what would the code be for amodel with random slope only. Would it bextmixed transprop_wt week c.week#c.week ||week:, var Performing EM optimization: Performing gradient-based optimization: Iteration 0: log restricted-likelihood = 273.52452 Iteration 1: log restricted-likelihood = 273.89258 Iteration 2: log restricted-likelihood = 273.89262 Iteration 3: log restricted-likelihood = 273.89262 Computing standard errors: Mixed-effects REML regression Number of obs = 192 Group variable: week Number of groups = 16Obs per group: min= 12avg= 12.0max= 12Waldchi2(2) = 258.25Log restricted-likelihood = 273.89262 Prob > chi2 = 0.0000-------------------------------------------------------------------------------transprop_wt | Coef. Std. Err. z P>|z| [95% Conf. Interval]--------------+----------------------------------------------------------------week| -.0307454 .0035542 -8.65 0.000 -.0377115 -.0237792| c.week#|c.week| .001064 .0002032 5.24 0.000 .0006656 .0014624|_cons| 1.58295 .0131277 120.58 0.000 1.55722 1.608679--------------------------------------------------------------------------------------------------------------------------------------------------------------Random-effects Parameters | Estimate Std. Err. [95%Conf. Interval]------------------------------+------------------------------------------------week: Identity |var(_cons)| 8.86e-26 8.60e-25 4.84e-34 1.62e-17------------------------------+------------------------------------------------var(Residual)| .0028315 .0002913 .0023145 .0034641-------------------------------------------------------------------------------LR test vs. linear regression: chibar2(01) = 3.4e-13 Prob >= chibar2 = 1.0000 Many thanks Dai Dai Grove-White BVSc MSc DBR PhD DipECBHM FRCVS Head of Division Livestock Health & Welfare School of Veterinary Science Leahurst Campus University of Liverpool Chester High Road Neston Wirral CH64 7TE Telephone 077 87 567 431 *

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: very small sample comarsion** - Next by Date:
**st: Mlogit: Log pseudolikelihood bug?** - Previous by thread:
**st: xtmixed model** - Next by thread:
**st: SSC Archive** - Index(es):