Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Analysis of Interactions
Version:1.5
Date:2024-09-04
Maintainer:Ravi Varadhan <ravi.varadhan@jhu.edu>
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>.
License:GPL-2 |GPL-3 [expanded from: GPL (≥ 2)]
LazyLoad:yes
Depends:R (≥ 2.13.0), stats, survival, MASS, graphics, grid
Imports:methods, glmnet
NeedsCompilation:no
Packaged:2024-09-04 15:07:59 UTC; raviv
Repository:CRAN
Author:Ravi Varadhan [aut, cre], Stephanie Kovalchik [aut], Leon Wang [ctb]
Date/Publication:2024-09-09 10:00:09 UTC

Analysis of interactions for generalized linear models (GLM) or Cox proportional hazards regression models.

Description

Testing procedures and models for investigating the heterogeneity of treatment effect in a clinical trial with multiple baseline covariates.

Details

Package: anoint
Type: Package
Version: 1.4
Date: 2015-7-10
License: GPL

Author(s)

Ravi Varadhan <rvaradhan@jhmi.edu> and Stephanie Kovalchik (maintainer) <s.a.kovalchik@gmail.com>

References

Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials.Biometrics 1999; 55(4):1151-1155


Create analysis of interactions object

Description

Prepares formula and data to be used in methods with the analysis of interactions class.

Usage

anoint(formula,data,family="binomial",select=NULL,nfolds=10,  type.measure="deviance",keep.vars=NULL,na.action=na.omit,...)

Arguments

formula

analysis of interaction formula forglm orcoxph, see details

data

data.frame containing the variables offormula

family

character specifying family ofglm or character "coxph" ifcoxph model is fit

select

character for type of selection to perform, either "stepAIC" or "glmnet".

nfolds

number of folds used in cross-validation to find lasso penalty parameter whenselect is set toTRUE. Used only whenselect isglmnet. Seecv.glmnet

type.measure

loss to use for cross-validation. Used only whenselect isglmnet. Seecv.glmnet

keep.vars

vector of names of variables to retain if selection procedure is used. Used only whenselect isglmnet.

na.action

function,na.action to perform for handling observations with missing variables among variables in formula. Default isna.omit

...

additional arguments passed tocv.glmnet whenselect isglmnet orstepAIC whenselect isstepAIC.

Details

To test proportional multiple interactions between treatment variable indicatorz (binary, 0 or 1) and variablesa,b, with responsey of a GLM model,formula must bey~(a+b)*z. If a Cox model with event timetime and event indicatorevent,formula isSurv(time,event)~(a+b)*z.

Factors should not be included asa orb because this could change how the reference group is represented in the model. Separate 0/1 dummy variables must be supplied by the user.

Whenselect isglmnet a Lasso method (cv.glmnet) is used to select prognostic factors using 10-fold cross-validation with the control data only. Ifselect is set tostepAIC a stepwise selection procedure is used with specifications based on arguments passed to....

Value

Returns instance ofanoint class.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

References

Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials.Biometrics 1999; 55(4):1151-1155

See Also

data.anoint,cv.glmnet

Examples

# NO INTERACTION CONDITION, LOGISTIC MODELnull.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")objectsummary(object)# NO INTERACTION CONDITION, WITH PROGNOSTIC SELECTIONnull.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 MODELobject <- 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 CRITERIONobject <- anoint(y~(V1+V2+V3+V4)*trt,data=null.interaction,select="stepAIC")summary(object)

Fits and global tests of analysis of interaction models

Description

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.

Arguments

object

object ofanoint class

level

significance level for global interaction tests

interval

interval of possible values for responsiveness parameter of PIM

Details

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 from the Class

Objects can be created by calls of the formanoint.fit(object, level = .05, interval=c(.5,3))

Slots

K

number of prognostic factors

responsiveness

list with exact and approximate estimates of PIM responsiveness parameter

tests

list of global interaction test results

pvalues

list of pvalues on which test rejections are based

fits

list of fitted models for eachanoint method

Components oftests are the results of the global tests of interaction:

obo.reject

Result 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.adjust

Same asobo.reject but with Bonferroni-correction for K comparisons

uim.reject

Result 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.reject

Result of PIM exact global test of interaction. Null is noproportional effect modification (theta responsiveness parameter = 1) against the alternative that the treatment responsiveness parameter theta is not equal to 1.

pim.approx.reject

Same aspim.exact.reject but using approximate method.

pim.obo

Two-stage global test. First stage tests PIM using an exact method atlevel/2 significance. If not rejected, the second stage is a test of adjusted OBO with a second-stage globallevel/2 significance.

