GAMLSS using family BCT

Dear All,
I am new to R GAMLSS. I am trying to model weight gain during pregnancy (idweightdiffvisit) with the covariates week (0-40), BMI, mothersage, ethnicity using BCT. The outcome variable (weight difference) contains values from -15 to 40kg.

m1 <- gamlss(idiffweightatvisit~pb(gestationwk)+pb(mother_age) +pb(bmi)+ethnicity_cat , sigma.fo=~pb(gestationwk)+pb(mother_age) +pb(bmi)+ethnicity_cat, nu.fo=~pb(gestationwk)+pb(mother_age) +pb(bmi)+ethnicity_cat,tau.fo =~ pb(gestationwk)+pb(mother_age) +pb(bmi)+ethnicity_cat, family=BCT, data=data)

But when I run I get the message:
Error in gamlss(idiffweightatvisit ~ pb(gestationwk) + pb(mother_age) + : response variable out of range
Please let me know where I am going wrong. When I include only positive values for outcome variable weight difference (0-40kg) it runs ok.
Many thanks,
Primaal

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.