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