pim.uim

Same aspim.obo but with UIM at the second stage.

Components ofpvalues on which the global tests are based:

obo.p

p-value for the maximum LRT of the one-by-one testing

uim.p

p-value for the global LRT of any interaction base on UIM

pim.exact.p

p-value for the test of proportional interaction using the PIM exact method

pim.approx.p

p-value for the test of proportional interaction using the PIM approximate method

Components offits are the models underlying the global interaction tests:

obo

Univariate interaction regression models of each subgroup.

uim

Full regression model with all pairwise treatment-covariate interactionns

pim.exact

Proportional interactions model with exact fit

pim.approx

Proportional interactions model with asymptotic approximate estimation

Methods

show

signature(object = "anoint.fit"):Display table of results of global test of interaction.

print

signature(x = "anoint.fit",...):Display table of results of global test of interaction.

summary

signature(object = "anoint.fit",...):Display results of global test of interaction and p-values. Returns list withtests andpvalues.

fits

signature(object = "anoint.fit",type=c("obo","uim","pim.exact","pim.approx"):Extracts the specified fitted object from aanoint.fit.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com

See Also

anoint,anoint-class,obo,uim,pim

Examples

# NO INTERACTION CONDITION, LOGISTIC MODELnull.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")

Create aformula.anoint object

Description

Create formula for use withanoint.

Usage

anoint.formula(formula=y~(a+b)*trt,family="binomial")

Arguments

formula

formula specifying analysis of interaction model

family

string indicating model family, should be one ofglm families orcoxph

Details

Theformula should have all subgroups enclosed in parantheses and the treatment variable as an interaction, as shown in default.

Value

Returns instance offormula.anoint class.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

See Also

formula.anoint-class,anoint

Examples

anoint.formula()

Perform one-by-one subgroup analyses

Description

Computes all interaction effects one variable at a time.

Usage

anoint.subgroups(formula,trt,data,family="binomial",na.action=na.omit,fwer=0.05,...)

Arguments

formula

formula for covariate model as given inglm orcoxph, i.e.y~x1+x2

trt

character name of treatment assignment indicator

data

data.frame containing the variables offormula andtrt

family

character specifying family ofglm or character "coxph" ifcoxph model is fit

na.action

function,na.action to perform for handling observations with missing variables among variables in formula. Default isna.omit

fwer

numeric value for the desired familywise error rate, should be between 0 and 1.

...

additional arguments passed toglm orcoxph

Value

Returns a list with

subset

indicator of the covariates included in the fitted model

interaction

value of the of treatment-covariate interaction effect (using model with treatment-covariate product term)

LRT

value of likelihood ratio test of treatment-covariate interaction

lower

lower endpoints of 95 percent confidence interval for interaction parameter

upper

upper endpoints of 95 percent confidence interval for interaction parameter

pvalue

pvalue for 1-df chi-squared test

include.exclude.matrix

matrix of same rows as covariates and columns as covariates with logical entries indicating which covariates (columns) were include in the fitted model (row)

covariates

vector of covariate names as in formula

reject

indicator of rejected hypotheses using a Bonferroni multiple testing correction such that familywise error is controlled at levelfwer

.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

Examples

set.seed(11903)# NO INTERACTION CONDITION, LOGISTIC MODELnull.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 OUTCOMEpim.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")

Get coefs frompim object.

Description

Extract vector of coefs of the fit of apim model.

Methods

coef

signature(object = "pim"):Extractor for MLEs returned as a matrix with one column.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Compute confindence intervals ofpim model terms.

Description

Computes Wald-based confidence intervals for the terms of a PIM model.

Methods

confint

signature(object = "pim", parm,level =0.95,...):Returns estimate and confidence intervals for specifiedparm. Default is to return all params of the model.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Generate a clinical trial data set under a specified multiple interaction model

Description

Returns a simulated equal-allocation, parallel-group clinical trial with possibly multiple interactions among prognostic factors.

Usage

data.anoint(alpha, beta, gamma, mean, vcov, n=100, event=.8,type = c("binomial","survival"))

Arguments

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 tomvrnorm of theMASS package.

vcov

matrix of variance-covariance matrix of prognostic covariates to be supplied tomvrnorm

n

number of subjects in each treatment arm

event

proportion of observed events whentype is "survival"

type

string indicating type of response variable

Details

Whentype is "survival", the parameters specify the log-rate for an exponentially distributed random variable. Censored times are non-informatively right-censored. Whentype is "binomial", the parameters specify a log-odds model.

Value

Data frame withy,trt, andV1,...,VK prognostic factors. The data frame also hasevent with a time-to-event reponse, which is an indicator for an observed event.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com

Examples

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)

