2017-03-31 81 views
-3

我在6000訓練樣本(glm)上訓練了我的模型 然後,我嘗試預測有200000行的向量, 但結果我只收到6000行。在GLM後預測R

我用這些參數的函數預測():

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

感謝

+3

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

所以newdatA相反,你可能需要提供更多細節,例如您的代碼。現在我可以猜到,你沒有在'predict()'函數中指定'newdata ='參數。如果你沒有定義'newdata',它會做一個樣本預測。 – TooYoung

+0

發佈你使用的實際命令真的會讓你更有意義。 – Dason

+2

'newdata ='不'newdate =' – Ouistiti

回答