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]

st: combined linear and quadratic trend in marginsplot


From   Lloyd Dumont <lloyddumont@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: combined linear and quadratic trend in marginsplot
Date   Fri, 30 Sep 2011 06:06:17 -0700 (PDT)

Hello, everyone.  I am trying to do something very simple with �rgins-, but I�stumbling� 
I am running a logit that includes a linear trend (starts at 0 and goes up to 5), a quadratic trend (starts at 0 and goes up to 25, obviously), and a bunch of other variables, some of which are continuous, some of which are binary, some factor variables, some two-way interactions, etc.
 
But, at least initially, I just want to generate a –marginsplot- that holds all the variables at their sample means EXCEPT the linear and the quadratic trend.
 
Say the logit looks like…
 
- logit DEPVAR LINTREND QUADTREND {and a bunch of other indep vars}
 
Then,
-margins, at(LINTREND=(0(1)5))
-marginsplot, xlabel(0(1)5)
 
This, of course, generates a straight line.  But, what I really want is the curvilinear function that is captured by the linear and the quadratic term together.
 
How do I do that?
 
And, am I right to assume that all of the other independent variables—are being held at their sample means?  If I wanted to hold one or more at a specific value, how would I do that?
 
Thank you very, very much for your help.  Lloyd Dumont
 
PS~It happens to be complex survey data, but I don't think that makes any difference here.

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