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
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>: