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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Graphing quadratic relationship |

Date |
Tue, 22 Sep 2009 12:02:50 +0100 |

Ronan's prejudices usually match mine, but I think what he's warning about does not bite in this case. It's true that a quadratic model is in general dangerous because the squared term will become arbitrarily large for extreme values of the relevant predictor. In practice that may not bite if the squared term is just acting to flatten or add slight curvature within the range of the data, as seems often to be so when income is regressed against age. In this case, the logit link will ensure that even if the squared term is very large within, or beyond, the data range the predicted probability will just go to 0 or 1 as the case may be. In addition, logit or logistic with a quadratic on the RHS is a very interesting model because it is a neat way of fitting a Gaussian shape. This is well known in at least some fields: ecology is one known to me. See e.g. Jongman, R.H.G., ter Braak, C.J.F. and van Tongeren, O.F.R. (eds) 1995. Data analysis in community and landscape ecology. Cambridge University Press. Thus it is common that probability of occurrence of some species can be modelled as increasing to and then decreasing from a maximum along environmental gradients, e.g. rather too wet -- just right -- rather too dry; rather too hot etc. Farmers, gardeners and observant tourists know this too! This may be too well known to deserve emphasis, but equally there may be others who like me were surprised to come across this neat idea. Conversely, I'd be interested in non-ecological examples or references. Nick n.j.cox@durham.ac.uk Ronan Conroy I would be wary of quadratic terms, which tend to produce nonsense estimates at the extremes of the data, or to extrapolate to nonsense estimates beyond the observed range. Have you tried fractional polynomials? On 18 MFómh 2009, at 18:35, Stephanie L Kent wrote: > I would like to graph a relationship between a quadratic independent > variable and my dependent variable to see how y varies acccording to > x and > x^2. It's a logistic regression so my DV is 0-1 and I need to show > how > both the 0's and 1's vary according to x and x^2. Any advice on how > to get > started is much appreciated! * * 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/

**Follow-Ups**:**Re: st: Graphing quadratic relationship***From:*Austin Nichols <austinnichols@gmail.com>

**References**:**st: Graphing quadratic relationship***From:*Stephanie L Kent <s.l.kent59@csuohio.edu>

**Re: st: Graphing quadratic relationship***From:*Ronan Conroy <rconroy@rcsi.ie>

- Prev by Date:
**AW: st: AW: why is this graph all over the place?** - Next by Date:
**st: Using the metan command for continuous data with regression coefficient estimates** - Previous by thread:
**RE: st: Graphing quadratic relationship** - Next by thread:
**Re: st: Graphing quadratic relationship** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |