Displaying 1 result from an estimated 1 matches for "preddat".
Did you mean:
preddata
2013 Mar 21
1
[mgcv][gam] Odd error: Error in PredictMat(object$smooth[[k]], data) : , `by' variable must be same dimension as smooth arguments
...if (varstochange[i] == "CEC.imp"){j=14}
if (varstochange[i] == "soc.imp"){j=15}
if (varstochange[i] == "sand.imp"){j=16}
if (varstochange[i] == "clay.imp"){j=17}
if (varstochange[i] == "abslat.imp"){j=18}
preddat[j] = val[i]
}
predict.gam(MI,newdata=preddat,se.fit=TRUE)
}
I then make predictions that look like this:
a = makepred(c("phi.imp","bcph.imp","year"),c(4.5,7.25,1))
b = makepred(c("phi.imp","bcph.imp","year"),c(5.5,7.25...