Re: [R] predict from a multiple regression model

2008-01-22 Thread Chuck Cleland
On 1/22/2008 9:50 AM, Fränzi Korner wrote: > Hello > > > > how can I predict from a lm-object over a range of values of one explanatory > variable without having to specify values for all the other explanatory > variables? > > > > e.g. > > > > mod<-lm(y~x1+x2+x3+x4) > > > > x1.new

[R] predict from a multiple regression model

2008-01-22 Thread Fränzi Korner
Hello how can I predict from a lm-object over a range of values of one explanatory variable without having to specify values for all the other explanatory variables? e.g. mod<-lm(y~x1+x2+x3+x4) x1.new<-seq(0, 100) predict(mod, new=list(x1=x1.new)) Here, predict() does not