funnelplot {cgrcusum}R Documentation

Risk-adjusted funnel plot

Description

This function can be used to construct a risk-adjusted funnel plot.

Usage

funnelplot(data, ctime, p0, glmmod, followup, conflev = c(0.95, 0.99))

Arguments

data

data.frame containing the following named columns:

  • entrytime numeric - time of entry into study,

  • survtime numeric - time from entry until event,

  • censorid integer - (optional) censoring indicator (0 = right censored, 1 = observed),

  • instance integer or character - indicating which instance (f.e. hospital) the observation belongs to

and optionally additional covariates used for risk-adjustment.

ctime

construction time at which the funnel plot should be determined. Constructed over whole data when not specified

p0

The baseline failure probability at entrytime + followup for individuals. If not specified, average failure proportion over whole data is used instead.

glmmod

a generalized linear regression model as produced by the function glm(). Standard practice:
glm(as.formula(paste("(survtime <= followup) & (censorid == 1)~" ,paste(covariates, collapse='+'))), data = data).
Alternatively, a list with:

  • $formula (~ covariates)

  • $coefficients (named vector specifying risk adjustment coefficients for covariates - names must be the same as in $formula and colnames of data).

followup

The followup time for every individual. At what time after subject entry do we consider the outcome?

conflev

A vector of confidence levels of interest. Default is c(0.95, 0.99).

Value

An object of class "funnelplot" containing:

There are plot and summary methods for "funnelplot" objects.

Author(s)

Daniel Gomon

See Also

plot.funnelplot, summary.funnelplot

Other qcchart: bercusum(), bkcusum(), cgrcusum()

Examples

varsanalysis <- c("age", "sex", "BMI")
exprfitfunnel <- as.formula(paste("(entrytime <= 365) & (censorid == 1)~",
 paste(varsanalysis, collapse='+')))
surgerydat$instance <- surgerydat$Hosp_num
glmmodfun <- glm(exprfitfunnel, data = surgerydat, family = binomial(link = "logit"))
funnel <- funnelplot(data = surgerydat, ctime = 3*365, glmmod = glmmodfun, followup = 100)
plot(funnel)

[Package cgrcusum version 0.1.0 Index]