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: Problems with Margins command


From   Amy Hsin <[email protected]>
To   [email protected]
Subject   st: Problems with Margins command
Date   Mon, 2 Jul 2012 08:47:06 +0200

Hi,

I am having difficulty trying to generate predicted values from growth
models.  I'd like to calculate the predicted values for asians and
non-asians at each time point with all other covariates evaluated at
the sample mean.

Below are the two simplified models that I am estimating:

Model 1: where time (wave) is measured discretely.

xtmixed gpach i.wave##(i.asian i.female c.psescomk8)
	if gpachmiss!=1 || id: wave , cov(unstructured) variance emiterate(250) mle;
margins wave#asian;

Model 2: where time (wave) is measured as a continuous variable

xtmixed gpach c.wave##(i.asian i.female c.psescomk8)
	if gpachmiss!=1 || id: wave , cov(unstructured) variance emiterate(250) mle;	
margins, over(asian wave);


In both cases, I am having difficulty with the margin command.  For
the discrete case, the margin command generates predicted values that
seem implausible. For the continuous case, the predicted values when
plotted do not generate a linear relationship.

I have tried various different combinations of the the command without
success. I feels as if I am missing something fundamental. Any advice
would be greatly appreciated.

Amy
*
*   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/


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