如题,在回归之后想要用来预测未来12个月的值,但是发生此故障
Warning message:
'newdata' had 12 rows but variables found have 312 rows
这是我的代码:
ss=as.factor(rep(1:12,n/12))
n=length(x)
tt=1:n
st=lm(log(y11)~ss+tt)
newdata=data.frame(seq(1,12,1))
pre=predict(st,newdata,interval="predict")
以及,这个newdata我一直搞不太清楚要怎么设置,求大神帮忙看看。