Analyzing Bounded Proportion Data in R

56 Views Asked by At

I need some advice to understand the following code. We are working with lung data and usually we use LMS technique to calculate the reference curves. In order to calcualte the curves with LMS method from gamlss package we use the following code (forexample)

library(gamlss)
A<-lungFunction

m1 <- gamlss(slf ~ log(height) + pb(log(age)), sigma.fo =~pb(log(age)), nu.fo =~pb(log(age)), family = BCCGo(mu.link = "log"), data=A)

the link for µ needs to be the log.

*It seems that LMS method is not appropriate method when the response variable is a ratio or proportion, So inflated logitSST distributions is proposed instead. In an article, the following code was used to calculate the centile curves for slf which is a proportion (0,1]. I could not understand why ga function and s function were used to define the µ. So any advice regarding that would be highly appreciated. I am also wondering how I can Implement the prediction equation and and the contribution of the splines (Mu,Sigma,nu) varies with age *

library(gamlss.inf)
library(gamlss.add)


 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)
0

There are 0 best solutions below