无需构建双模型及ANOVA,如何比较同一回归的标准化β系数?
Great question! You absolutely don't need to fit two separate models or run an ANOVA to compare standardized β coefficients from the same multiple regression model. There are much simpler, single-function approaches to do this directly with your existing model. Let's walk through the most practical methods using your example:
Method 1: Use linearHypothesis() from the car package
This is a robust, widely-used approach that leverages linear hypothesis testing to compare the standardized coefficients. Since standardized β = unstandardized β * (SD of predictor / SD of outcome), we can frame the test as checking if the scaled unstandardized coefficients are equal.
Here's how to apply it to your model:
# Load required packages library(car) library(lm.beta) # Fit your original unstandardized model (needed for hypothesis testing) fit1 <- lm(Umint_gesamt ~ Alter + Geschlecht_Dummy + SE_gesamt + CE_gesamt + EmoP_gesamt + Emp_gesamt + IN_gesamt + DN_gesamt + SozID_gesamt, data=dataset) # Calculate standard deviations for scaling sd_se <- sd(dataset$SE_gesamt, na.rm = TRUE) sd_ce <- sd(dataset$CE_gesamt, na.rm = TRUE) # Test the hypothesis that standardized β_SE = standardized β_CE # The outcome SD cancels out, so we simplify to comparing scaled unstandardized coefficients hypothesis_test <- linearHypothesis(fit1, paste0("SE_gesamt * ", sd_se, " = CE_gesamt * ", sd_ce)) # View results print(hypothesis_test)
Interpretation: Check the Pr(>F) value. If it falls below your significance threshold (e.g., 0.05), you can conclude the two standardized β coefficients are significantly different.
Method 2: Use beta_compare() from the reghelper package
For an even more streamlined workflow, the reghelper package has a dedicated function that handles all the scaling and testing automatically—no manual calculations needed:
# Install the package first if you haven't # install.packages("reghelper") library(reghelper) # Fit your original model fit1 <- lm(Umint_gesamt ~ Alter + Geschlecht_Dummy + SE_gesamt + CE_gesamt + EmoP_gesamt + Emp_gesamt + IN_gesamt + DN_gesamt + SozID_gesamt, data=dataset) # Compare the two standardized coefficients directly beta_compare(fit1, c("SE_gesamt", "CE_gesamt"))
This function outputs the difference between the standardized βs, its standard error, a t-statistic, and a p-value for the test that the difference equals zero. It’s a one-step solution tailored exactly for this use case.
Why two models/ANOVA aren't necessary
ANOVA is designed to compare overall fits of nested models, but here we’re testing a specific parameter constraint within a single model. Linear hypothesis testing targets this constraint directly, eliminating the need to refit models and making the process far more efficient.
内容的提问来源于stack exchange,提问作者Karen H