Extract fits fromanoint.fit object

Description

Extract the specifiedanoint model from aanoint.fit object.

Methods

fits

signature(object = "anoint.fit",type=c("obo","uim","pim.exact","pim.approx"):Extracts the specified fitted object from aanoint.fit.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Construct a forestplot from aanoint object

Description

Constructs 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.

Usage

forest(object,terms=NULL,x.axis=NULL,labels=NULL,fun=exp,...)

Arguments

object

object ofanoint class

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 asonebyone, columns printed from left to right

fun

functional transformation applied to treatment effects and confidence intervals

...

additional arguments passed toforesplot (see details)

Details

Additional arguments that can be specified include:

pch.size

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

x.axis

Points for tick marks of the bottom axis

header

Vector of names for the columns oflabels

main

String of the title of plot

If no values are specifed for thex.axis, eight values over the range of the CIs is used.

If no values are specified forlabels, the row names are used.

Value

A labeled forestplot of subgroup treatment effects.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

Examples

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

Subsets forest plot for proportional interactions models

Description

Plot of interaction effects for all possible proportional interactions models.

Usage

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)

Arguments

object

result ofpim.subsets

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. IfNULL, covariates ofpim.subsets is used.

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 outsidexlimits will be clipped.

legend

logical value indicating whether legend for significant values should be included

subgroup.text

gpar list for modifying title of subgroup grid

subgroup.axis

gpar list for modifying text of subgroup grid labels

subgroup.title

character for title over inclusion/exclusion grid

effects.text

gpar list for modifying title of effects plot

effects.axis

gpar list for modifying text of effects plot axis

confint

logical indicating whether to include 95 percent confidence intervals on effects plot

segments.gpar

gpar list for rendering of confidence interval segments

subgroup

logical indicator of whether fitted object is the result ofanoint.subgroups

Details

The significance level is the multiplicity corrected criterion withfwer control as specified bypim.subsets.

Value

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.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

See Also

pim.subsets

Examples

set.seed(11903)# NO INTERACTION CONDITION, LOGISTIC MODEL# SUPPOSE 5 HYPOTHESIZED EFFECT MODIFIERSnull.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)

Class "formula.anoint"

Description

Formula class foranoint objects

Objects from the Class

Objects can be created by calls of the formnew("formula.anoint", ...).

Slots

formula:

formula supplied toanoint

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

Methods

show

signature(object = "formula.anoint"):Display main formula offormula.anoint object.

print

signature(x = "formula.anoint",...):Display main formula offormula.anoint object.

update

signature(object = "formula.anoint",...):Updates formula with same syntax as supplied toanoint function.

Author(s)

Stephanie Kovalchiks.a.kovalchik@gmail.com

See Also

anoint


Perform one-by-one (OBO) estimates of treatment-covariate interaction

Description

Fits GLM of Cox regression models with a treatment-covariate interaction separately for each covariate specified inanoint object.

Usage

obo(anoint,...)

Arguments

anoint

object of classanoint

...

other arguments passed toglm orcoxph

Value

A list of model fits (fit), interaction likelihood-ratio statistics (LRT), and pvalues per interaction test (pvalue).

Author(s)

Stephanie Kovalchiks.a.kovalchik@gmail.com

See Also

anoint

Examples

data(simsolvd)obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt,data = simsolvd, family = "coxph")fits <- obo(obj)fitslapply(fits$fit, summary)

Fit proportional interaction model

Description

Fits a proportional interactions model from parallel-group clinical trial.

Usage

pim(object,exact=TRUE,interval=c(-3,3),n.boot=NULL,...)

Arguments

object

object of classanoint

exact

logical indicator whetherexact or approximate fit is performed

interval

interval passed tooptimize ifexact isTRUE

n.boot

number of bootstrap resamples for variance calculations

...

other arguments passed tooptimize ifexact isTRUE

Details

Whenexact isFALSE the method of Follmann and Proschan (1999) is used to estimate the PIM coefficients and perform a likelihood-ratio test on the responsiveness parametertheta.

Ifexact method is specified, thenoptimize is used to maximize the profile-likelihood alternating between fixingtheta and fixing all other PIM parameters. The argumentsinterval and additional arguments to... control the optimization with respect totheta.

Whenn.boot isNULL no bootstrap resamples are taken. In this case, when using theexact 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 thevcov andconfint methods, which is invoked by specifying a positive integer number of samples orn.boot.

