0
적합 한 gamlss 모델에서 데이터를 예측하려고하는데 귀찮은 문제가 있습니다. , 내가 다룰 수 없다.r - data (data, source = namelist)의 오류 : 인수가 서로 다른 행 수를 의미 함 : 3, 4 - predict()
Error in data.frame(data, source = namelist) :
arguments imply differing number of rows: 3, 4
코드 & 데이터
library('gamlss')
asfr=c(0.0000000000,0.0001818271,0.0001818271,0.0228344684,0.0228344684)
ages=c(12:16)
data=data.frame(y=asfr,x=ages)
model=gamlss(y~x,data=data,method=mixed(1,20))
test=data.frame(x=c(12,13,14))
predict(model,newdata=test, type = "response")
나는 몇 가지 비슷한 문제를 검색하지만, reshape2과 답변이 작동하지 않았다.
또한, 예를 들어 내가 같은 오류 발생 BEOI 제품군을 피팅하고 gamlss에를 예측하려고 노력했다