You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无需构建双模型及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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:29:24