fe.data.prep: Prepares data for model fitting (fe.prov)

Description Usage Arguments Value References See Also Examples

View source: R/fe.data.prep.R

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

1
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

1
2
3
4
5
6
7
8
9
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

FEprovideR documentation built on July 30, 2019, 5:03 p.m.