简体   繁体   English

具有二元接触和相互作用项的广义线性回归模型

[英]Generalized Linear Regression Model With Binary Exposure and Interaction Terms

I am running some fairly simple odds ratio analysis to investigate relationships of certain variable on injury outcomes. 我正在运行一些相当简单的赔率比分析,以调查某些变量与伤害结果之间的关系。 The exposure term (inj) is binary with 0 representing no injury and 1 meaning an injury is present. 暴露术语(inj)是二进制的,0表示无伤害,而1表示存在伤害。 The interaction terms I am investigating are whether the person injured at work ( causeWork ; 0 represents not a work related injury and 1 represents a work injury) and the mechanism of injury ( mechanism ; multivariable ie. mechanismFall , mechanismObject , mechanismPerson ). 我调查的交互项是在工作中受伤的人是否( causeWork ; 0表示没有工伤和1代表工伤)和损伤的机制( mechanism ;多变量即mechanismFallmechanismObjectmechanismPerson )。 The reference variable for mechanism = fall). mechanism的参考变量=下降)。 My glm is as follows: 我的眼神如下:

fit 1 <- glm(formula = inj ~ cause * mechanism, family = "binomial", 
data = dat)

After exponentiating the coefficients and calling for the confidence intervals, I get the following values: 对系数求幂并调用置信区间后,得到以下值:

round(cbind(OR=exp(coef(fit1)), exp(confint(fit1))), 2)

                              OR    2.5%  97.5 %
(Intercept)                   0.24  0.11   0.47
causeWork                     1.06  0.14   5.17
mechanismObject               3.52  1.51   8.81
mechanismPerson               1.79  0.65   5.02
causeWork:mechanismObject     0.48  0.07   4.24
causeWork:mechanismPerson     1.88  0.30  16.24

Where I am getting confused is understanding the meaning for each, particularly which reference is being used for the OR comparison. 让我感到困惑的地方是理解它们的含义,尤其是将哪个引用用于OR比较。 The way I currently understand this is: 我目前的理解是:

(intecept): The odds of suffering an injury (感知):受伤的几率

causeWork : The OR of suffering an injury while at work ( 1 ) versus suffering an injury not at work ( 0 ) causeWork :在工作中受伤( 1 )与在非工作中受伤( 0 )的OR

mechanismFall : The OR of suffering an injury at work from an object versus suffering an injury at work from a fall (reference). mechanismFall :对象在工作中遭受伤害与摔倒时遭受工作伤害(参考)的OR。

... ...

'causeWork:mechanismObject': The incremental change from 'causeWork' given mechanism=object (versus fall) 'causeWork:mechanismObject':在给定的机制=对象的情况下,相对于'causeWork'的增量变化(相对于下降)

Does R automatically use 0 as the reference for all cases? R是否在所有情况下都自动使用0作为参考? If that is the case, would the intercept be the odds of NOT suffering and injury? 如果真是这样,那么拦截将是没有遭受苦难的几率? Is my interpretation of the 'causeWork' OR correct? 我对“ causeWork”的解释是正确的还是正确的? Thanks! 谢谢!

R, to my understanding, does automatically use 0 as the reference class. 据我了解,R会自动使用0作为参考类。 For categorical variables that are not hierarchical it selects just one for the reference but I am not sure how it does so. 对于非分层的分类变量,它仅选择一个作为参考,但我不确定它是如何做到的。 Nonetheless, your interpretation of the causeWork odds ratio is correct: when the causeWork predictor goes from 0 to 1, while all other predictors are held constant, the odds that an injury will occur increases by 1.06 (or the respected confidence interval). 但是,您对causeWork比值比的解释是正确的:当causeWork预测值从0变为1时,而所有其他预测值保持不变,则发生伤害的几率将增加1.06(或受信任的置信区间)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM