最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

regression - Interaction - stratification or adjusting? - Stack Overflow

programmeradmin5浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论