Skip to contents

[Stable]

Extracts covariate information from a Pmetrics data objects.

Usage

getCov(mdata)

Arguments

mdata

A PM_data or PMmatrix object

Value

A list with named items: ncov, covnames, covstart, covend.

Details

When given a PM_data or PMmatrix object, will return a list with the number of covariates, their names, and the starting and ending column numbers

Author

Michael Neely

Examples

library(PmetricsData)
getCov(dataEx)
#> $ncov
#> [1] 5
#> 
#> $covnames
#> [1] "wt"     "africa" "age"    "gender" "height"
#> 
#> $covstart
#> [1] 15
#> 
#> $covend
#> [1] 19
#>