首页 > 解决方案 > 将置信区间添加到 R 中的摘要输出

问题描述

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

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

如何才能做到这一点 ?

标签: rregressionlmsummaryconfidence-interval

解决方案


Figured out the solution:

 # 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)

推荐阅读