Learn R Programming

gamlss (version 4.2-4)

lms: A function to fit LMS curves for centile estimation

Description

This function is design to help the user to construct centile estimation. It is only applicable when only "one" explanatory variable is available (usually age).

Usage

lms(y, x, families = LMS, data = NULL, k = 2, 
        cent = 100 * pnorm((-4:4) * 2/3), 
        calibration = TRUE, legend = FALSE, 
        mu.df = NULL, sigma.df = NULL, nu.df = NULL, 
        tau.df = NULL, method.pb = c("ML", "GAIC"), ...)

Arguments

y
The response variable
x
The unique explanatory variable
families
a list of gamlss.families with default LMS=c("BCCGo", "BCPEo", "BCTo")
data
the data frame
k
the penanlty to be used in the GAIC
cent
a vector with elements the % centile values for which the centile curves have to be evaluated
calibration
whether calibration is required with default TRUE
legend
whether a legend is required in the plot with default FALSE
mu.df
mu effective degrees of freedon if required otherwise are estimated
sigma.df
sigma effective degrees of freedon if required otherwise are estimated
nu.df
nu effective degrees of freedon if required otherwise are estimated
tau.df
tau effective degrees of freedon if required otherwise are estimated
method.pb
the method used in the pb() for estimating the smoothing parameters. The default is local maximum likelihood "ML". "GAIC" is also permited where k is taken from the k argument of the func
...
extra argument which can be passed to gamlss

Value

  • It returns a gamlss fitted object

Details

This function should be used if only one explanatory variable is available. The function starts by fitting a normal error distribution and a smooth function for mu. Then it proceeds by fitting several "appropriate" distributions for the response variable. The set of gamlss.family distributions to fit is specified by the argument families. The default families arguments is LMS=c("BCCGo", "BCPEo", "BCTo") that is the LMS class of distributions, Cole and Green (1992). Note that this class is only appropriate when y is positive (with no zeros). If the response variable contains negative values and zeros then use the argument families=theSHASH where theSHASH <- c("NO", "SHASHo") or add any other list of distributions which you may think is appropriate. Justification of using the specific centile (0.38 2.27 9.1211220 25.25, 50, 74.75, 90.88, 97.72, 99.62) is given in Cole (1994).

References

Cole, T. J. (1994) Do growth chart centiles need a face lift? BMJ, 308--641.

Cole, T. J. and Green, P. J. (1992) Smoothing reference centile curves: the LMS method and penalized likelihood, Statist. Med. 11, 1305--1319

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.

See Also

gamlss, centiles, calibration

Examples

Run this code
data(abdom)
m1 <- lms(y,x , data=abdom, n.cyc=30)
m2 <- lms(y,x ,data=abdom, method.pb="GAIC", k=log(610))

Run the code above in your browser using DataLab