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.

# AW: AW: st: prgen option quadratic term

 From "Meulemann Max" To "statalist@hsphsun2.harvard.edu" Subject AW: AW: st: prgen option quadratic term Date Wed, 7 Nov 2012 11:29:34 +0000

```I had hoped that was taken care of by the margins command

ologit y capitagdp c.capitagdp#c.capitagdp i.socioecovars
margins, at(c_capitagdp=(0.5(0.5)9))  atmeans predict(outcome(4))
marginsplot

which looked the same as

ologit y c_logcapitagdp c_logcapitagdpsquared \$socioecovars
oprobpr c_logcapitagdp, levels(c_logcapitagdpsquared=c_logcapitagdp^2) cat(4) newobs(100)

In the linear model that graph is downward slooping and in the quadratic model it is downward slooping and then turning up

________________________________________
Von: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu]&quot; im Auftrag von &quot;Nick Cox [njcoxstata@gmail.com]
Gesendet: Mittwoch, 7. November 2012 11:42
An: statalist@hsphsun2.harvard.edu
Betreff: Re: AW: st: prgen option quadratic term

When you are fitting a linear term and a quadratic term, the two act
together. It's their combined effect that you need to interpret. This
is usually easier with a graph. For example, one negative coefficient
and one positive coefficient mean a turning point somewhere, but not
necessarily within the range of the data.

Nick

On Wed, Nov 7, 2012 at 10:35 AM, Meulemann  Max <mmeulemann@ethz.ch> wrote:
> thx, the margins and marginsplot function helped a lot.
>
> Anyways anybody got a idea how I am to interpret my data here: I find a negativ linear term for capitagdp, but if i include a quadratic gdp term, that one turns out to be positiv and significant with a lrtest.
> Plotting with marginsplot tells me then that for the linear model the probability to agree with a certain issue decreases whereas it increases with capitagdp for the quadratic model, keeping fixed my other covariates
> ________________________________________
> Von: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu]&quot; im Auftrag von &quot;Maarten Buis [maartenlbuis@gmail.com]
> Gesendet: Dienstag, 6. November 2012 17:10
> An: statalist@hsphsun2.harvard.edu
> Betreff: Re: AW: st: prgen option quadratic term
>
>
> -- Maarten
>
> On Tue, Nov 6, 2012 at 4:26 PM, Richard Goldstein
> <richgold@ix.netcom.com> wrote:
>> I am not familiar with prgen
>>
>> sounds like you want the -margins- command?
>>
>> On 11/6/12 10:24 AM, Meulemann Max wrote:
>>> I d like to get the predicted probabilites as my contionus predicator changes keeping fixed the other ones as it is done in -prgen- only with a quadratic term of that predicator. I do not just want the predicted probabilites.
>>>
>>> ________________________________________
>>> Von: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu]&quot; im Auftrag von &quot;Richard Goldstein [richgold@ix.netcom.com]
>>> Gesendet: Dienstag, 6. November 2012 16:10
>>> An: statalist@hsphsun2.harvard.edu
>>> Betreff: Re: st: prgen option quadratic term
>>>
>>> I don't understand; why don't you start by telling us what is wrong with
>>> -h ologit-, then click on "also see" and click on "ologit postestimation"
>>>
>>> Rich
>>>
>>> On 11/6/12 10:07 AM, Meulemann Max wrote:
>>>> I would like to calculate predicted probabilities in an ordinal model, ologit or oprobit. I am using a continous quadratic term, which makes calculating the predicted probablities more cumbesome. I am using stata 12
>>>>
>>>> I found an old entry in the statalist archive that  proposed oprobpr which does work. I was wondering if another package has been written since 2005.
>>>>
>>>> oprobpr does work, but some of it its features are a bit irritating like how it saves the predicted probailites in another dataset and so on. The nicest way would be to change prgen and its familiar option in a way that the same feature that works for oprobpr would work for prgen.
>>>>
>>>> the level options allows oproppr to vary an otherwise fixed covariate with a squared term, which is not possible for the x option of prgen.
>>>>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```