rcurve-fittingpercentilegamlss

Selecting Percentile curves using gamlss::lms in R


I am using example code from gamlss package to draw percentile curves:

library(gamlss) 
data(abdom)
lms(y,x , data=abdom, n.cyc=30)

enter image description here

It is drawing its own set of percentile curves. How can I choose to draw only 10th, 50th and 90th percentile curves? Also I want to avoid plotting of points so that only curves are drawn. Thanks for your help.


Solution

  • It's always a good idea to read the help pages:

    > centiles(h,xvar=abdom$x, cent=c(10,50,90), points=FALSE)
    % of cases below  10 centile is  8.688525 
    % of cases below  50 centile is  50.16393 
    % of cases below  90 centile is  90 
    

    enter image description here