Learn R Programming

rspiro (version 0.4)

getLMS: Calculate L,M,S of GLI-2012

Description

This function calculates the L,M,S splines using GLI-2012 equations. The output of this function is used in calculating the LLN and predicted spirometry parameters. Checking of the input is also performed here.

Usage

getLMS(age, height, gender = 1, ethnicity = 1, param = "FEV1")

Value

A data.frame with L, M and S, for every patient and every parameter requested

Arguments

age

Age in years

height

Height in meters

gender

Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1.

ethnicity

Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1.

param

A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC", "FEF2575", "FEF75", "FEV075", "FEV075FVC"

Details

This is for internal use only.

Arguments age, height, gender and ethnicity are vectors of equal length, or of length one, in which case the value is recycled; if the four vectors are not of equal length, the function stops with an error.