Description Usage Arguments Details Value Author(s) References See Also Examples
Test for qualitative interactions between treatment effects and patient subgroups. Perform the testing based on the estimated treatment effects and their standard errors. Output all the results related with qualitative interaction tests as a "qualint" object, which includes all the results related with the testing. Two common tests for qualitative interactions are included: IBGA and LRT, among which IBGA is the default. Useful for three types of responses: continuous, binary and survival data. Complete data is needed as input.
1 2 3 
y 
response variable. A numeric vector for 
trtment 
treatment variable. A vector with different values representing
different treatment groups. Each element corresponds to the treatment the
patient received. Should have the same length as 
subgrp 
patient subgroup variable. A vector with the same length as

type 
response type (see above). Three types of responses are included right
now: 
scale 
the scale type for treatment effects. When 
test 
testing method. Choose either 
alpha 
significance level. The type I error for qualitative interaction tesing. The default is 0.05. 
plotout 
whether output the plot or not for 
In order to test for qualitative interactions between treatment effects and patient subgoups, estimated treatment effects and their standard errors are necessary. For continuous responses, mean difference is derived as the meansure of treatment effects with with its standard error equal to √{sd_1^2/n_1+sd_2^2/n_2}. For binary responses, three different scales are available to measure the treatment effects: risk difference, log relative risk and log odds ratio. Their standard errors could easily obtained according to formulas. For survival responses, the log hazard ratio is used to evaluate the treatment effects. The cox regression model is used in this function to estimate the log hazard ratio and also its standard error.
For the IBGA graph, however, we plot it according to common measures of treatment effects instead of the one used in the calculation. For continuous responses, mean difference is used since it is the common treament effect scale. For binary responses, the function plots risk difference, relative risk, and odds ratio directly. For survival responses, hazard ratios are plotted instead of log hazard ratios.
In the power calculation, this function assumes the estimated treatment effect scale and its standard errors are equal to the true values. For IBGA method, an explicit formula is available, so it is very easy to calculate the power. For LRT, a simulation is used to assess the power since no explicit formula is available.
An object with S3 class "qualint".
call 
the call that produces this object. 
n 
the sample size for each treatment in each subgroup. 
type 
response type. 
alpha 
significance level for the test. 
treatment 
treatment factors. 
reference 
reference treatment used for the comparison. 
nsbp 
the number of patient subgroups. 
subgroup 
subgroup factors. 
scale 
the scale type for treatment effects (see above). 
effect 
estimated treatment effects. 
se 
standard error of treatment effects estimators. 
LowerCI 
the lower limit of the confidence interval. 
UpperCI 
the upper limit of the confidence interval. 
test 
testing method used here, either "IBGA" or "LRT". 
index 
the testing index used only for 
cvalue 
the critical value used only for 
LowerTI 
the lower limit of the testing interval used when 
UpperTI 
the upper limit of the testing interval used when 
pvalue 
the pvalue for qualitative interactions. 
power 
the power based on the observed data. 
nobs 
the number of subjects. 
missing 
the indexes of subjects with missing values. 
Lixi Yu, EunYoung Suh, Guohua (James) Pan
Maintainer: Lixi Yu lixiyu@uiowa.edu
Gail and Simon (1985), Testing for qualitative interactions between treatment effects and patient subsets, Biometrics, 41, 361372.
Pan and Wolfe (1993), Tests for generalized problems of detecting qualitative interaction, Technical Report No. 526, Department of Statistics, The Ohio State University.
Pan and Wolfe (1997), Test for qualitative interaction of clinical significance, Statistics in Medicine, 16, 16451652.
print.qualint
, coef.qualint
,
plot.qualint
, qualval
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  #### Continuous ####
ynorm < rnorm(300)
trtment < sample(c(0, 1), 300, prob = c(0.4, 0.6),
replace = TRUE)
subgrp < sample(c(0, 1, 2), 300, prob = c(1/3, 1/3, 1/3),
replace = TRUE)
test1 < qualint(ynorm, trtment, subgrp)
plot(test1)
print(test1)
coef(test1)
test2 < qualint(ynorm, trtment, subgrp, plotout = TRUE)
test3 < qualint(ynorm, trtment, subgrp, test = "LRT")
#### Binary ####
ybin < sample(c(0, 1), 300, prob = c(0.3, 0.7),
replace = TRUE)
test4 < qualint(ybin, trtment, subgrp, type = "binary")
test5 < qualint(ybin, trtment, subgrp, type = "binary",
scale = "RR", test = "LRT")
#### Survival ####
time < rpois(300, 200)
censor < sample(c(0, 1), 300, prob = c(0.7, 0.3),
replace = TRUE)
test6 < qualint(Surv(time, censor), trtment, subgrp)
test7 < qualint(Surv(time, censor), trtment, subgrp,
type = "survival", test = "LRT")
test8 < qualint(Surv(time, censor), trtment, subgrp,
test = "IBGA", plotout = TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.