funnel_plot | R Documentation |
This function allows to construct a risk-adjusted funnel plot for comparing survival proportion between instances.
funnel_plot(data, ctime, p0, glmmod, followup, conflev = c(0.95, 0.99))
data |
A
and optionally additional covariates used for risk-adjustment. |
ctime |
Construction time at which the funnel plot should be determined. Maximum possible time used when not specified. |
p0 |
The baseline failure probability at |
glmmod |
A generalized linear regression model as produced by
the function
|
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). |
An object of class "funnelplot" containing:
data
: A data.frame
containing:
instance
:instance number/name;
observed
:observed number of failures at instance;
expected
:expected (risk-adjusted) number of failures at instance;
numtotal
total number of individuals considered at this instance;
p
:(risk-adjusted) proportion of failure at instance;
conflevels
:worse/normal/better performance than expected at specified confidence levels.
call
: the call used to obtain output
plotdata
: data used for plotting confidence intervals
conflev
: specified confidence level(s)
p0
: (Estimated) baseline failure probability
Daniel Gomon
plot.funnelplot
, summary.funnelplot
Other quality control charts:
bernoulli_cusum()
,
bk_cusum()
,
cgr_cusum()
#Determine a risk-adjustment model using a generalized linear model. #Outcome (survival in first 100 days) is regressed on the available covariates: exprfitfunnel <- as.formula("(survtime <= 100) & (censorid == 1)~ age + sex + BMI") surgerydat$instance <- surgerydat$hosp_num glmmodfun <- glm(exprfitfunnel, data = surgerydat, family = binomial(link = "logit")) #Determine the necessary values to produce a funnel plot funnel <- funnel_plot(data = surgerydat, ctime = 3*365, glmmod = glmmodfun, followup = 100) #Produce a funnel plot! plot(funnel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.