Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't we have similar information in estimate_means() like we have for estimate_relation()? #337

Closed
strengejacke opened this issue Jan 14, 2025 · 1 comment · Fixed by #340
Assignees
Labels
Consistency 🍏 🍎 Expected output across functions or API design could be more similar
Milestone

Comments

@strengejacke
Copy link
Member

Why do we have different footer notes? Can't we have similar information in estimate_means() like we have for estimate_relation()?

Originally posted by @strengejacke in #335 (comment)

@strengejacke
Copy link
Member Author

estimate_relation(m, by = c("c161sex", "c172code")) # reference
#> Model-based Expectation
#> 
#> c161sex |                        c172code | Predicted |   SE |         95% CI
#> -----------------------------------------------------------------------------
#> Male    |          low level of education |      9.76 | 0.73 | [ 8.32, 11.19]
#> Female  |          low level of education |     10.58 | 0.57 | [ 9.47, 11.70]
#> Male    | intermediate level of education |     10.28 | 0.58 | [ 9.14, 11.41]
#> Female  | intermediate level of education |     10.62 | 0.52 | [ 9.61, 11.63]
#> Male    |         high level of education |     10.19 | 0.73 | [ 8.75, 11.63]
#> Female  |         high level of education |     11.41 | 0.61 | [10.22, 12.60]
#> 
#> Variable predicted: neg_c_7
#> Predictors modulated: c161sex, c172code
#> Predictors controlled: c12hour (42), barthtot (65), e42dep (1)

estimate_means(m, c("c161sex", "c172code"), marginalize = "mean", backend = "marginaleffects")
#> Estimated Marginal Means
#> 
#> c161sex |                        c172code |  Mean |   SE |         95% CI | t(802)
#> ----------------------------------------------------------------------------------
#> Male    |          low level of education | 10.36 | 0.60 | [ 9.18, 11.55] |  17.22
#> Female  |          low level of education | 11.28 | 0.38 | [10.53, 12.04] |  29.39
#> Male    | intermediate level of education | 10.99 | 0.41 | [10.18, 11.79] |  26.87
#> Female  | intermediate level of education | 11.36 | 0.29 | [10.78, 11.93] |  38.56
#> Male    |         high level of education | 10.87 | 0.58 | [ 9.74, 12.01] |  18.85
#> Female  |         high level of education | 12.13 | 0.42 | [11.30, 12.95] |  28.83
#> 
#> Marginal means estimated at c161sex

@strengejacke strengejacke added the Consistency 🍏 🍎 Expected output across functions or API design could be more similar label Jan 14, 2025
@strengejacke strengejacke added this to the 1.0.0 milestone Jan 14, 2025
@strengejacke strengejacke self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Consistency 🍏 🍎 Expected output across functions or API design could be more similar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant