Closed jorgemmteixeira closed 1 week ago
@bwiernik @mattansb do you know if there's an analytical solution? Else, I would just do bootstrapping.
Yeah take the CI for sigma for a gaussian model and multiple the bounds by (n - 1)/n
I think we have CI for sigma somewhere? I remember that being one of the earlier things I added
I think you added the code for r2()
:
https://github.com/easystats/performance/blob/main/R/r2_ci.R
(n - 1)/n ... Is n the number of obs or IDs? Thank you
CI_high Does not cover sigma.
library(lme4)
library(performance)
dat <- read.csv("https://stats.idre.ucla.edu/stat/data/demo3.csv")
m1 <- lmer(pulse ~ time + (1 | id), data = dat)
# TEM/rmse
performance_rmse(m1, normalized = FALSE)
# Calculate sigma with confidence interval
sigma_ci <- get_sigma(m1, ci=0.95)
print(sigma_ci)
# low_rsme
1.995201 * ((n - 1)/n)
Like this?
library(lme4)
#> Loading required package: Matrix
library(performance)
library(datawizard)
dat <- data_read("https://stats.idre.ucla.edu/stat/data/demo3.csv")
m1 <- lmer(pulse ~ time + (1 | id), data = dat)
rmse(m1, ci = 0.95)
#> RMSE | 95% CI
#> -------------------
#> 3.29 | [2.03, 4.38]
Created on 2024-07-05 with reprex v2.1.0
I get an error:
rmse(m1, ci = 0.95) Error in rmse(m1, ci = 0.95) : unused argument (ci = 0.95)
You must install the latest GitHub version from performance, the new feature is currently only in the development version. See the README me for installation instructions: https://easystats.github.io/performance/
Run install.packages("performance", repos = "https://easystats.r-universe.dev")
.
Perfect. Thank you for all the great support.
Hi. Is it possible to get the 95 CI for rmse? Thank you