Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: prvalue and loop rest(grmean)

 From Tobias Schlager To statalist@hsphsun2.harvard.edu Subject Re: st: prvalue and loop rest(grmean) Date Thu, 3 Nov 2011 09:21:35 +0100

```Dear Richard

Sorry, for too briefly explaining my problem. I think that I am running
into two problems in doing my analysis.

First, I would like to use the conditional mean depending on all possible
values that I have for x. However, grmean does not work at all, probably
because I have 3 values that are run through the equation (x, x^2, x^3).
All of them should be varied to account for the cubic effect. Probably
that is why grmean is not working...
So, what I try to do is vary the means of all other variables, depending
on the value of x, as otherwise unrealistic combinations would be the
result. (for instance some of the variables are always high or always low,
depending on the value of x).
Second part of the problem appears to be that I might have values that are
between 4 and 5 for instance. However, from what I know, grmean is only
the group mean, and can only be assigned to full numbers like 4 or 5. The
result is that a lot of cases are left out in the analysis.

I hope this made the problem a little bit clearer, thanks a lot for your