You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am confused why predicted values are not provided across the full range of observed values for sr within each factor level?
The categories 16-40, 41-80, and 80+ have observed sr values outside the predicted range (smaller than predicted), while for category 10-15 the range is extended:
data %>% group_by(category) %>% summarize(min = min(sr))
# A tibble: 5 × 2
category min
<fct> <dbl>
1 10-15 -2.21
2 16-40 -2.21
3 41-80 -2.21
4 80+ -3.19
With pred <- estimate_expectation(m, by = c("sr", "category"), preserve_range = FALSE), the response is predicted across the full global range of sr for all the category levels:
I would highly appreciate it if someone could explain why this happens! Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have used estimate_expectations to visualize the interaction between a factor (category) and a continuous variable (sr).
I am confused why predicted values are not provided across the full range of observed values for sr within each factor level?
The categories 16-40, 41-80, and 80+ have observed sr values outside the predicted range (smaller than predicted), while for category 10-15 the range is extended:
With

pred <- estimate_expectation(m, by = c("sr", "category"), preserve_range = FALSE), the response is predicted across the full global range of sr for all the category levels:I would highly appreciate it if someone could explain why this happens! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions