Standard error of the prediction in multivariable regression

7 views
Skip to first unread message

Adrian Sayers

unread,
Jun 25, 2009, 10:28:04 AM6/25/09
to medstats
Dear all, i think this is probably a simple question but i am having problems.

i want to calculate the standard error of predicted value from a
multivariable regression model.
i.e. se~pred(y|x) = theta_hat(1/n + (( x* - x_bar)^2/ SXX ) )^1/2
and then calculate CI for the fitted values.

currently the basic model is E(Y|X=x) = a +b(xi)

in this case i can manually calculate this and get it to agree with
the automatic post estimation commands in stata which is great.

However when i extend the regression command to include another
continuous co variate
E(Y|X=x) = a +b1(xi)+ b2(zi)

and then predict the standard error of the prediction and plot the 95%
CI around the slope of b1 i get a jagged CI, this is obviously
because of the introduction of the covariate.

However how can i properly partition up the calculation of the
standard error of the prediciton.

currently my general thinking is to limit the calculation of sxx to
the variable of interest, but theta hat is based on the whole model.


any thoughts greatly appreciated.

Adrian

Bruce Weaver

unread,
Jun 25, 2009, 10:53:17 AM6/25/09
to MedStats
Unless you really want to know the formula for working it out, you
could just let the computer do the work for you. To obtain the fitted
value and its standard error for a particular combination of values of
X and Z, centre X and Z on those values, and then run your model using
the centred variables. The constant and its SE are what you're after.

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

Adrian Sayers

unread,
Jun 25, 2009, 11:20:44 AM6/25/09
to MedS...@googlegroups.com
I would love to know the formula if anyone can recall it.

thanks bruce, if all else fails i will run a loop over the centerd values.

Cheers
Adrian


2009/6/25 Bruce Weaver <bwe...@lakeheadu.ca>:

Reply all
Reply to author
Forward
0 new messages