How to compare a coefficient from two regression

23 views (last 30 days)
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

Answers (1)

Adam Danz
Adam Danz on 12 Sep 2019
Edited: Adam Danz on 23 Sep 2019
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)

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!