【问题标题】:add confidence interval to summary output in R将置信区间添加到 R 中的摘要输出
【发布时间】:2019-10-18 04:46:17
【问题描述】:

我正在运行一个线性回归模型,使用逐步选择程序,并希望获得汇总表中的置信区间。我怎样才能做到这一点 ?目的是为了能够使用xtable来使用Latex中的输出

step.model <- stepAIC(full.model,direction = "both",trace = FALSE)  
summary(step.model)

如何做到这一点?

【问题讨论】:

  • 到目前为止你尝试了什么?
  • 我已经找到答案了

标签: r regression lm summary confidence-interval


【解决方案1】:

想出了解决办法:

 # add confidence interval to table
    ci <- confint(step.model)
    sum_step.model <- (cbind(Estimate = coef(sum_step.model), ci))

#print results to latex
xtable(sum_step.model)

【讨论】:

    猜你喜欢
    • 2017-07-29
    • 1970-01-01
    • 2013-10-19
    • 1970-01-01
    • 1970-01-01
    • 2017-06-17
    • 1970-01-01
    • 2021-10-21
    • 1970-01-01
    相关资源
    最近更新 更多