Description Usage Arguments Value Note Author(s) Examples
This function returns a summary of two group comparison in terms of effect size, lower and upper limits of CI, and p-value. Three classes of "outcome.var" variable can be analyzed using this function: 1) Cox proportional hazards model for survival outcome.var using coxph() 2) T-test for continuous outcome.var using lm() 3) Z-test for binary outcome.var using prop.test().
1 2 3 4 5 |
outcome.var |
a vector specifying the outcome variable. For 'binary' outcome.var, it should be a vector of 1 or 0. In case of a 'survival' variable, this will be a matrix of two columns: 1) time to event 2) censorship. |
subgroup.var |
a vector of row index specifying the subgroup to be included for the analysis. If NULL (default), all data will be used. |
treatment.var |
the name of the treatment variable. |
placebo.code |
the name of the control group within the treatment variable. |
active.code |
the name of the treatment/experimental group within the treatment variable. |
outcome.class |
the outcome class of the 'outcome.var' variable. One of the 3 values - "survival", "binary", or "continuous". |
alpha |
the confidence level (CI) for point estimate, i.e. 0.05 (default) for 95 percent CI. |
surv.conf.type |
confidence interval type. See conf.type in survfit. Default is "plain" |
ties |
Default is "efron". To match internal sas results, use "exact". See parameter "ties" in coxph. |
covariate.var |
a vector specifying the covariate variables. This can be added to adjust for in the analysis for survival and continuous outcome.var variable classes. Default is NULL. |
strat.factor.var |
a vector specifying the stratification variables. This can be added for the survival outcome.var variable class. Default is NULL. |
return.fit |
if TRUE, returns a table of summary statistics. Default is FALSE. |
fit.para |
a list of fitting parameters. Currently only |
A named vector of following entries: if binary - Effect.Size (Proportion Difference), Lower, Upper, P, Rsp.Placebo, Rsp.Active, N.Placebo, N.Active, nRsp.Placebo, nRsp.Active; if survival - [Events, N, Median Suvival Time] for each group, Effect.Size (Hazard Ratio), Lower, Upper, Wald P; if continuous - Effect.Size (Mean Difference), Lower, Upper, P.
This function requires "survival" package to call the coxph() function. Two treatment arms are required. Treatment group variable can be forced into a factor. Censorship variable is 1 if an event happened, 0 if censored.
Alexey Pronin pronin.alexey@gene.com, Ning Leng leng.ning@gene.com, and previous team members (see DESCRIPTION)
1 2 | data(input)
SummaryTwoGroups(outcome.var = input$OS, treatment.var = input$Arm, placebo.code = "CTRL", active.code = "TRT", outcome.class = "continuous",surv.conf.type="plain")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.