Extract pvalue from glm

前端 未结 4 566
说谎
说谎 2021-02-02 07:05

I\'m running many regressions and am only interested in the effect on the coefficient and p-value of one particular variable. So, in my script, I\'d like to be able to just extr

4条回答
  •  庸人自扰
    2021-02-02 07:19

    Instead of the number you can put directly the name

    coef(summary(fit))[,'Pr(>|z|)']
    

    the other ones available from the coefficient summary:

    Estimate Std. Error z value Pr(>|z|)

提交回复
热议问题