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 work, since values for x2, x3 and x4 are missing.
Is there a function or argument that, in such a case, averages or weights
over the other explanatory variables, how it is done in Genstat? 

 

Thanks

Fränzi

 

 

************************************************************************

Dr. Fränzi Korner-Nievergelt

oikostat - Statistische Analysen und Beratung

Ausserdorf 43

CH - 6218 Ettiswil

Tel.: +41 (0) 41 980 49 22

www.oikostat.ch



*************************************************************************



Schweizerische Vogelwarte

CH - 6204 Sempach



www.vogelwarte.ch

*************************************************************************




	[[alternative HTML version deleted]]

