BookmarkSubscribeRSS Feed
fridge_wpg
Obsidian | Level 7

Hi,

 

I don't have the data set of a regression model (Model A) but only the model statistics (such as slope value, Rsquare and standard error, etc.). I need to compare the slope of Model A with the Model B that I have developed using the same dependent and independent variables that belong to different populations in both models. What would be the most appropriate test to do? Please (With sas codes if possible). Thank you.

 

Fridge

 

 

 

8 REPLIES 8
Ksharp
Super User

Are you using PROC REG ?

Check TEST statement .

test b=the slope of model A ;

fridge_wpg
Obsidian | Level 7
thank you Ksharp
Reeza
Super User

I don't believe there's a default test mostly because SAS is used to process raw data nor work with summarized data. 

 

If you have the Ns you can do the test but it would be a manual calculation. 

fridge_wpg
Obsidian | Level 7

Dear Reeza,

 

Please, find attached an attachment that contains the raw data to which I had no access before. Can you please, review the SAS codes that I assembled so far to run the comparison (I don't have in-depth understanding on this topic yet). My purpose again is to compare the slopes or regression models developed by each group. Thank you again.

 

Can you recommend any article that covers comparison of regression models with some example or SAS codes (please, please)?

 

Please, feel free to ask questions. 

 

Fridge

Reeza
Super User

Have you checked out the SAS statistical e-course? It's free - support.sas.com/training/tutorial

fridge_wpg
Obsidian | Level 7
Not the ecourse yet but have finished the book "sas essentials for mastering for research". I will definitely look into the course that you have suggested...

Should I expect some input on the attachment that I just sent you? Thanks again

Fridge
Reeza
Super User

Verify your calculation of the interaction term. I suspect it's incorrect. You can see this by looking at the N from your first regression results compared to the second regression results. SAS excludes variables with missing values. 

 

FYI - usually I think  full code reviews are beyond the scope of a public forum and won't review it, this is my personal rule. Your code is small and you can include it in posts directly, not as an attachment. Most users won't download attachments so you'll get better responses. I've also moved this to the Statistical Procedures Forum where it's more approriate. 

 

 

Ksharp
Super User

For your last proc reg

 

proc reg data=Compare2;
model TEM = Yr_16 TEMR group_Intr;
run;quit;

 

It should be covariance analysis, try PROC GLM.

proc glm data=Compare2;

class Yr_16;
model TEM = Yr_16 TEMR Yr_16*TEMR/solution;
run;quit;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 2237 views
  • 2 likes
  • 3 in conversation