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 |
Y.char |
name of the response variable from |
Z.char |
names of covariates from |
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