【问题标题】:statement exposure in poisson regression using R使用 R 的泊松回归中的陈述暴露
【发布时间】:2017-12-07 13:12:24
【问题描述】:

我正在尝试使用泊松回归在 R 中拟合 Frome(1983) 中的模型,但我不知道如何添加曝光:ln(person-years),模型是:

ln E(Y|X)= ln(人-年)+ B0+ B1X1+ B2X2。

你知道这有多合适吗?

【问题讨论】:

    标签: regression poisson


    【解决方案1】:

    您可以使用以下 R 代码执行泊松回归分析。

    m1<- glm(y ~ offset(log(person-years))+X1+X2, family="poisson", data=dat) summary(m1)

    因为你使用'log(person-years)'的偏移量,'log(person-years)'的系数被强制为1。

    【讨论】:

      猜你喜欢
      • 2018-05-21
      • 1970-01-01
      • 1970-01-01
      • 2012-07-09
      • 2013-07-29
      • 1970-01-01
      • 2021-06-03
      • 2017-04-20
      • 2018-08-02
      相关资源
      最近更新 更多