Hi all,
I have two sub-samples, I also run regressions for the two samples separately. For sample1: y=x1+x2; for sample2 y=x1+x2. Now I want to test whether the two coefficients of x1 are significantly different? Should I use Wald test and how to realize it? Thanks in advance!
You create a class variable that indicates subpopulation (if you don't have one already) then fit this model
model y = subpopulation x1 x2 subpopulation*x1 subpopulation*x2;
If the term for subpopulation*x1 is significant, then this indicates there are different slopes for x1 for each subpopulation.
Thank you! Is it Wald test? Can I get wald Chi-square in this way?
In proc GLM, ask for
model y = subpopulation x1 x2 subpopulation*x1 subpopulation*x2 / solution;
to see the estimates, their standard errors and the t-statistic tests equivalent to Wald tests.
@ADou wrote:
Thank you! Is it Wald test? Can I get wald Chi-square in this way?
That depends, are you using PROC LOGISTIC because you have binary Y-values?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.