Re: [R] Error in predict.lm() for models without intercept?

2014-09-17 Thread peter dalgaard
On 17 Sep 2014, at 05:58 , isabe...@ghement.ca wrote: > > The example is based on a real data set (please keep it > confidential), which is attached to this e-mail as mod.data.csv. "Don't worry, it will stay between you two and the Internet" (Actually, the list software seems to ha

Re: [R] Error in predict.lm() for models without intercept?

2014-09-17 Thread Rolf Turner
What's going on is very simple. I apologize for not getting my thoughts organized from the start. Confidence bands for mu_y (the expected value of y) will have straight line edges if and only if there is a *single predictor* in the model. If there are two or more predictors the edges will

Re: [R] Error in predict.lm() for models without intercept?

2014-09-16 Thread isabella
Hi Rolf, BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; } Thanks very much for your response. You are right - my simulated example works as intended, so it can't be used to get to the bottom of this problem (if it is a problem at all). Here is

Re: [R] Error in predict.lm() for models without intercept?

2014-09-16 Thread Rolf Turner
When I run your code (in the single predictor case) I get exactly what I would expect. In particular the standard errors are indeed proportional to the (absolute) value of x, and the standard error is indeed 0 at x = 0. The proportionality constant is exactly what it should be, explicitly s/

[R] Error in predict.lm() for models without intercept?

2014-09-16 Thread isabella
Hi everyone, It appears my R code didn't come through the first time (thanks for letting me know, Ista). Here is my message again: Could there be an error in the predict() function in R for models without intercepts which include one or more predictors? When using the predict() function to