| Title: | Analysis of Interactions |
|---|---|
| Description: | The tools in this package are intended to help researchers assess multiple treatment-covariate interactions with data from a parallel-group randomized controlled clinical trial. The methods implemented in the package were proposed in Kovalchik, Varadhan and Weiss (2013) <doi: 10.1002/sim.5881>. |
| Authors: | Ravi Varadhan [aut, cre], Stephanie Kovalchik [aut], Leon Wang [ctb] |
| Maintainer: | Ravi Varadhan <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.5 |
| Built: | 2026-05-10 06:35:46 UTC |
| Source: | https://github.com/cran/anoint |
Testing procedures and models for investigating the heterogeneity of treatment effect in a clinical trial with multiple baseline covariates.
| Package: | anoint |
| Type: | Package |
| Version: | 1.4 |
| Date: | 2015-7-10 |
| License: | GPL |
Ravi Varadhan <[email protected]> and Stephanie Kovalchik (maintainer) <[email protected]>
Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials. Biometrics 1999; 55(4):1151-1155
Prepares formula and data to be used in methods with the analysis of interactions class.
anoint(formula,data,family="binomial",select=NULL,nfolds=10, type.measure="deviance",keep.vars=NULL,na.action=na.omit,...)anoint(formula,data,family="binomial",select=NULL,nfolds=10, type.measure="deviance",keep.vars=NULL,na.action=na.omit,...)
formula |
analysis of interaction formula for |
data |
data.frame containing the variables of |
family |
character specifying family of |
select |
character for type of selection to perform, either " |
nfolds |
number of folds used in cross-validation to find lasso penalty parameter when |
type.measure |
loss to use for cross-validation. Used only when |
keep.vars |
vector of names of variables to retain if selection procedure is used. Used only when |
na.action |
function, na.action to perform for handling observations with missing variables among variables in formula. Default is |
... |
additional arguments passed to |
To test proportional multiple interactions between treatment variable indicator z (binary, 0 or 1) and variables a, b, with response y of a GLM model, formula must be y~(a+b)*z. If a Cox model with event time time and event indicator event, formula is Surv(time,event)~(a+b)*z.
Factors should not be included as a or b because this could change how the reference group is represented in the model. Separate 0/1 dummy variables must be supplied by the user.
When select is glmnet a Lasso method (cv.glmnet) is used to select prognostic factors using 10-fold cross-validation with the control data only. If select is set to stepAIC a stepwise selection procedure is used with specifications based on arguments passed to ....
Returns instance of anoint class.
Stephanie Kovalchik <[email protected]>
Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials. Biometrics 1999; 55(4):1151-1155
# NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) object <- anoint(Surv(y, event)~(V1+V2)*trt,data=null.interaction,family="coxph") object summary(object) # NO INTERACTION CONDITION, WITH PROGNOSTIC SELECTION null.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = c(1.5,2,0,0), gamma = rep(1,4), mean = rep(0,4), vcov = diag(4), type="binomial", n = 500 ) head(null.interaction) object <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction,select="glmnet") summary(object) # FORCE V1, V2 INTO THE MODEL; INTERCEPT IS ALWAYS THE FIRST TERM OF MODEL object <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction, select="glmnet",keep.vars=c("V1","V2")) summary(object) # SELECTION WITH STEPWISE SELECTION AND AIC CRITERION object <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction, select="stepAIC") summary(object)# NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) object <- anoint(Surv(y, event)~(V1+V2)*trt,data=null.interaction,family="coxph") object summary(object) # NO INTERACTION CONDITION, WITH PROGNOSTIC SELECTION null.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = c(1.5,2,0,0), gamma = rep(1,4), mean = rep(0,4), vcov = diag(4), type="binomial", n = 500 ) head(null.interaction) object <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction,select="glmnet") summary(object) # FORCE V1, V2 INTO THE MODEL; INTERCEPT IS ALWAYS THE FIRST TERM OF MODEL object <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction, select="glmnet",keep.vars=c("V1","V2")) summary(object) # SELECTION WITH STEPWISE SELECTION AND AIC CRITERION object <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction, select="stepAIC") summary(object)
Fits one-by-one (OBO), unrestricted (UIM), and proportional interaction (PIM) regression models to investigate multiple treatment response factors in a parallel-group clinical trial.
object |
object of |
level |
significance level for global interaction tests |
interval |
interval of possible values for responsiveness parameter of PIM |
The global tests for the presence of treatment response factors (treatment-covariate interaction) are one-stage or two-stage likelihood ratio tests.
The fitted multiple interaction models include: one-by-one univariate interaction models (OBO), a full unrestricted model with all pairwise treatment-covariate interactions (UIM), and a proportional interactions model (PIM) fit with an exact or asymptotic approximate estimate for the likelihood ratio test and responsiveness parameter, theta.
Objects can be created by calls of the form anoint.fit(object, level = .05, interval=c(.5,3))
Knumber of prognostic factors
responsivenesslist with exact and approximate estimates of PIM responsiveness parameter
testslist of global interaction test results
pvalueslist of pvalues on which test rejections are based
fitslist of fitted models for each anoint method
Components of tests are the results of the global tests of interaction:
obo.rejectResult of unadjusted one-by-one global test of interaction. Null is no effect modification for K subgroups, the alternative is at least one K is an effect modifier.
obo.adjustSame as obo.reject but with Bonferroni-correction for K comparisons
uim.rejectResult of UIM global test of interaction. Null is no effect modification for K subgroups, the alternative is at least one K is an effect modifier.
pim.exact.rejectResult of PIM exact global test of interaction. Null is no proportional effect modification (theta responsiveness parameter = 1) against the alternative that the treatment responsiveness parameter theta is not equal to 1.
pim.approx.rejectSame as pim.exact.reject but using approximate method.
pim.oboTwo-stage global test. First stage tests PIM using an exact method at level/2 significance. If not rejected, the second stage is a test of adjusted OBO with a second-stage global level/2 significance.
pim.uimSame as pim.obo but with UIM at the second stage.
Components of pvalues on which the global tests are based:
obo.pp-value for the maximum LRT of the one-by-one testing
uim.pp-value for the global LRT of any interaction base on UIM
pim.exact.pp-value for the test of proportional interaction using the PIM exact method
pim.approx.pp-value for the test of proportional interaction using the PIM approximate method
Components of fits are the models underlying the global interaction tests:
oboUnivariate interaction regression models of each subgroup.
uimFull regression model with all pairwise treatment-covariate interactionns
pim.exactProportional interactions model with exact fit
pim.approxProportional interactions model with asymptotic approximate estimation
signature(object = "anoint.fit"):
Display table of results of global test of interaction.
signature(x = "anoint.fit",...):
Display table of results of global test of interaction.
signature(object = "anoint.fit",...):
Display results of global test of interaction and p-values. Returns list with tests and pvalues.
signature(object = "anoint.fit",type=c("obo","uim","pim.exact","pim.approx"):
Extracts the specified fitted object from a anoint.fit.
S. Kovalchik [email protected]
anoint,anoint-class,obo,uim,pim
# NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) object <- anoint(Surv(y, event)~(V1+V2)*trt,data=null.interaction,family="coxph") fit <- anoint.fit(object) summary(fit) fits(fit,type="obo")# NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) object <- anoint(Surv(y, event)~(V1+V2)*trt,data=null.interaction,family="coxph") fit <- anoint.fit(object) summary(fit) fits(fit,type="obo")
formula.anoint objectCreate formula for use with anoint.
anoint.formula(formula=y~(a+b)*trt,family="binomial")anoint.formula(formula=y~(a+b)*trt,family="binomial")
formula |
formula specifying analysis of interaction model |
family |
string indicating model family, should be one of |
The formula should have all subgroups enclosed in parantheses and the treatment variable as an interaction, as shown in default.
Returns instance of formula.anoint class.
Stephanie Kovalchik <[email protected]>
anoint.formula()anoint.formula()
Computes all interaction effects one variable at a time.
anoint.subgroups(formula,trt,data,family="binomial",na.action=na.omit,fwer=0.05,...)anoint.subgroups(formula,trt,data,family="binomial",na.action=na.omit,fwer=0.05,...)
formula |
formula for covariate model as given in |
trt |
character name of treatment assignment indicator |
data |
data.frame containing the variables of |
family |
character specifying family of |
na.action |
function, na.action to perform for handling observations with missing variables among variables in formula. Default is |
fwer |
numeric value for the desired familywise error rate, should be between 0 and 1. |
... |
additional arguments passed to |
Returns a list with
indicator of the covariates included in the fitted model
value of the of treatment-covariate interaction effect (using model with treatment-covariate product term)
value of likelihood ratio test of treatment-covariate interaction
lower endpoints of 95 percent confidence interval for interaction parameter
upper endpoints of 95 percent confidence interval for interaction parameter
pvalue for 1-df chi-squared test
matrix of same rows as covariates and columns as covariates with logical entries indicating which covariates (columns) were include in the fitted model (row)
vector of covariate names as in formula
indicator of rejected hypotheses using a Bonferroni multiple testing correction such that familywise error is controlled at level fwer
.
Stephanie Kovalchik <[email protected]>
set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) anoint.subgroups(Surv(y, event)~V1+V2,trt="trt",data=null.interaction,family="coxph") # PROPORTIONAL INTERACTION WITH THREE COVARIATES AND BINARY OUTCOME pim.interaction <- data.anoint( n = 5000, alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = rep(log(.8),3), gamma = rep(1.5,3), mean = c(0,0,0), vcov = diag(3), type="binomial" ) anoint.subgroups(y~V1+V2+V3,trt="trt",data=pim.interaction,family="binomial")set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) anoint.subgroups(Surv(y, event)~V1+V2,trt="trt",data=null.interaction,family="coxph") # PROPORTIONAL INTERACTION WITH THREE COVARIATES AND BINARY OUTCOME pim.interaction <- data.anoint( n = 5000, alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = rep(log(.8),3), gamma = rep(1.5,3), mean = c(0,0,0), vcov = diag(3), type="binomial" ) anoint.subgroups(y~V1+V2+V3,trt="trt",data=pim.interaction,family="binomial")
pim object.Extract vector of coefs of the fit of a pim model.
signature(object = "pim"):
Extractor for MLEs returned as a matrix with one column.
S. Kovalchik [email protected]
pim model terms.Computes Wald-based confidence intervals for the terms of a PIM model.
signature(object = "pim", parm,level =0.95,...):
Returns estimate and confidence intervals for specified parm. Default is to return all params of the model.
S. Kovalchik [email protected]
Returns a simulated equal-allocation, parallel-group clinical trial with possibly multiple interactions among prognostic factors.
data.anoint(alpha, beta, gamma, mean, vcov, n=100, event=.8, type = c("binomial","survival"))data.anoint(alpha, beta, gamma, mean, vcov, n=100, event=.8, type = c("binomial","survival"))
alpha |
vector specifying control and treatment group intercept |
beta |
vector specifying prognostic factor main effects |
gamma |
vector specifying modification of prognostic effects in the presence of treatment |
mean |
vector of covariate mean to be supplied to |
vcov |
matrix of variance-covariance matrix of prognostic covariates to be supplied to |
n |
number of subjects in each treatment arm |
event |
proportion of observed events when |
type |
string indicating type of response variable |
When type is "survival", the parameters specify the log-rate for an exponentially distributed random variable. Censored times are non-informatively right-censored. When type is "binomial", the parameters specify a log-odds model.
Data frame with y, trt, and V1,...,VK prognostic factors. The data frame also has event with a time-to-event reponse, which is an indicator for an observed event.
S. Kovalchik [email protected]
null.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = c(1.5,2), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="binomial" ) fit <- glm(y~(.)*trt,data=null.interaction,family="binomial") summary(fit) null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = c(1.5,2), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", event = .7 ) fit <- coxph(Surv(y, event)~(.)*trt,data=null.interaction) summary(fit)null.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = c(1.5,2), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="binomial" ) fit <- glm(y~(.)*trt,data=null.interaction,family="binomial") summary(fit) null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = c(1.5,2), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", event = .7 ) fit <- coxph(Surv(y, event)~(.)*trt,data=null.interaction) summary(fit)
anoint.fit objectExtract the specified anoint model from a anoint.fit object.
signature(object = "anoint.fit",type=c("obo","uim","pim.exact","pim.approx"):
Extracts the specified fitted object from a anoint.fit.
S. Kovalchik [email protected]
anoint objectConstructs a forestplot displaying the treatment effect within subgroups for each set of specified categorical variables. Provides a visual comparison of subgroup treatment effect to overall treatment effect, without adjustment for confounding factors or multiplicity.
Includes unadjusted p-values for each subgroup's treatment-covariate interaction test for glm or Cox regression models.
forest(object,terms=NULL,x.axis=NULL,labels=NULL,fun=exp,...)forest(object,terms=NULL,x.axis=NULL,labels=NULL,fun=exp,...)
object |
object of |
terms |
numeric index indicating which terms in prognostic model to include in plot |
x.axis |
Points for tick marks of the bottom axis |
labels |
Matrix of labels of the same rows as |
fun |
functional transformation applied to treatment effects and confidence intervals |
... |
additional arguments passed to |
Additional arguments that can be specified include:
one number of a vector of two elements indicating the (min, max) for the relative plotting symbols. These reflect the relative precision of the symbol estimates
Points for tick marks of the bottom axis
Vector of names for the columns of labels
String of the title of plot
If no values are specifed for the x.axis, eight values over the range of the CIs is used.
If no values are specified for labels, the row names are used.
A labeled forestplot of subgroup treatment effects.
Stephanie Kovalchik <[email protected]>
data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp, censor==0)~(nyha+cardratio+current)*trt,data=simsolvd, family="coxph") forest(obj) grid.newpage() forest(obj,x.axis=seq(0.7,1.5,by=.2))data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp, censor==0)~(nyha+cardratio+current)*trt,data=simsolvd, family="coxph") forest(obj) grid.newpage() forest(obj,x.axis=seq(0.7,1.5,by=.2))
Plot of interaction effects for all possible proportional interactions models.
forest.subsets(object, index = 1:(min(length(object$interaction), 30)), labels = NULL, exclude.fill = "white", include.fill = "grey30", signif.fill = "red", percent.inner = 0.9, xlimits = NULL, legend = TRUE, subgroup.text = NULL, subgroup.axis = NULL, subgroup.title = "Included Covariates", effects.text = NULL, effects.axis = NULL, confint = TRUE, segments.gpar = NULL, subgroup = FALSE)forest.subsets(object, index = 1:(min(length(object$interaction), 30)), labels = NULL, exclude.fill = "white", include.fill = "grey30", signif.fill = "red", percent.inner = 0.9, xlimits = NULL, legend = TRUE, subgroup.text = NULL, subgroup.axis = NULL, subgroup.title = "Included Covariates", effects.text = NULL, effects.axis = NULL, confint = TRUE, segments.gpar = NULL, subgroup = FALSE)
object |
result of |
index |
vector indicating which subset models to include in plot, maximum of 30 of the best subsets if not specified. |
labels |
vector of names for subgroups. If |
exclude.fill |
color for grid squares of excluded covariates |
include.fill |
color for grid squares of included covariates |
signif.fill |
color for plot circles indicating multiplicity-corrected significance |
percent.inner |
percentage of graphic device window for plot region |
xlimits |
vector of two elements indicating minimum and maximum value for effects plot. Values and confidence intervals outside |
legend |
logical value indicating whether legend for significant values should be included |
subgroup.text |
|
subgroup.axis |
|
subgroup.title |
character for title over inclusion/exclusion grid |
effects.text |
|
effects.axis |
|
confint |
logical indicating whether to include 95 percent confidence intervals on effects plot |
segments.gpar |
|
subgroup |
logical indicator of whether fitted object is the result of |
The significance level is the multiplicity corrected criterion with fwer control as specified by pim.subsets.
Returns a plot of the results of all subsets of proportional interactions models. On the lefthand side we plot a grid describing the subsets models. This is a grid showing the included and exclude covariates of each proportional interactions model. Each row corresponds to a particular model. Colored squares in each row indicate the covariates given a proportional interaction effect, while unfilled (exclude.fill) indicate covariates left out of the model. The righthand side shows the interaction effect estimates (effects) for the corresponding subset model.
Stephanie Kovalchik <[email protected]>
set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL # SUPPOSE 5 HYPOTHESIZED EFFECT MODIFIERS null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(rep(1.5,5)), gamma = rep(1,5), mean = rep(0,5), vcov = diag(5), type="survival", n = 500 ) head(null.interaction) fit <- pim.subsets(Surv(y, event)~V1+V2+V3+V4+V5,trt="trt", data=null.interaction,family="coxph") forest.subsets(fit)set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL # SUPPOSE 5 HYPOTHESIZED EFFECT MODIFIERS null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(rep(1.5,5)), gamma = rep(1,5), mean = rep(0,5), vcov = diag(5), type="survival", n = 500 ) head(null.interaction) fit <- pim.subsets(Surv(y, event)~V1+V2+V3+V4+V5,trt="trt", data=null.interaction,family="coxph") forest.subsets(fit)
Formula class for anoint objects
Objects can be created by calls of the form new("formula.anoint", ...).
formula:formula supplied to anoint
uni:list of all univariate interaction model formulas
prognostic:formula of subgroup main effects
prognostic.trt:formula of subgroup and treatment main effects model (no interactions)
trt:character string of treatment variable
family:character string describing model family
signature(object = "formula.anoint"):
Display main formula of formula.anoint object.
signature(x = "formula.anoint",...):
Display main formula of formula.anoint object.
signature(object = "formula.anoint",...):
Updates formula with same syntax as supplied to anoint function.
Stephanie Kovalchik [email protected]
Fits GLM of Cox regression models with a treatment-covariate interaction separately for each covariate specified in anoint object.
obo(anoint,...)obo(anoint,...)
anoint |
object of class |
... |
other arguments passed to |
A list of model fits (fit), interaction likelihood-ratio statistics (LRT), and pvalues per interaction test (pvalue).
Stephanie Kovalchik [email protected]
data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt, data = simsolvd, family = "coxph") fits <- obo(obj) fits lapply(fits$fit, summary)data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt, data = simsolvd, family = "coxph") fits <- obo(obj) fits lapply(fits$fit, summary)
Fits a proportional interactions model from parallel-group clinical trial.
pim(object,exact=TRUE,interval=c(-3,3),n.boot=NULL,...)pim(object,exact=TRUE,interval=c(-3,3),n.boot=NULL,...)
object |
object of class |
exact |
logical indicator whether |
interval |
interval passed to |
n.boot |
number of bootstrap resamples for variance calculations |
... |
other arguments passed to |
When exact is FALSE the method of Follmann and Proschan (1999) is used to estimate the PIM coefficients and perform a likelihood-ratio test on the responsiveness parameter theta.
If exact method is specified, then optimize is used to maximize the profile-likelihood alternating between fixing theta and fixing all other PIM parameters. The arguments interval and additional arguments to ... control the optimization with respect to theta.
When n.boot is NULL no bootstrap resamples are taken. In this case, when using the exact method the variance-covariance for the main effects is based on the model likelihood treating the responsiveness parameter as fixed. To include uncertainty measures for the responsiveness parameter, bootstrap resampling can be used. For the approximate method, only the bootstrap resampling variance is provided for the vcov and confint methods, which is invoked by specifying a positive integer number of samples or n.boot.
Returns instance of pim class.
Stephanie Kovalchik <[email protected]>
Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials. Biometrics 1999; 55(4):1151-1155
set.seed(1115) pim.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = log(c(1.25,1.5)), gamma = rep(1.2,2), mean = c(0,0), vcov = diag(2), type="binomial", n = 500 ) object <- anoint(y~(V1+V2)*trt,data=pim.interaction,family="binomial") object fit <- pim(object) fit summary(fit) # EXAMPLE WITH BOOTSTRAP fit <- pim(object, n=50) summary(fit) confint(fit)set.seed(1115) pim.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = log(c(1.25,1.5)), gamma = rep(1.2,2), mean = c(0,0), vcov = diag(2), type="binomial", n = 500 ) object <- anoint(y~(V1+V2)*trt,data=pim.interaction,family="binomial") object fit <- pim(object) fit summary(fit) # EXAMPLE WITH BOOTSTRAP fit <- pim(object, n=50) summary(fit) confint(fit)
Class for proportional interactions model (PIM).
Objects can be created by calls of the form new("pim", ...).
formula:object of anoint class
coef:list of baseline (alpha), control prognostic effects (beta), and responsiveness parameter (theta)
exact:logical indicator whether exact fit used
LRT:likelihood ratio test statistic of responsiveness parameter
interval:numeric vector supplied to optimize if exact fit is used
boot.pim:matrix of bootstrap estimates of PIM coefficients
vcov:matrix of bootstrap variance-covariance
signature(object = "pim"):
Display point estimates of pim object.
signature(x = "pim",...):
Display point estimates of pim object.
signature(object = "pim",...):
List of estimates and convergence information.
signature(object = "pim"):
Extractor for MLEs.
signature(object = "pim",parm,level=0.95,...):
Computes confidence interval for specified parameters and level. Intervals are based on bootstrap resamples of PIM model.
signature(object = "pim"):
Returns linear predictor for each subject.
signature(object = "pim"):
Extractor for variance-covariance matrix which is estimated with bootstrap resampling.
Stephanie Kovalchik [email protected]
Fits a single proportional interactions model for generalized linear or Cox regression model.
pim.fit(formula, trt, data, family="binomial", na.action=na.omit, ...)pim.fit(formula, trt, data, family="binomial", na.action=na.omit, ...)
formula |
formula for covariate model as given in |
trt |
character name of treatment assignment indicator |
data |
data.frame containing the variables of |
family |
character specifying family of |
na.action |
function, na.action to perform for handling observations with missing variables among variables in formula. Default is |
... |
additional arguments passed to |
Under the proportional interaction model the coef of the main covariate effects in the control arm are multiplied by the interaction effect to get the covariate effects for the treatment group.
Returns a list with
value of the interaction effect of the proportional interaction model, see details
value of likelihood ratio test of proportional interaction
lower endpoint of 95 percent confidence interval for interaction parameter
upper endpoint of 95 percent confidence interval for interaction parameter
pvalue for 1-df chi-squared test
model object for control group
model object for treatment group
Stephanie Kovalchik <[email protected]>
Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials. Biometrics 1999; 55(4):1151-1155
set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) pim.fit(Surv(y, event)~V1+V2,trt="trt",data=null.interaction,family="coxph") # PROPORTIONAL INTERACTION WITH THREE COVARIATES AND BINARY OUTCOME pim.interaction <- data.anoint( n = 5000, alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = rep(log(.8),3), gamma = rep(1.5,3), mean = c(0,0,0), vcov = diag(3), type="binomial" ) pim.fit(y~V1+V2+V3,trt="trt",data=pim.interaction,family="binomial")set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) pim.fit(Surv(y, event)~V1+V2,trt="trt",data=null.interaction,family="coxph") # PROPORTIONAL INTERACTION WITH THREE COVARIATES AND BINARY OUTCOME pim.interaction <- data.anoint( n = 5000, alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = rep(log(.8),3), gamma = rep(1.5,3), mean = c(0,0,0), vcov = diag(3), type="binomial" ) pim.fit(y~V1+V2+V3,trt="trt",data=pim.interaction,family="binomial")
Computes all possible proportional interactions model among p covariates.
pim.subsets(formula,trt,data,family="binomial",na.action=na.omit,fwer=0.05,...)pim.subsets(formula,trt,data,family="binomial",na.action=na.omit,fwer=0.05,...)
formula |
formula for covariate model as given in |
trt |
character name of treatment assignment indicator |
data |
data.frame containing the variables of |
family |
character specifying family of |
na.action |
function, na.action to perform for handling observations with missing variables among variables in formula. Default is |
fwer |
numeric value for the desired familywise error rate, should be between 0 and 1. |
... |
additional arguments passed to |
Under the proportional interaction model the coef of the main covariate effects in the control arm are multiplied by the interaction effect to get the covariate effects for the treatment group.
Returns a list with
indicator of the covariates included in the fitted model
value of the interaction effect of the proportional interaction model, see details
value of likelihood ratio test of proportional interaction
lower endpoints of 95 percent confidence interval for interaction parameter
upper endpoints of 95 percent confidence interval for interaction parameter
pvalue for 1-df chi-squared test
matrix of same rows as subsets and columns as covariates with logical entries indicating which covariates (columns) were include in which subset model (row)
vector of covariate names as in formula
indicator of rejected hypotheses using a multiple testing correction such that familywise error is controlled at level fwer
.
Stephanie Kovalchik <[email protected]>
Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials. Biometrics 1999; 55(4):1151-1155
set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) pim.subsets(Surv(y, event)~V1+V2,trt="trt",data=null.interaction,family="coxph") # PROPORTIONAL INTERACTION WITH THREE COVARIATES AND BINARY OUTCOME pim.interaction <- data.anoint( n = 5000, alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = rep(log(.8),3), gamma = rep(1.5,3), mean = c(0,0,0), vcov = diag(3), type="binomial" ) pim.subsets(y~V1+V2+V3,trt="trt",data=pim.interaction,family="binomial")set.seed(11903) # NO INTERACTION CONDITION, LOGISTIC MODEL null.interaction <- data.anoint( alpha = c(log(.5),log(.5*.75)), beta = log(c(1.5,2)), gamma = rep(1,2), mean = c(0,0), vcov = diag(2), type="survival", n = 500 ) head(null.interaction) pim.subsets(Surv(y, event)~V1+V2,trt="trt",data=null.interaction,family="coxph") # PROPORTIONAL INTERACTION WITH THREE COVARIATES AND BINARY OUTCOME pim.interaction <- data.anoint( n = 5000, alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = rep(log(.8),3), gamma = rep(1.5,3), mean = c(0,0,0), vcov = diag(3), type="binomial" ) pim.subsets(y~V1+V2+V3,trt="trt",data=pim.interaction,family="binomial")
anoint class.Computes the prognostic score (baseline risk) based on the covariates of anoint or a supplied set of predictions. Risk scores are binned into ten groups based on risk deciles and a treatment effect (and confidence interval) is estimated in each group. This is compared to the overall treatment effect which is indicated by the shaded region.
Additional arguments are passed to glm or coxph.
signature(object = "anoint",predict=NULL,fun=exp,...):
Prognostic response plot.
S. Kovalchik [email protected]
set.seed(11903) # BINOMIAL EVENT DATA WITH 4 NORMAL PROGNOSTIC FACTORS pim.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = log(c(1.5,1.1,2,1.3)), gamma = rep(1.5,4), mean = rep(0,4), vcov = diag(4), type="binomial", n = 500 ) object <- anoint(y~(V1+V2+V3+V4)*trt,data=pim.interaction) plot(object,bty="n",las=1) # PLOT TREATMENT EFFECT ON LINEAR PREDICTOR SCALE plot(object,fun=function(x)x,bty="n",las=1,ylab="treatment effect (linear predictor)")set.seed(11903) # BINOMIAL EVENT DATA WITH 4 NORMAL PROGNOSTIC FACTORS pim.interaction <- data.anoint( alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))), beta = log(c(1.5,1.1,2,1.3)), gamma = rep(1.5,4), mean = rep(0,4), vcov = diag(4), type="binomial", n = 500 ) object <- anoint(y~(V1+V2+V3+V4)*trt,data=pim.interaction) plot(object,bty="n",las=1) # PLOT TREATMENT EFFECT ON LINEAR PREDICTOR SCALE plot(object,fun=function(x)x,bty="n",las=1,ylab="treatment effect (linear predictor)")
pim object.Computes linear predictors for the dataset used to fit the model.
signature(object = "pim"):
Linear predictors for dataset used to fit pim model.
S. Kovalchik [email protected]
pim
Prints the regression coefficients of the fit of a pim.
signature(x = "pim",digits=4,...):
Prints call, coefficients, and responsiveness parameter for pim object.
S. Kovalchik [email protected]
pim object.Computes prognostic score from pim model, which is the linear predictor for the main effects of the prognostic factors for untreated subjects.
signature(object = "pim"):
Prognostic score at baseline.
S. Kovalchik [email protected]
pim
Shows the regression coefficients of the fit of a pim.
signature(object = "pim"):
Shows call, coefficients, and multiple interaction parameter for pim object.
S. Kovalchik [email protected]
anoint.fit objectPrints a matrix with logical indicators of whether the given anoint test rejected the null hypothesis for the global test of interaction.
signature(object = "anoint.fit"):
Matrix of logical indicators for global LRT test rejection.
S. Kovalchik [email protected]
anoint objectShows the formula specification of the anoint object.
signature(object = "anoint"):
Shows formula call for anoint object.
S. Kovalchik [email protected]
formula.anoint objectReturns the formula of the formula.anoint object.
signature(object = "formula.anoint"):
Shows formula of the formula.anoint object.
S. Kovalchik [email protected]
A simulated clinical trial based on the design of the Studies of Left Ventricular Dysfunction Trial (SOLVD-T), a placebo-controlled trial of the angiotensin-converting-enzyme inhibitor enalapril for patients with congestive heart failure.
data(simsolvd)data(simsolvd)
A data frame with 2569 observations on the following 12 variables.
indicator for enalapril group
age at baseline (centered and scaled)
pulse at baseline (centered and scaled)
lymphocyte count at baseline (centered and scaled)
left ventricular ejection fraction at baseline (centered and scaled)
simulated vector of random uniform variables
indicator whether New York Heart Association score greater than 2
indicator whether cardiothoracic ratio is greater than 0.5
creatinine at baseline (centered and scaled)
sodium at baseline (centered and scaled)
time to death or hospitalization in days
indicator whether censored (1) or an event (0)
indicator whether current smoker
Simulated data set based on the clinical study reported by: Yusuf, S. et al. (1991). Effect of Enalapril on Survival in Patients with Reduced Left-Ventricular Ejection Fractions and Congestive-Heart-Failure. NEJM 325:293-302.
data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt, data = simsolvd, family = "coxph") uim(obj)$fitdata(simsolvd) obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt, data = simsolvd, family = "coxph") uim(obj)$fit
anoint model fit.A list of estimates and convergence status of a anoint model fit. When exact is TRUE the test statistic is the likelihood ratio test, otherwise the Follmann approximate likelihood ratio test statistic is used.
signature(x = "anoint",...):
Calls summary method of underlying model fit.
S. Kovalchik [email protected]
Fits GLM of Cox regression analysis for model with all pairwise interactions between treatment and covariates specified in anoint object.
uim(object,...)uim(object,...)
object |
object of class |
... |
other arguments passed to |
List of model fit of glm or coxph class (fit), likelihood-ratio test of global test of treatment-covariate interaction (LRT), and LRT p-value for global test of interaction (pvalue).
Stephanie Kovalchik <[email protected]>
data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt, data = simsolvd, family = "coxph") fit <- uim(obj) fit summary(fit$fit)data(simsolvd) obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt, data = simsolvd, family = "coxph") fit <- uim(obj) fit summary(fit$fit)
pim object.Returns Hessian-based variance-covariance matrix of the fit of a pim model.
signature(object = "pim"):
Extractor for variance-covariance of MLEs.
S. Kovalchik [email protected]