Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | David Bai <db555@mail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: interpretation of squared term |
Date | Fri, 27 Aug 2010 12:32:28 -0400 |
-----Original Message----- From: Maarten buis <maartenbuis@yahoo.co.uk> To: statalist@hsphsun2.harvard.edu Sent: Fri, Aug 27, 2010 3:48 am Subject: Re: st: interpretation of squared term --- On Thu, 26/8/10, David Bai wrote:
> I have a question regarding how to interpret squared > term:
--- On Thu, 26/8/10, Maarten buis wrote:
You can only interpret the time trend graphically. If you want to have a non-linear trend where you can interpret the coeficients, you can look at a linear spline, see -help mkspline-.
Here are some examples on how to implement these recomendations in Stata. Here is how you can graph the quadratic effect of age: *------------------ begin example ----------------- webuse lbw, clear gen age2 = age*age xi: logit low age age2 smoke i.race if age < 45 adjust smoke=0 _Irace_2=0 _Irace_3=0, pr by(age) gen(prhat) twoway line prhat age if age < 45, sort *-------------------- end example ------------------ Here is how you can add a linear spline of age to your model (notice that a linear spline is a type of nonlinear curve) *------------------- begin example ----------------- mkspline sp1 21 sp2 = age xi: logit low sp1 sp2 smoke i.race if age < 45, or *-------------------- end example ------------------ the effect of sp1 is the effect of age when one is younger than 21, and the effect of sp2 is the effect of age when one is older than 21. So the odds of getting an underweight baby increases by 3.7% ((1.037-1)*100%) for every year one gets older when one is younger than 21, and it decreases by 5.8% ((.942-1)*100%) for every year one gets older when one is older than 21. Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * 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/ * * 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/