Manuel Jesús López Rodríguez
2009-Nov-25 08:31 UTC
[R] multiple regression model representation
Dear all, I have a problem when trying to fit a model to a dataset. The model I am fitting is: y~var1*var2*var3*var4*var5, with var3 and var4 having many 0´s. When I construct the model and I simplify it, it remains a model with 8 explicative variables (or interaction of them) and the intercept, but when I try to plot the model, R gives me the following error: Error in plot.new() : trying to draw in a null device Furthermore: missing warning message Not plotting observations with leverage one: 62, 78 What I do is the following: model1=lm(Error ~ Ciottoli *Ghiaia *Limo *Massi *Sabbia, data=datos) summary(model1) model1=lm(y ~ var1 *var2 *var3 *var4 *var5, data=mydata) summary(model1) model.error=step(model1) summary(model.error) model2=update(model.error,~.-var2:var5) summary(model2) model3=update(model2,~.-var1:var5) summary(model3) model4=update(model3,~.-var1:var2) summary(model4) model5=update(model4,~.-var5) summary(model5) model6=update(model5,~.-var4) summary(model6) model7=update(model6,~.-var2) summary(model7) model8=update(model7,~.-var1) summary(model8) plot(model8) I would be very please if you could throw light on this. Thank you very much in advance! Best wishes! Manuel [[alternative HTML version deleted]]