R language uses the interactionR package to conduct subgroup additive interaction analysis

In statistical analysis, interaction means that the effect of a factor changes as the level of other factors changes. The joint effect of two factors is not equal to the sum (additive interaction) or product (multiplicative interaction) of the two factors' separate effects. The evaluation of interactions is scale-dependent: multiplicative or additive. An interaction on a multiplicative scale means that the combined effect of the two exposures is greater (or less) than the product of the separate effects of the two exposures. An interaction on an additive scale means that the combined effect of the two exposures is greater (or less) than the sum of the individual effects of the two exposures.
Currently, only multiplicative interaction effects have been reported in a large number of articles, while additive interaction effects have been reported less frequently. Some literature shows that using only multiplicative interaction effects underestimates the risk of disease synergy and thus underestimates the incidence.
insert image description here
Rothman pointed out that the product term in the logistic or Cox regression model has no statistical significance, which
does not mean that there is no additive interaction between the two factors, nor does it mean that there is no biological interaction. He also theoretically explored whether the factors used to evaluate are different from each other. The additive interaction of the multiplicative interaction, and three evaluation indicators: the relative excess risk due to interaction (RERI), the attributable proportion
due to interaction (AP) and the interaction index ( The construction and calculation method of the synergy in-dex, SI).

Take the simplest two factors and two levels as an example. Assume that the two exposure factors are A and B respectively. 1 indicates the presence of the factor, 0 indicates the absence of the factor, and the dependent variable is the occurrence or absence of the disease. The OR value obtained by the logistic regression model is used as an estimate of the relative risk (RR). OR _A0B0 represents the OR value of the disease when neither A nor B is present, and is used as the reference group during analysis; OR _A1B0 represents the presence of only A and the absence of B. OR value of onset when A is absent and only B is present; OR _A1B1 indicates OR value of onset when A and B coexist.
Rothman's three index formulas for evaluating additive interactions are as follows:
RERI= ORR _A1B1 - ORR _A0B1 - ORR _A1B0 +1;
AP = RERI / ORR _A1B1 ;
SI= (ORR _A1B1 - 1) / [(ORR _A0B1 - 1 ) + (OR _A1B0 - 1)]

It can be seen from this: RERI is the excess risk obtained by subtracting the risk of A and B alone from the incidence of simultaneous exposure to A and B. AP is the ratio of the excess risk to the total risk. SI is the increased risk of disease caused by simultaneous exposure to A and B divided by the increased risk of disease caused by A and B alone. (Experience it).

Next, we use the interactionR package for analysis. First, import the R package and data.

library(interactionR)
bc<-read.csv("E:/r/test/jiaohu1.csv",sep=',',header=TRUE)

insert image description here
This is a very simple data, oc is the outcome variable, alc and smk are the exposure factors.
model first

model.glm <- glm(oc ~ alc * smk,
                 family = binomial(link = "logit"),
                 data = OCdata)

The code is very simple, just one sentence

out <- interactionR(model.glm, 
                            exposure_names = c("alc", "smk"), 
                            ci.type = "mover", ci.level = 0.95, 
                            em = F, recode = F)

The interactionR package can directly generate a completed word table, saving you the trouble of even making the table.

interactionR_table(out)

insert image description here
This table can be found in the directory of RStudio (or the directory you set)

insert image description here
How to read this table? Compare OR according to the method of onset. See the picture below.

insert image description here
If "ci type" is set to "mover, the variance recovery method will be selected.

out <-interactionR(model.glm,
             exposure_names = c("alc", "smk"),
             ci.type = "mover", ci.level = 0.95,
             em = FALSE, recode = FALSE)

interactionR_table(out)

insert image description here
The results of both methods are similar. The following demonstrates a data containing three binary variables, outcome is the outcome variable, exp1 and exp2 are the exposure variables

d<-read.csv("E:/r/test/jiaohu2.csv",sep=',',header=TRUE)

insert image description here
The method is basically the same, that is, CI takes "delta" and recode = TRUE.

model.prev <- glm(outcome ~ exp1 * exp2, family = binomial(link = "logit"), data = d)

out1<-interactionR(model.prev,
             exposure_names = c("exp1", "exp2"),
             ci.type = "delta", ci.level = 0.95,
             em = FALSE, recode = TRUE
)

interactionR_table(out1)

insert image description here
We see an additional indicator of Effect of exp1 within the strata of exp2, which roughly means the effect of exp1 within the strata of exp2. For details, please refer to: Zou GY. On the Estimation of Additive Interaction by Use of the Four-by-two Table and Beyond. American Journal of Epidemiology 2008; 168:212-24. This article.

OK, the article in this issue is over, and the official account replied: Adding the interaction data, you can get the two data in the article. It is also helpful to read the references for further understanding.

references:

  1. Zou GY. On the Estimation of Additive Interaction by Use of the Four-by-two Table and Beyond. American Journal of Epidemiology 2008; 168:212-24.
  2. [1] Xu Minrui, Qiang Deren, Zhou Yihong, et al. Application of R software for logistic regression model interaction analysis [J]. China Health Statistics, 2017, 34(4):4.DOI:CNKI:SUN:ZGWT. 0.2017-04-043.
  3. Rothman K, Greenland S (1998). Modern Epidemiology. Lippincott - Raven Philadelphia, USA.
  4. Knol, M.J., VanderWeele, T.J., Groenwold, R.H.H. et al. Estimating measures of interaction on an additive scale for preventive exposures. Eur J Epidemiol 26, 433–438 (2011). https://doi.org/10.1007/s10654-011-9554-9

Guess you like

Origin blog.csdn.net/dege857/article/details/132675929