regression - Interaction - stratification or adjusting? - Stack Overflow

I am just wondering how I can show the result that takes into account the interaction between certain i

I am just wondering how I can show the result that takes into account the interaction between certain independent variables. I learned that if interaction is significant or interaction is considered based on the research question, stratification is needed. However, I am just confused with the difference with the two analysis, where I want to consider alcohol to be an effect modifier in the relationship between smoking and lung cancer, shown below:

Analysis 1

library(rms)
model <- lrm(lung_cancer <- age + physical_activity + smoking * alcohol, data=data)

Then, showing OR based on the status of alcohol like:

summary(model, alcohol="Yes")
summary(model, alcohol="No")

Analysis 2

library(rms)
model <- lrm(lung_cancer <- age + physical_activity + smoking * alcohol, data=data)

Then, regardless of the significance of interaction, showing OR after stratifying sample based on the alcohol intake status for the research purpose like:

library(tidyverse)
data1 <- data %>%
  filter(alcohol=="Yes")
data0 <- data %>%
  filter(alcohol=="No")

Then, fit the same model for each strata and interpret OR within the strata like:

model1 <- lrm(lung_cancer <- age + physical_activity + smoking, data=data1)
summary(model1)
model0 <- lrm(lung_cancer <- age + physical_activity + smoking, data=data0)

Based on the analysis result performed in the similar situation, both analysis showed similar result like only among the strata of alcohol==Yes showed significant OR of smoking. Which practice should be done in general?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744722287a4589979.html

相关推荐

  • regression - Interaction - stratification or adjusting? - Stack Overflow

    I am just wondering how I can show the result that takes into account the interaction between certain i

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信