Error in cs function of GAMLSS framework: variable lengths differ

The following is an official example of the use of the 'cs' function in GAMLSS framework(http://127.0.0.1:11212/library/gamlss/html/cs.html):

# cubic splines example
data(aids)
# fitting a smoothing cubic spline with 7 degrees of freedom
# plus the a quarterly  effect  
aids1<-gamlss(y~cs(x,df=7)+qrt,data=aids,family=PO) # 

But it gives such an error message:

variable lengths differ (found for 'cs(aids$x, df = 7)')

Please help me. Thank you all

This topic was automatically closed 42 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.