R language Access Menu

Title Text Both  

Growth charts

Percentile charts used for growth curves etc can be plotted using VGAM package and following commands:

Code:

    > bwdf = mybwdf(F)

    > library(VGAM)
    > fit <- vgam(bwt ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bwdf, trace = FALSE)
    > qtplot(fit, percentiles = c(5,50,90,99), main = "Percentiles")

Output graph:

                    

Similarly , gamlss package can also be used; 

Code:

    > bwdf = mybwdf(F)

    > library(gamlss)        
    > lms(bwt, age, data=bwdf, n.cyc=30)

Output graph:

                   
References:

Thomas W. Yee (2010). The VGAM Package for Categorical Data Analysis. Journal of Statistical Software, 32(10), 1-34. URL http://www.jstatsoft.org/v32/i10/.
 


    Comments & Feedback