This is my code

    BSUPred<-(forecast(BSU,h=h)[[2]])
    PressurePred<-(forecast(Pressure,h=h)[[2]])
    Placer<-(rep(1,h))
    test<-as.data.frame(cbind(BSUPred,PressurePred))
    test$Placer<-rep(1:2,h/12)
    test$Placer<-i
    test<-as.data.frame((test[c("Placer","BSUPred","PressurePred")]))
    resp<-predict(fit,newdata=test,type="response")
    Pred<-ifelse((predict(fit,newdata=test,type="response")>0.5),1,0)

But I get this error message

Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = 
object$xlevels) : 
  variable lengths differ (found for 'Placer') 

Can anyone help?

Thanks

Tjun Kiat
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to