Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: combined linear and quadratic trend in marginsplot
From
Lloyd Dumont <[email protected]>
To
"[email protected]" <[email protected]>
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/