Description Usage Arguments Details Value Examples
Performs survival analysis of an outcome variable
1 | ps.survival(data, outcome, covariates = character(), w = NULL)
|
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. |
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.
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.
1 2 3 4 | ## Not run:
ps.survival(myData, "outcome")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.