pim.fit: Fit proportional interactions model

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

Description

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

Usage

1

Arguments

formula

formula for covariate model as given in glm or coxph, i.e. y~x1+x2

trt

character name of treatment assignment indicator

data

data.frame containing the variables of formula and trt

family

character specifying family of glm or character "coxph" if coxph model is fit

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 glm or coxph

Details

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.

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

pim.subsets

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

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