Bookmark and Share

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]

st: plotting 95% trajectory curves


From   Thomas Norris <T.Norris2@lboro.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: plotting 95% trajectory curves
Date   Wed, 23 Jan 2013 12:06:12 +0000

Dear statalisters,

I have ran a cubic polynomial multilevel model (weight is on the log scale) on a prenatal dataset with the command: 

'xtmixed lnweight age age2 age3|| studyid: age age2,cov(unstructured)mle'. Output below:


------------------------------------------------------------------------------
    lnweight |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
         age |    .301346   .0094328    31.95   0.000     .2828581    .3198339
        age2 |  -.0025259   .0003151    -8.02   0.000    -.0031436   -.0019083
        age3 |  -.0000121   3.40e-06    -3.56   0.000    -.0000188   -5.45e-06
       _cons |   .8590841    .090142     9.53   0.000      .682409    1.035759
------------------------------------------------------------------------------

------------------------------------------------------------------------------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
-----------------------------+------------------------------------------
-----------------------------+------
studyid: Unstructured|
                     sd(age) |   .0187369   .0022426      .0148191    .0236905
                    sd(age2) |   .0003173   .0000369      .0002526    .0003985
                   sd(_cons) |   .2331245   .0350259      .1736595    .3129515
              corr(age,age2) |   -.977704    .005079     -.9857472   -.9652014
             corr(age,_cons) |  -.9588043   .0094474     -.9737672   -.9355854
            corr(age2,_cons) |   .9000741   .0237249      .8419113    .9375634
-----------------------------+------------------------------------------
-----------------------------+------
                sd(Residual) |   .0594447   .0008272      .0578452    .0610884

LR test vs. linear regression:       chi2(6) =  3652.95   Prob > chi2 = 0.0000

I have predicted the mean curve for the sample, but would like to plot the 95% curves to visualise the variability in the curves. My random effects covariances are below.

                       age	   age2	               _cons 
				
age	.0003511		           
age2	-5.81e-06	1.01e-07	           
_cons	-.0041881	.0000666	.054347
------------------------------------------------------------------------------	


Would anyone be able to help provide some code to help me fit these 95% curves?

Many thanks,

Tom 


Tom Norris (PhD student)
Centre of Global Health and Human Development
School of Sport, Exercise and Health Sciences
Loughborough University
Loughborough
LE11 3TU



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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index