Error in model.frame.default: variable lengths differ

后端 未结 3 1354
醉梦人生
醉梦人生 2020-12-01 12:11

On running a gam model using the mgcv package, I encountered a strange error message which I am unable to understand:

“Error in model.frame.default(fo

3条回答
  •  长情又很酷
    2020-12-01 13:03

    Another thing that can cause this error is creating a model with the centering/scaling standardize function from the arm package -- m <- standardize(lm(y ~ x, data = train))

    If you then try predict(m), you get the same error as in this question.

提交回复
热议问题