I need to compute percentile curves using the LMS method (from the GAMLSS package/models) with Age and Height as predictors. What is the best way to determine which equation (with which transformation and type of spline) is the most appropriate? I attempted to consider various models before comparing GAIC to select the best one. However, it takes a long time to consider various scenarios regarding whether either sigma, nu,tau should be constant or not. or the type of transformation that should be used. So any suggestions for finding the best model would be greatly appreciated.
library(tidyverse)
df=read.csv("https://raw.githubusercontent.com/kinokoberuji/R-Tutorials/master/LMSmodelGAMLSS.csv", sep=";")%>%as_tibble()
m1 <- gamlss(TLC ~ Height + pb(Age), sigma.fo =~pb(Age), nu.fo =~pb(Age), family = BCCGo(mu.link = "log"), data=df)
m2 <- gamlss(TLC ~ Height + pb(log(Age)), sigma.fo =~pb(log(Age)), nu.fo =~pb(log(Age)), family = BCCGo(mu.link = "log"), data=df)
m3 <- gamlss(TLC ~ log(Height) + pb(Age), sigma.fo =~pb(Age), nu.fo =~pb(Age), family = BCCGo(mu.link = "log"), data=df)
m1.1 <- gamlss(TLC ~ Height + pb(Age), sigma.fo =~pb(Age), nu.fo =~1, family = BCCGo(mu.link = "log"), data=df)
m2.1 <- gamlss(TLC ~ Height + pb(log(Age)), sigma.fo =~pb(log(Age)), nu.fo =~1, family = BCCGo(mu.link = "log"), data=df)
m3.1 <- gamlss(TLC ~ log(Height) + pb(Age), sigma.fo =~pb(Age), nu.fo =~1, family = BCCGo(mu.link = "log"), data=df)
m1.2 <- gamlss(TLC ~ Height + pb(Age), sigma.fo =~pb(Age), nu.fo =~pb(Age), tau.fo=~(Age), family = BCPE(mu.link = "log"), data=df)
m2.2 <- gamlss(TLC ~ Height + pb(log(Age)), sigma.fo =~pb(log(Age)), nu.fo =~pb(log(Age)), tau.fo=~log(Age), family = BCPE(mu.link = "log"), data=df)
m3.2 <- gamlss(TLC ~ log(Height) + pb(Age), sigma.fo =~pb(Age), nu.fo =~pb(Age), tau.fo=~Age, family = BCPE(mu.link = "log"), data=df)
m1.2 <- gamlss(TLC ~ Height + pb(Age), sigma.fo =~pb(Age), nu.fo =~Age, tau.fo=~Age, family = BCPE(mu.link = "log"), data=df)
m2.2 <- gamlss(TLC ~ Height + pb(log(Age)), sigma.fo =~pb(log(Age)), nu.fo =~log(Age), tau.fo=~log(Age), family = BCPE(mu.link = "log"), data=df)
m3.2 <- gamlss(TLC ~ log(Height) + pb(Age), sigma.fo =~pb(Age), nu.fo =~Age, tau.fo=~Age, family = BCPE(mu.link = "log"), data=df)
etc.
GAIC(m1, m2,m3,m4,........,k=log(length(DAT1.F$y)))