Yi
2010-Jul-27 00:59 UTC
[R] How to generate variance of a new observation based on a linear regression model
Hi, folks, x=1:10 y=rep(2:6,2) lin=lm(y~x) x=3:12 new=predict(lin,se.fit=T) #se.fit: the standard error of the predicted means, namely, the square root of Var( E[y|x] | x) # How can I generate the variances of the new observations? Namely the square root of var(y|x), ## Which I think should be much larger than the values from se.fit=T. The reason why I need to know the estimations of expectation and also variance is that Y=ln(Z) and I need to know the expectation of Z. Thanks Yi [[alternative HTML version deleted]]
Possibly Parallel Threads
- Variance of the prediction in the linear regression model (Theory and programming)
- Verify the linear regression model used in R ( fundamental theory)
- How to predict the mean and variance of the dependent variable after regression
- Estimate of variance and prediction for multiple linear regression
- count data with a specific range