fe.data.prep {FEprovideR}R Documentation

Prepares data for model fitting (fe.prov)

Description

fe.data.prep prepares the data for model fitting with fe.prov by taking the data with missing values imputed. Go to Github for a tutorial.

Usage

fe.data.prep(data, Y.char, Z.char, prov.char, cutoff = 10)

Arguments

data

a data.frame including response, provider ID, and covariates, with missing values imputed

Y.char

name of the response variable from data as a character string

Z.char

names of covariates from data as vector of character strings

prov.char

name of provider IDs variable as a character string

cutoff

cutoff of provider size as an interger, default value is 10

Value

data.frame: a data frame sorted by provider IDs with additional variables 'included', 'no.readm', 'all.readm' and missing values imputed.

References

He, K., Kalbfleisch, J.D., Li, Y. and Li, Y., 2013. Evaluating hospital readmission rates in dialysis facilities; adjusting for hospital effects. Lifetime data analysis, 19(4), pp.490-512.

See Also

fe.prov, test.fe.prov, funnel.SRR, confint.fe.prov

Examples

data(hospital) # build in data set
# Name input variables and other parameters
cutoff <- 10              # an integer as cutoff of facility (or provider) size with 10 as default
alpha <- 0.05             # significance level
Y.char <- 'Y'
prov.char <- 'prov.ID'
Z.char <- paste0('z', 1:3)

hospital_prepared <- fe.data.prep(hospital, Y.char, Z.char, prov.char, cutoff) # data preparation


[Package FEprovideR version 1.1 Index]