Calculating by-group estimates and CIs for a random intercept grouping variable in `lmer()`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
Research direction
Start with the reproducible lmer() example in the issue and compare coef(model) with standard_error(model, effects = "random"). Determine whether those results represent by-group estimates and whether parameters has an existing confidence-interval entry point for them. Done means the supported behavior and CI approach are established and documented or implemented, with the example used for verification.
Written by the indexing model from the issue text.
Description
Hi there,
I am trying to extract by-group marginal means and their CIs of an lmer() model with group as a random effect. For example:
library(lme4)
library(tidyverse)
library(parameters)
data <- read_csv("https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv") %>%
drop_na()
model <- lmer(flipper_length_mm ~ bill_depth_mm + (bill_depth_mm | species),
data = data)
I can access the bill_depth_mm estimate for each species by using coef(model), but I was wondering if it is possible to get the CIs with parameters. Reading the tutorials, I realized that I can get SEs using:
standard_error(model, effects= "random")
I was wondering if these are SEs for the by-group estimates and if calculating CIs manually makes sense here. Is there any function in parameters that I am missing for calculating CIs?
- Dominant language
- R
- Stars
- 499
- Forks
- 45
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from easystats/parameters
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
easystats/parameters#1254 ·
-
easystats/parameters#1248 · 1 assignee ·
-
Consistency :green_apple: :apple:
Difficulty 3/5 1-2 days Newbie friendliness 55/100
easystats/parameters#1247 ·
-
Bug :bug:
Difficulty 4/5 3-5 days Newbie friendliness 56/100
easystats/parameters#1243 · 2 comments ·
-
3 investigators :grey_question::question: Bug :bug:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
easystats/parameters#1242 · 1 comment ·
All issues in easystats/parameters
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100