Bookmark and Share

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

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

Re: st: generating predicted values for growth models

From   Maarten Buis <>
Subject   Re: st: generating predicted values for growth models
Date   Fri, 29 Jun 2012 16:23:31 +0200

One thing you did wrong is that you used the -xi:- prefix and the
-margins- post-estimation command. -margins- needs to know about the
interactions you created, and -xi:- will does not leave that
information behind. So you need to use the factor variable notation
instead, see -help fvvarlist-. Translating your command would be:

 xtmixed gpach i.wave##(i.race i.female c.psescomk8) <other stuff>

-- Maarten

On Fri, Jun 29, 2012 at 4:03 PM, Amy Hsin wrote:
> Hi,
> I am trying to generate predicted values from linear growth curves and
> am running into problems. The predicted values that I am generating
> using models that adjusts for a variety of covariates are the same as
> the observed values, which does not make sense. Is there something
> that I am obviously doing wrong?
> Here is a simplified version of my model.
> xi: xtmixed gpach i.wave*race i.wave*female i.wave*psescomk8 if
> gpachmiss!=1 || id: wave , cov(unstructured) variance emiterate(250)
> mle;
> margins, over(race wave);
> -gpach are test scores evaluated at time 0, 1, 2 and 3
> -race and female are both dichotomous variables
> -psescomk8 a time invariant continuous covariate
> In this model, I'd like to measure time nonparametrically so I am
> including it as a series of dummy variables.
> When I use the "margins" command to estimate predicted test scores for
> each racial category at each point in time, I get values that are
> identical to the observed values.
> Any ideas as to what I am doing wrong?
> Thank you in advance.
> Amy Hsin
> *
> *   For searches and help try:
> *
> *
> *

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

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