Description Usage Arguments Details Value Author(s) Examples
The model-based sinlge-arm comparison addresses the fundamental question of whether the current treatment provides a clinically significant improvement over prior treatments in the population. The proposed test statistic computes the difference between the observed outcome from the current treatment and the covariate-specific predicted outcome based on a model of the historical data. Thus, the difference between the observed and predicted quantities is attributed to the current treatment.
1 2 3 4 5 6 7 8 9 10 |
data |
a data frame containing the outcome and the outcome predictions. |
outcome |
the outcome, or response variable name. Must be a variable contained within the data frame specified in data=. |
covars |
vector of covariate/predictor variable(s) names. Must be a variable(s) contained within the data frame specified in data=. If model includes an intercept, user must include the column of ones in the covars vector |
model |
glm object of the predictive model estimated on historical cohort. If specified, the outcome, covars, cov, and coef objects will be extracted from object. |
cov |
Variance-covaraince matrix of the beta coefficients from predictive model. |
coef |
Vector of the beta coefficients from predictive model. If model includes an intercept, a vector of ones must appear in data. |
type |
Type of predictive model used. logistic is currently the only valid input. |
output.details |
Save additional information. Default is FALSE. |
Heller, Glenn, Michael W. Kattan, and Howard I. Scher. "Improving the decision to pursue a phase 3 clinical trial by adjusting for patient-specific factors in evaluating phase 2 treatment efficacy data." Medical Decision Making 27.4 (2007): 380-386.
Returns a list of results from analysis.
Daniel D Sjoberg sjobergd@mskcc.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(23432)
#simulating historic dataset and creating prediction model.
marker=rnorm(500, sd = 2)
respond=runif(500)<plogis(marker)
historic.data=data.frame(respond,marker)
model.fit=glm(data=historic.data, formula = respond ~ marker, family = binomial(logit))
#simulating new data, with higher response rate
new.data = marker=rnorm(50, sd = 2)
respond=runif(50)<plogis(marker + 1)
new.data=data.frame(respond,marker)
#comparing outcomes in new data to those predicted in historic data
# z-statistic = 2.412611 indicates signficant difference
model_diff(data = new.data, model = model.fit)
#comparing model based difference with binomial test
#p-value of 0.3222 indicates we fail to reject null hypothesis
binom.test(x=sum(new.data$respond), n=nrow(new.data), p = 0.5, alternative = c("two.sided"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.