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: prvalue and loop rest(grmean)

From   Richard Williams <>
Subject   Re: st: prvalue and loop rest(grmean)
Date   Thu, 03 Nov 2011 10:29:26 -0500

At 03:21 AM 11/3/2011, Tobias Schlager wrote:
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'm guessing you just need to compute and assign the mean values yourself. You don't have a small number of groups, so maybe you can round the numbers and then compute the means, e.g. compute the mean of vars for those whose X values range between 4.51 and 5.49.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

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