Statalist


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

Re: st: Plot after regression using linear splines - any way to add confidence intervals?


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Plot after regression using linear splines - any way to add confidence intervals?
Date   Thu, 16 Jul 2009 15:23:17 +0000 (GMT)


--- On Thu, 16/7/09, Nils Braakmann wrote:

> I am currently estimating more-way fixed effects
> regressions using Thomas Cornelissens 
> felsdvreg-command (Cornelißen, T. > [2008]: The
> stata module felsdvreg to estimate a linear model with two
> high-dimensional fixed effects, The Stata Journal, 8(2),
> pp. 170-189.) using linear splines in x. After estimation 
> I want to graph the relationship between the outcome and x 
> (which is not the problem) and add confidence intervals
> that reflect the fact that not all of the estimates
> parameters are significant (similar to -lpoly y x, ci-).
> Unfortunately, I can't get the last part to work.

*-------------------- begin example -------------------
use http://www.stata-press.com/data/r10/nlswork, clear
xtset idcode year
mkspline agespl 20 = age, dis
xtreg ln_wage agespl*, fe cluster(idcode)

predict yhat
predict se, stdp
gen lb = yhat - 1.96*se
gen ub = yhat + 1.96*se
twoway rarea lb ub age, sort || ///
       line yhat age, sort
*------------------- end example ----------------------

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------




      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index