Bookmark and Share

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]

Re: st: Graph Quadratic Term


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Graph Quadratic Term
Date   Mon, 18 Apr 2011 18:00:50 +0100

I don't know what you mean by "does not plot correctly" and in any
case you give very little code.

-predict- is a command, not a function.

This example may help

sysuse auto
gen headroomsq = headroom^2
logit foreign headroom headroomsq
predict predict, pr
scatter foreign headroom || mspline predict headroom

A quadratic on the logit scale naturally translates to a bell-shape on
the original scale.

Nick

On Mon, Apr 18, 2011 at 5:36 PM, Dennis Kramer <[email protected]> wrote:

> I am having trouble graphing the quadratic relationship between my
> outcome dependent and independent variable. I am currently modeling a
> -logit- function with my outcome being 0/1 for passing a standardized
> test. When I run my --logit-- with the sq term in the model I get a
> significant quadratic function; however, when I use the -- predict, pr
> -- function to plot for predictions the quadratic function does not
> plot correctly... could you provide some insight.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index