使用lm(formula, data)后得出回归模型,譬如Y=0.3+0.5X

现想自变量的值代入回归方程中,譬如X=3,希望输出Y的预测值。

请问,应该用哪条命令。

小弟初学R,对这一简单问题遍查资料仍不得其法,还望大家指点一二。

先谢过!

自己搞定了。。

predict(object,newdata)

How are 'prediction' and 'forecasting' translated in Chinese statistical books?

预测和预报?……我想起天气预报了……