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 data.frame for determining a baseline performance metric. Rows should represent subjects and the following named columns should be present:

entrytime:

time of entry into study (numeric);

survtime:

time from entry until event (numeric);

censorid:

censoring indicator (0 = right censored, 1 = observed), (integer).

and optionally additional covariates used for risk-adjustment.

data

A data.frame with data on which the user wants to construct quality control charts. Rows should represent subjects and the following named columns should be present:

entrytime:

time of entry into study (numeric);

survtime:

time from entry until event (numeric);

censorid:

censoring indicator (0 = right censored, 1 = observed), (integer).

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 entrytime + followup for each subject.

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 survtime in data. If left unspecified, the maximum entrytime in baseline_data is taken. (numeric)

alpha

Required maximal type I error (between 0 and 1) of the procedure over the timeframe specified in time. Default is 0.05. (numeric)

maxtheta

Maximum value the maximum likelihood estimate for parameter \theta can take. If detection = "lower", -abs(theta) will be the minimum value the maximum likelihood estimate for parameter \theta can take. Default is log(6), meaning that at most a 6 times increase/decrease in the odds/hazard ratio is expected.

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:

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)

[Package success version 1.0.1 Index]