test.fe.prov {FEprovideR} | R Documentation |
Hypothesis tests for fe.prov model object
Description
test.fe.prov
Conducts hypothesis tests for model parameter estimates.
First fit a fe.prov
model object. Go to
Github for a tutorial.
Usage
test.fe.prov(data, fe.ls, Y.char, Z.char, prov.char, test = "score",
null = "median", alpha = 0.05, n = 10000)
Arguments
data |
prepared |
fe.ls |
fitted model object (fit using |
Y.char |
Y.char name of the response variable from |
Z.char |
Z.char names of covariates from |
prov.char |
name of provider IDs variable as a character string |
test |
string denoting hypothesis test to be conducted. Currently, options
include "exact.binom", "exact.poisbinom", "exact.bootstrap", "score". The default
is |
null |
use median for null comparison |
alpha |
alpha level for the CIs |
n |
number of bootstrap draws |
Value
Returns a data.frame
of the results of the test for each provider
with attributes:
flag: Either "1" for p<alpha/2, "0" p<=1-alpha/2 and p<alpha/2, or "-1" for neither
p: p-value for the hypothesis test of the model parameter
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.data.prep
, fe.prov
,
funnel.SRR
, confint.fe.prov
Examples
# Name input variables and other parameters
# a small positive number specifying stopping
# criterion of Newton-Raphson algorithm
tol <- 1e-5
Y.char <- 'Y'
prov.char <- 'prov.ID'
Z.char <- paste0('z', 1:3)
data(hospital_prepared) # build in data set
fe.ls <- fe.prov(hospital_prepared, Y.char, Z.char, prov.char, tol) # model fitting
# Hypothesis tests
null = "median"
alpha = 0.05
score.fe <- test.fe.prov(hospital_prepared, fe.ls, Y.char, Z.char,
prov.char, test="score", null, alpha)