parameter_assist {success} | R Documentation |
Assist users in parameter selection
Description
This function can be used to determine some of the vital parameters used to construct control charts in this package.
Usage
parameter_assist(baseline_data, data, formula, followup, theta = log(2),
time, alpha = 0.05, maxtheta = log(6))
Arguments
baseline_data |
A
and optionally additional covariates used for risk-adjustment. |
data |
A
and optionally additional covariates used for risk-adjustment. |
formula |
A formula with right-hand side (RHS) indicating the form in which the covariates should be used for the Cox and GLM regression models. LHS of the formula will be ignored, and can be left empty. |
followup |
(optional): The value of the follow-up time to be used to determine event time.
Event time will be equal to |
theta |
The value of the expected log-hazard/odds ratio. In other words: the logarithm of the expected increase in the odds/hazard ratio. Default is log(2) (detecting a doubling of the odds/failure rate). |
time |
Timeframe over which the type I error of the control chart should be
limited. Should be in the same unit as |
alpha |
Required maximal type I error (between 0 and 1) of the procedure
over the timeframe specified in |
maxtheta |
Maximum value the maximum likelihood estimate for
parameter |
Details
Depending on the specified arguments, the function will return
parameters. If covariate_names
is not specified, the returned
risk-adjustment models will be trivial. If formula
is not specified
but covariate_names
are,
the function assumes the simplest form for the regression model
(cov1 + cov2 + ...). If followup
is not specified, no glmmod
will be determined
Value
A list of parameters to feed to quality control charts in this package:
call: The call used to obtain output.
data: The data used in the call to the function.
baseline_data: The baseline_data used in the call to the function
glmmod: A
glm()
model which can be fed to thefunnel_plot()
andbernoulli_cusum()
functions.coxphmod: A
coxph()
model which can be fed to thecgr_cusum()
andcgr_cusum()
functions.theta: Expected increase in the odds/hazard ratio.
psi: Estimated Poisson arrival rate in
data
.time: Time frame over which to restrict type I error.
alpha: Desired level of type I error for control limit determination.
maxtheta: Maximum expected increase/decrease in the odds/hazard ratio.
Author(s)
Daniel Gomon
Examples
require(survival)
#Minimal example - no risk-adjustment
pars_min <- parameter_assist(baseline_data = surgerydat,
data = subset(surgerydat, unit == 1))
#Specifying all parameters
pars <- parameter_assist(baseline_data = surgerydat,
data = subset(surgerydat, unit == 1),
formula = formula("survtime ~ age + sex + BMI"), followup = 100)