Skip to content

Commit 210a04d

Browse files
committed
fix
1 parent b247043 commit 210a04d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Suggests:
175175
mmrm,
176176
multcomp,
177177
MuMIn,
178+
mvtnorm,
178179
NbClust,
179180
nFactors,
180181
nestedLogit,

R/format_p_adjust.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ format_p_adjust <- function(method) {
112112
# sup-t adjustment
113113
insight::check_if_installed("mvtnorm")
114114
# get correlation matrix, based on the covariance matrix
115-
vc <- .safe(cov2cor(insight::get_varcov(model)))
115+
vc <- .safe(stats::cov2cor(insight::get_varcov(model)))
116116
if (is.null(vc)) {
117117
insight::format_warning("Could not calculate covariance matrix for `sup-t` adjustment.")
118118
return(params)
@@ -125,7 +125,7 @@ format_p_adjust <- function(method) {
125125
# calculate updated confidence interval level, based on simultaenous
126126
# confidence intervals (https://onlinelibrary.wiley.com/doi/10.1002/jae.2656)
127127
crit <- mvtnorm::qmvt(ci_level, df = params$df[1], tail = "both.tails", corr = vc)$quantile
128-
ci_level <- 1 - 2 * pt(-abs(crit), df = params$df[1])
128+
ci_level <- 1 - 2 * stats::pt(-abs(crit), df = params$df[1])
129129
# update confidence intervals
130130
params$CI_low <- params$Coefficient - crit * params$SE
131131
params$CI_high <- params$Coefficient + crit * params$SE

0 commit comments

Comments
 (0)