BookmarkSubscribeRSS Feed
ADou
Calcite | Level 5

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!

4 REPLIES 4
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
ADou
Calcite | Level 5

Thank you! Is it Wald test? Can I get wald Chi-square in this way?

PGStats
Opal | Level 21

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.

PG
PaigeMiller
Diamond | Level 26

@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?

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 689 views
  • 1 like
  • 3 in conversation