funnel.SRR: Funnel plot for SRR (standardized readmission ratios)

Description Usage Arguments Value References See Also Examples

View source: R/funnel.SRR.R

Description

funnel.SRR produces and returns funnel plots for the analysis using discharge-specific and patient-specific inputs with provider ID. Go to Github for a tutorial.

Usage

1
2
funnel.SRR(input.dis, input.prov, target = 1, alphas = c(0.1, 0.05,
  0.01), type = "FE.score", sigma.b = NULL)

Arguments

input.dis

a data.frame consisting of discharge-specific inputs and provider ID

input.prov

a data.frame consisting of provider-specific inputs and provider ID

target

target standardized readmission ratio (SRR)

alphas

numeric vector of alpha levels of interest

type

string of length one containing the type of test performed. Currently options include "score", "exact", "FE.score", "FE.exact", "FERE.score", "FERE.exact"

sigma.b

sigma for random effects. Should only have value other than null if prefix "FERE." specified in type= argument

Value

Returns a ggplot object. Unless stored in a new object, will be printed automatically.

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, test.fe.prov, confint.fe.prov, ggplot2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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             # significance level
score.fe <- test.fe.prov(hospital_prepared, fe.ls, Y.char,
                         Z.char, prov.char, test="score", null, alpha)

# format input data for funnel plot
input.dis <- data.frame(ID=hospital_prepared[hospital_prepared$included==1, prov.char],
                        prob=fe.ls$Exp)
input.prov <- data.frame(SRR=fe.ls$df.prov$SRR, flag=score.fe$flag)

# render funnel plot
target <- c(1)
alphas = c(0.1, 0.05, 0.01)
funnel.SRR(input.dis, input.prov, target, alphas, type="FE.score")

umich-biostatistics/FEprovideR documentation built on Aug. 2, 2019, 4:20 a.m.