parseMinimalData: Parse input data to fitBabyMonitor

Description Usage Arguments

View source: R/parseMinimalData.r

Description

Parse input data to fitBabyMonitor

Usage

1
2
3
parseMinimalData(minimal_data, num_cat, num_cont, subset = FALSE,
  outcome_na = "set0", subset_na = "category", cat_na = "category",
  cont_na = "median", n_cutoff = 5)

Arguments

minimal_data

Data_frame with a particular format:

1st column: Outcome vector (0-1 encoding)

2nd column: Institution ID

3rd column: Subset (if subset == TRUE):

Next: num_cat columns of categorical variables (num_cat can equal 0)

Next: num_cont columns of continuous variables (num_cont can equal 0)

num_cat

integer. Number of categorical risk adjusters.

num_cont

integer. Number of continious risk adjusters.

subset

logical; if TRUE perform analysis with a subset variable ( and minimal_data must have subset data in the 3rd column)

outcome_na

Method for handling any NA values in the outcome vec. 'remove' removes rows with NA outcomes while 'set0' keeps the row and sets the outcome to 0.

subset_na

Method for handling any NA subset values. 'remove' removes rows with NA subset values while 'category' makes a new subset category (coded as 99) for NA values.

cat_na

Method for handling any NA values in the categorical risk adjusters. 'remove' removes rows with NA values while 'category' makes a new category (coded as 99) for NA catorical risk adjusters.

cont_na

Method for handling any NA values in the continous risk adjusters. 'remove' removes rows with NA values while 'median' replaces NA with the median value of the risk adjuster.


dhelkey/dghrank documentation built on April 21, 2020, 9:11 a.m.