Programming the statistical procedures from SAS

How to compare change in regression results from two models: one with N and one with N-1

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

How to compare change in regression results from two models: one with N and one with N-1

Hello, 

 

Release: 3.7 (Enterprise Edition)

Java Version: 1.7.0_151

 

I want to compare the change in F-value, R-squared value, t-value, etc of two regression models (one predictor, one criterion in each).  Right now I'm running two separate regression models as my way of comparison, but I'd like to see output that details the change as a result of running the second model which removes one observation that had high Cook's D. 

 

My code looks like this right now:

title2 'Model1 with DMUS_pre only';
proc reg data = wombat.popedataset2 plots(label)=(RStudentByLeverage CooksD);
  model dmus_post = dmus_pre / ss1 ss2 stb clb corrb influence r cli clm;
run;

*REMOVE HIGH COOK'S D STUDENT;
title2 'Model2 with DMUS_pre only MINUS ONE PARTICIPANT';
proc reg data = wombat.popedataset2 plots(label)=(RStudentByLeverage CooksD);
  model dmus_post = dmus_pre / ss1 ss2 stb clb corrb influence r cli clm;
  where participant_ ^= 804; 
run;

Thank you!


Accepted Solutions
Solution
‎05-22-2018 02:39 PM
Respected Advisor
Posts: 2,994

Re: How to compare change in regression results from two models: one with N and one with N-1


@jlp2ba wrote:

PaigeMiller, 

 

I was wondering if there was a way to identify the change in r-squared, or if I can do model 2 r-sq minus model 1 r-sq.


I would recommend actually making a plot of the data with the two different regression lines shown, and see what the difference is.

--
Paige Miller

View solution in original post


All Replies
Respected Advisor
Posts: 2,994

Re: How to compare change in regression results from two models: one with N and one with N-1

I'm not aware of any statistical test to compare a regression on n observations with a regression run on n-1 observations. In fact, the idea of doing a statistical test in this instance seems to me to be unnecessary and improper. In fact, except for some trivial situations, the R-squared and t-value are different, not in the statistical hypothesis testing framework (which doesn't make sense here), but just different because they are different numbers.

--
Paige Miller
New Contributor
Posts: 4

Re: How to compare change in regression results from two models: one with N and one with N-1

Posted in reply to PaigeMiller

PaigeMiller, 

 

Thank you for your reply.  I'm a novice at this so it may be a poor question.  I've just noticed that removing the high-influence observation improved the fit and increased the r-squared value and F-value.  I was wondering if there was a way to identify the change in r-squared, or if I can do model 2 r-sq minus model 1 r-sq.

Solution
‎05-22-2018 02:39 PM
Respected Advisor
Posts: 2,994

Re: How to compare change in regression results from two models: one with N and one with N-1


@jlp2ba wrote:

PaigeMiller, 

 

I was wondering if there was a way to identify the change in r-squared, or if I can do model 2 r-sq minus model 1 r-sq.


I would recommend actually making a plot of the data with the two different regression lines shown, and see what the difference is.

--
Paige Miller
New Contributor
Posts: 4

Re: How to compare change in regression results from two models: one with N and one with N-1

Posted in reply to PaigeMiller
Gotcha - Thank you!
Esteemed Advisor
Posts: 5,523

Re: How to compare change in regression results from two models: one with N and one with N-1

Try running

 

proc robustreg data = wombat.popedataset2;
  model dmus_post = dmus_pre / diagnostics;
run;

to see if your suspected outlier is idenfified by the procedure.

 

PG
New Contributor
Posts: 4

Re: How to compare change in regression results from two models: one with N and one with N-1

Will do - thanks for this!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 200 views
  • 3 likes
  • 3 in conversation