-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Why do the standardized beta values and CIs of a glm poisson regression model not differ from the unstandardized ones? #403
Comments
For GLMs, the response is not standardized. Therefore, in this model, nothing is standardized. |
Thank you very much for your fast response and the clarification! Again, thank you very much! |
It is not implemented by design: there is no way to "standardize" a non-numeric variable.
|
I am just wondering why i get std. values when i use the same data but fitting a lm instead of glm: |
Because for gaussian models, the response is standardized. |
I see! Thanks a lot! |
It's not super easy to find, but you can obtain results from different standardization methods using library(easystats)
#> # Attaching packages: easystats 0.7.0
#> ✔ bayestestR 0.13.1.7 ✔ correlation 0.8.4.9000
#> ✔ datawizard 0.9.0.2 ✔ effectsize 0.8.6.3
#> ✔ insight 0.19.6.7 ✔ modelbased 0.8.6.4
#> ✔ performance 0.10.8.1 ✔ parameters 0.21.3.1
#> ✔ report 0.5.7.13 ✔ see 0.8.1
set.seed(123)
anzahl_unfaelle <- rpois(100, lambda = 3) # Lambda ist der erwartete Wert
mean(anzahl_unfaelle)
#> [1] 2.94
var(anzahl_unfaelle)
#> [1] 2.622626
wetter <- factor(sample(c("regnerisch", "bewölkt", "sonnig"), 100, replace = TRUE))
daten <- data.frame(anzahl_unfaelle, wetter)
modell <- glm(anzahl_unfaelle ~ wetter, data = daten, family = "poisson")
standardize_parameters(modell, method = "basic")
#> # Standardization method: basic
#>
#> Parameter | Std. Coef. | 95% CI
#> ---------------------------------------------
#> (Intercept) | 0.00 | [ 0.00, 0.00]
#> wetterregnerisch | 1.96e-03 | [-0.13, 0.13]
#> wettersonnig | 0.03 | [-0.10, 0.16]
#>
#> - Response is unstandardized. See also the docs here: |
Not AFAIK |
Question and context
For a specific research question i fitted a generalized linear mixed model using a poisson link function due to the characteristics of my data.
For reporting purposes i used the report package and the report function. However, i noticed that the standardized coefficients and CIs are equal to the normal coefficients and CIs.
Can someone explain why?
I also fitted a glm with poisson to a randomly generated dataset and found the same after running the report(model) function.
Here is a minimal example:
The output:
The effect of wetter [regnerisch] is statistically non-significant and positive (beta = 4.45e-03, 95% CI [-0.29, 0.29], p = 0.976; Std. beta = 4.45e-03, 95% CI [-0.29, 0.29])
➞ beta = std. beta
➞ CI = std. CI
I appreciate any help!
Lukas
The text was updated successfully, but these errors were encountered: