model.diff: Model-based test for treatment efficacy

Description Usage Arguments Details Value Author(s) Examples

View source: R/model.diff.R

Description

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.

Usage

1
2
model.diff(data, outcome, covars, model, cov, coef, type = "logistic",
  output.details = FALSE)

Arguments

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.

Details

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.

Value

Returns a list of results from analysis.

Author(s)

Daniel D Sjoberg [email protected]

Examples

 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"))

ddsjoberg/sjofun documentation built on Oct. 30, 2017, 7:58 a.m.