Repository navigation
Replies: 1 comment
|
Two things are going on. With The 10-15 rows reaching -3.19 look like an insight bug (worth an issue there). It finds each level's range by subsetting the model data with row names used as row positions ( rownames(data) <- NULL # after any sorting, filtering or na.omit()
m <- glm(..., data = data)
estimate_expectation(m, by = c("sr", "category"), length = 100)A larger |
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!
All reactions