首页 文章

GLM后预测R [关闭]

提问于
浏览
-3

我训练了我的模型6000训练样本(glm)然后,我尝试预测200000行的矢量,但结果我只收到了6000行 .

我将这些参数用于函数predict():

predict(                       
object = model_ppp2,
newdate = Model_education, 
type = c("link", "response", "terms"),
se.fit = TRUE, 
dispersion = NULL, 
terms = NULL,
na.action = na.pass
)

谢谢

1 回答

  • 1

    代码应该是

    predict(                       
     object = model_ppp2,
     newdata = Model_education, 
     type = c("link", "response", "terms"),
     se.fit = TRUE, 
     dispersion = NULL, 
     terms = NULL,
     na.action = na.pass
    )
    

    所以 newdatA 而不是 newdatE

相关问题