How to compare a coefficient from two regression

26 次查看(过去 30 天)
Dear Folk,
I would like to compare a coefficient between two regression (from difference group but same model)
For example,
I would like to compare
Y=a0+B1X1+B2X2+B3X3+B4X4 for Sample group A
Y=a0+B1X1+B2X2+B3X3+B4X4 for Sample group B
I want to test whether B3 group A is significantly different from B3 group B or not
Please kindly suggest
Worapho

回答(1 个)

Adam Danz
Adam Danz 2019-9-12
编辑:Adam Danz 2019-9-23
One way would be to compute the 95% confidence interval of the regression coefficients and determine whether they overlap (which would confirm the null hypothesis). If and only if your data do not have significant outliers, you can use the coefCI function which assumes an approximately normal distribution of error.
% mdl is the linear regression model
% CI is an nx2 matrix of [low,high] CI endpoints for each n coefficient
ci = coefCI(mdl)

类别

Help CenterFile Exchange 中查找有关 Descriptive Statistics 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by