summary.eRm confint:95% 置信区间或使用摘要时为 97.5%(rasch.model)

summary.eRm confint: 95% confidence interval or 97.5% when using summary(rasch.model)

我刚刚使用 eRm 包深入研究了 R,以了解 confint 如何计算 Rasch 模型的置信区间。 使用

getAnywhere(summary.eRm)

我发现实际使用confint的代码是这样的:

function (object, ...) 
{
    cat("\n")
    cat("Results of", object$model, "estimation: \n")
    cat("\n")
    cat("Call: ", deparse(object$call), "\n")
    cat("\n")
    cat("Conditional log-likelihood:", object$loglik, "\n")
    cat("Number of iterations:", object$iter, "\n")
    cat("Number of parameters:", object$npar, "\n")
    cat("\n")
    X <- object$X
    X01 <- object$X01
    mt_vek <- apply(X, 2, max, na.rm = TRUE)
    **ci <- confint(object, "eta")**
    if (object$model %in% c("RM", "RSM", "PCM")) 
        if (is.null(object$call$W)) {
            cat("Item (Category) Difficulty Parameters (eta):")
        }
        else {
            cat("Item (Category) Parameters (eta):\nBased on design matrix W =", 
                deparse(object$call$W))
        }
    else cat("Basic Parameters eta")
    cat(" with 0.95 CI:\n")
    coeftable <- as.data.frame(cbind(round(object$etapar, 3), 
        round(object$se.eta, 3), round(ci, 3)))
    colnames(coeftable) <- c("Estimate", "Std. Error", "lower CI", 
        "upper CI")
    rownames(coeftable) <- names(object$etapar)
    print(coeftable)
    **ci <- confint(object, "beta")**
    cat("\nItem Easiness Parameters (beta) with 0.95 CI:\n")
    coeftable <- cbind(round(object$betapar, 3), round(object$se.beta, 
        3), round(ci, 3))
    colnames(coeftable) <- c("Estimate", "Std. Error", "lower CI", 
        "upper CI")
    rownames(coeftable) <- names(object$betapar)
    print(coeftable)
    cat("\n")
}

现在查看 ?confint 菜单,我发现如果没有指定其他内容,它默认为 97.5% CI。这是否意味着计算的 CI 被错误命名为 CI 95%?

95% 置信区间表示区间外的总面积为 5%。这被分配到置信下限以下 2.5% 和置信上限以上 2.5%。区间的顶端在 97.5%-ile,区间的底端在 2.5%-ile。

示例:15 名男性样本产生的平均脑容量为 1210cc, 标准偏差为 37cc。对于这个总体,我们可以计算 95% 的置信区间如下:

1210 + c(-1,1) * (37/sqrt(15))*qt(.975,15)

...和输出。

> 1210 + c(-1,1) * (37/sqrt(15))*qt(.975,15)
[1] 1189.637 1230.363
>

请注意,我们使用 qt(.975,15) 来计算间隔,而不是 qt(.95,15)

此外,confint() 的帮助证实了这一点: