Displaying 1 result from an estimated 1 matches for "nh_flag".
Did you mean:
h_flag
2006 Sep 01
1
difference between ns and bs in predict.glm
...ables, varnames, extras,
extranames, :
variable lengths differ (found for 'ns(DY, df = 6)')
In addition: Warning message:
'newdata' had 1 rows but variable(s) found have 6 rows
so for whatever reason this code works
model. <- glm.nb(CNT ~ WKDY + bs(DY,df=6) + H_FLAG + NH_FLAG + Trend)
predict(model,newdata=data[i,1:10],type="response",se=TRUE)
but this code does not work
model. <- glm.nb(CNT ~ WKDY + ns(DY,df=6) + H_FLAG + NH_FLAG + Trend)
predict(model,newdata=data[i,1:10],type="response",se=TRUE)
the two are identical aside from bs vs ns. I l...