Value

Returns instance ofpim class.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

References

Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials.Biometrics 1999; 55(4):1151-1155

See Also

pim-class

Examples

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")objectfit <- pim(object)fitsummary(fit)# EXAMPLE WITH BOOTSTRAP fit <- pim(object, n=50)summary(fit)confint(fit)

Class "pim"

Description

Class for proportional interactions model (PIM).

Objects from the Class

Objects can be created by calls of the formnew("pim", ...).

Slots

formula:

object ofanoint class

coef:

list of baseline (alpha), control prognostic effects (beta), and responsiveness parameter (theta)

exact:

logical indicator whetherexact fit used

LRT:

likelihood ratio test statistic of responsiveness parameter

interval:

numeric vector supplied tooptimize ifexact fit is used

boot.pim:

matrix of bootstrap estimates of PIM coefficients

vcov:

matrix of bootstrap variance-covariance

Methods

show

signature(object = "pim"):Display point estimates ofpim object.

print

signature(x = "pim",...):Display point estimates ofpim object.

summary

signature(object = "pim",...):List of estimates and convergence information.

coef

signature(object = "pim"):Extractor for MLEs.

confint

signature(object = "pim",parm,level=0.95,...):Computes confidence interval for specified parameters and level. Intervals are based on bootstrap resamples of PIM model.

predict

signature(object = "pim"):Returns linear predictor for each subject.

vcov

signature(object = "pim"):Extractor for variance-covariance matrix which is estimated with bootstrap resampling.

Author(s)

Stephanie Kovalchiks.a.kovalchik@gmail.com

See Also

pim


Fit proportional interactions model

Description

Fits a single proportional interactions model for generalized linear or Cox regression model.

Usage

pim.fit(formula, trt, data, family="binomial", na.action=na.omit, ...)

Arguments

formula

formula for covariate model as given inglm orcoxph, i.e.y~x1+x2

trt

character name of treatment assignment indicator

data

data.frame containing the variables offormula andtrt

family

character specifying family ofglm or character "coxph" ifcoxph model is fit

na.action

function,na.action to perform for handling observations with missing variables among variables in formula. Default isna.omit

...

additional arguments passed toglm orcoxph

Details

Under the proportional interaction model thecoef of the main covariate effects in the control arm are multiplied by theinteraction effect to get the covariate effects for the treatment group.

Value

Returns a list with

interaction

value of the interaction effect of the proportional interaction model, see details

LRT

value of likelihood ratio test of proportional interaction

lower

lower endpoint of 95 percent confidence interval for interaction parameter

upper

upper endpoint of 95 percent confidence interval for interaction parameter

pvalue

pvalue for 1-df chi-squared test

model0

model object for control group

model1

model object for treatment group

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

References

Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials.Biometrics 1999; 55(4):1151-1155

See Also

pim.subsets

Examples

set.seed(11903)# NO INTERACTION CONDITION, LOGISTIC MODELnull.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 OUTCOMEpim.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")

Perform all subsets proportional interactions modeling

Description

Computes all possible proportional interactions model amongp covariates.

Usage

pim.subsets(formula,trt,data,family="binomial",na.action=na.omit,fwer=0.05,...)

Arguments

formula

formula for covariate model as given inglm orcoxph, i.e.y~x1+x2

trt

character name of treatment assignment indicator

data

data.frame containing the variables offormula andtrt

family

character specifying family ofglm or character "coxph" ifcoxph model is fit

na.action

function,na.action to perform for handling observations with missing variables among variables in formula. Default isna.omit

fwer

numeric value for the desired familywise error rate, should be between 0 and 1.

...

additional arguments passed toglm orcoxph

Details

Under the proportional interaction model thecoef of the main covariate effects in the control arm are multiplied by theinteraction effect to get the covariate effects for the treatment group.

Value

Returns a list with

subset

indicator of the covariates included in the fitted model

interaction

value of the interaction effect of the proportional interaction model, see details

LRT

value of likelihood ratio test of proportional interaction

lower

lower endpoints of 95 percent confidence interval for interaction parameter

upper

upper endpoints of 95 percent confidence interval for interaction parameter

pvalue

pvalue for 1-df chi-squared test

include.exclude.matrix

matrix of same rows as subsets and columns as covariates with logical entries indicating which covariates (columns) were include in which subset model (row)

covariates

vector of covariate names as in formula

reject

indicator of rejected hypotheses using a multiple testing correction such that familywise error is controlled at levelfwer

.

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

References

Follmann DA, Proschan MA. A multivariate test of interaction for use in clinical trials.Biometrics 1999; 55(4):1151-1155

