need some advice to fix an error from GAMLSS/GAMLSS.inf package in R

181 views Asked by At

I was wondering how I can fix the errors for the following code (GAMLSS package): Thanks for the help in advance.

library(gamlss)
library(gamlss.inf)
library(gamlss.add)
data(lungFunction)

A<-lungFunction
gen.Family("SST", "logit")
mf1 <- gamlssInf0to1(y=slf,
                     mu.formula = ~ ga(~s(log(height), log(age))),
                     sigma.formula = ~pb(log(age)),
                     nu.formula = ~pb(log(age)),
                     tau.formula = ~pb(log(age)),
                     xi1.formula = ~pb(log(age))+ pb(log(height)),
                     family = logitSST,
                     data = A,
                     n.cyc = 100,
                     trace = TRUE)

Error in as.data.frame.default(x[[i]], optional = TRUE) : 
  cannot coerce class ‘"function"’ to a data.frame

And the error from the following code

    b4 <- gamlss(slf~ga(~s(log(height), log(age))), dat=A, family=BI)

Error in while (abs(G.dev.old - G.dev) > c.crit && iter < n.cyc) { : 
  missing value where TRUE/FALSE needed
0

There are 0 answers