Bookmark and Share

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


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

Re: st: prvalue and loop rest(grmean)


From   Richard Williams <richardwilliams.ndu@gmail.com>
To   statalist@hsphsun2.harvard.edu, statalist@hsphsun2.harvard.edu
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
WWW:    http://www.nd.edu/~rwilliam

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index