0

I have fitted an gamlss object and created centile curves from it:

m1_IAT_m<-gamlss(IAT_rel~cs(age),family=BCPE,data=df_m)
centiles.fan(m1_IAT_m,df_m$age,cent=c(1,5,10,25,50,75,90,95), ylab="Power at IAT (W/kg)", xlab="age", ylim = range(0.5,3), colors = "cm")

enter image description here

Now I would like to create a table with reference values for certain percentages:

  • 2.5%, 3%, 5%, 10%, 25%, 50%, 75%, 90%, 95%, 97%, 97.5%

for different age ranges:

  • 14-18 years, 18-30 years, 30-65 years

How can I do this based on the gamlss object? I searched the help package and previous threats on this topic but did not find any information for this specific issue.

jpsmith
  • 11,023
  • 5
  • 15
  • 36
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 21 '23 at 16:02
  • The goal is to get an output table like this: [link](https://ibb.co/cgDDPWL) based on the `gamlss` object – FieJanis Feb 22 '23 at 12:30

1 Answers1

0

I found the solution for this: Define the values on the x-axis in my case every year between 14 and 65 age_range <- seq(14, 65, 1)

Define the centiles you want centile_percentage <- c(2.5, 5, 10, 25, 50, 75, 90, 95, 97.5)

Create a df with the predefined centiles: centiles_IAT_m <- centiles.pred(m1_IAT_m,xname = "age",xvalues = age_range, cent = centile_percentage,plot = TRUE)