ps.survival: Outcome Survival Model

Description Usage Arguments Details Value Examples

Description

Performs survival analysis of an outcome variable

Usage

1
ps.survival(data, outcome, covariates = character(), w = NULL)

Arguments

data

Data frame, containing the dataset to be analyzed. The data frame must contain a treatment indicator variable called 'treat' and propensity score values called 'ps_values'.

outcome

String, containing the outcome variable name to be analyzed. The variable must be a Surv object

covariates

Vector, containing the set of covariate variable names to include in the model

w

Vector, containing the subject weights. Defaults to equal weighting. If analysis of matched data is desired, set this value to myData$is_matched.

Details

This function uses the survival package to do basic survival analysis for an outcome variable. The outcome variable should be previously computed as a survival object (see ps.compute.survival). The analysis will automatically perform survival::survfit and survival::coxph.

Value

Object, containing fitted model values. In addition to standard glm/lm output, the treatment effect is appended to the model object as model$treatment.effect. For dichotomous outcome variables, this is the odds ratio with confidence interval.

Examples

1
2
3
4
## Not run: 
ps.survival(myData, "outcome")

## End(Not run)

OHDSI/Centaur documentation built on May 7, 2019, 8:22 p.m.