Examples

set.seed(11903)# NO INTERACTION CONDITION, LOGISTIC MODELnull.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 OUTCOMEpim.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")

Prognostic response plot (PR-plot) foranoint class.

Description

Computes the prognostic score (baseline risk) based on the covariates ofanoint 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.

Details

Additional arguments are passed toglm orcoxph.

Methods

plot

signature(object = "anoint",predict=NULL,fun=exp,...):Prognostic response plot.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com

Examples

set.seed(11903)# BINOMIAL EVENT DATA WITH 4 NORMAL PROGNOSTIC FACTORSpim.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 SCALEplot(object,fun=function(x)x,bty="n",las=1,ylab="treatment effect (linear predictor)")

Get risk predictions forpim object.

Description

Computes linear predictors for the dataset used to fit the model.

Methods

predict

signature(object = "pim"):Linear predictors for dataset used to fitpim model.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Print coefficients ofpim

Description

Prints the regression coefficients of the fit of apim.

Methods

print

signature(x = "pim",digits=4,...):Prints call, coefficients, and responsiveness parameter forpim object.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Prognostic scores forpim object.

Description

Computes prognostic score frompim model, which is the linear predictor for the main effects of the prognostic factors for untreated subjects.

Methods

prognostic.score

signature(object = "pim"):Prognostic score at baseline.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Show coefficients ofpim

Description

Shows the regression coefficients of the fit of apim.

Methods

show

signature(object = "pim"):Shows call, coefficients, and multiple interaction parameter forpim object.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Show table of LRT global test results foranoint.fit object

Description

Prints a matrix with logical indicators of whether the givenanoint test rejected the null hypothesis for the global test of interaction.

Methods

show

signature(object = "anoint.fit"):Matrix of logical indicators for global LRT test rejection.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Showanoint object

Description

Shows the formula specification of theanoint object.

Methods

show

signature(object = "anoint"):Shows formula call foranoint object.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Showformula.anoint object

Description

Returns the formula of theformula.anoint object.

Methods

show

signature(object = "formula.anoint"):Shows formula of theformula.anoint object.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Simulated SOLVD-Trial data set

Description

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.

Usage

data(simsolvd)

Format

A data frame with 2569 observations on the following 12 variables.

trt

indicator for enalapril group

age

age at baseline (centered and scaled)

beat

pulse at baseline (centered and scaled)

lymphocyte

lymphocyte count at baseline (centered and scaled)

lvef

left ventricular ejection fraction at baseline (centered and scaled)

noise

simulated vector of random uniform variables

nyha

indicator whether New York Heart Association score greater than 2

cardratio

indicator whether cardiothoracic ratio is greater than 0.5

creatinine

creatinine at baseline (centered and scaled)

sodium

sodium at baseline (centered and scaled)

ttodthorchfhosp

time to death or hospitalization in days

censor

indicator whether censored (1) or an event (0)

current

indicator whether current smoker

Source

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.

Examples

data(simsolvd)obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt,data = simsolvd, family = "coxph")uim(obj)$fit

Summary ofanoint model fit.

Description

A list of estimates and convergence status of aanoint model fit. Whenexact isTRUE the test statistic is the likelihood ratio test, otherwise the Follmann approximate likelihood ratio test statistic is used.

Methods

summary

signature(x = "anoint",...):Calls summary method of underlying model fit.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


Perform unrestricted multiple treatment-covariate interaction regression

Description

Fits GLM of Cox regression analysis for model with all pairwise interactions between treatment and covariates specified inanoint object.

Usage

uim(object,...)

Arguments

object

object of classanoint

...

other arguments passed toglm orcoxph

Value

List of model fit ofglm orcoxph class (fit), likelihood-ratio test of global test of treatment-covariate interaction (LRT), and LRT p-value for global test of interaction (pvalue).

Author(s)

Stephanie Kovalchik <s.a.kovalchik@gmail.com>

See Also

glm,coxph,anoint

Examples

data(simsolvd)obj <- anoint(Surv(ttodthorchfhosp,censor==0)~(age+beat+lvef)*trt,data = simsolvd, family = "coxph")fit <- uim(obj)fit summary(fit$fit)

Get variance-covariance frompim object.

Description

Returns Hessian-based variance-covariance matrix of the fit of apim model.

Methods

vcov

signature(object = "pim"):Extractor for variance-covariance of MLEs.

Author(s)

S. Kovalchiks.a.kovalchik@gmail.com


[8]ページ先頭

©2009-2025 Movatter.jp