mim: Create analysis of interactions object

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
2
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 for glm or coxph, see details

data

data.frame containing the variables of formula

family

character specifying family of glm or character "coxph" if coxph 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 when select is set to TRUE. Used only when select is glmnet. See cv.glmnet

type.measure

loss to use for cross-validation. Used only when select is glmnet. See cv.glmnet

keep.vars

vector of names of variables to retain if selection procedure is used. Used only when select is glmnet.

na.action

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

...

additional arguments passed to cv.glmnet when select is glmnet or stepAIC when select is stepAIC.

Details

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

Value

Returns instance of anoint class.

Author(s)

Stephanie Kovalchik <[email protected]>

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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)

anoint documentation built on May 2, 2019, 3:26 p.m.