Error in splineDesign(Aknots, x, ord) :length of 'derivs' is larger than length of 'x'

system.time({
  for(i in seq(data)){
    sub<-data[[i]]
    suppressWarnings({
      cb<-crossbasis(sub$atemp,lag=lag,argvar = argvar,arglag = arglag)
    })
    mfirst<-glm(bron~cb+ns(time,7*14)+dow + season + ns(arh,3),family = quasipoisson(),sub)
    suppressWarnings({
      crall<-crossreduce(cb,mfirst)
    })
    suppressWarnings({
      crhot<-crossreduce(cb,mfirst,type="var",value = 30.88)
    })
    suppressWarnings({
      crcold<-crossreduce(cb,mfirst,type = "var",value = -1)
    })
    yall[i,]<-coef(crall)
    Sall[[i]]<-vcov(crall)
    yhot[i,]<-coef(crhot)
    Shot[[i]]<-vcov(crhot)
    ycold[i,]<-coef(crcold)
    Scold[[i]]<-vcov(crcold)
    qaic[i]<-fqaic(mfirst)
  }
})

When I run this set of R , I get a “length of 'derivs' is larger than length of 'x'” error, and I have never understood what went wrong. thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.