我已经建立了这个模型:
selected.model<-(ES~Area+Elevation+DistSC+I(Elevation^2)+
(Elevation*DistSC)+(Area*Elevation))
我想通过给定的数据点来预测 ES。
Area=0.02, Anear=58.27, Dist=27.1, DistSC=65, Elevation=60
不需要Anear和Dist。
然而,当我尝试使用predict时,会出现错误。有人能帮忙吗?
predict(selected.model, newdata=data.frame(Area=0.02, Elevation=60, DistSC=65))
Error in UseMethod("predict") :
no applicable method for 'predict' applied to an object of class "formula"