test.fe.prov: Hypothesis tests for fe.prov model object

Description Usage Arguments Value References See Also Examples

View source: R/test.fe.prov.R

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

1
2
test.fe.prov(data, fe.ls, Y.char, Z.char, prov.char, test = "score",
  null = "median", alpha = 0.05, n = 10000)

Arguments

data

prepared data.frame. Use fe.data.prep

fe.ls

fitted model object (fit using fe.prov)

Y.char

Y.char name of the response variable from data as a character string

Z.char

Z.char names of covariates from data as vector of character strings

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 test="score"

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:

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

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