turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to compare change in regression results from t...

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-10-2018 04:34 PM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jlp2ba

05-11-2018 06:44 AM

@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

Paige Miller

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jlp2ba

05-10-2018 05:52 PM

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

05-10-2018 06:35 PM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jlp2ba

05-11-2018 06:44 AM

@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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

05-11-2018 10:14 AM

Gotcha - Thank you!

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jlp2ba

05-11-2018 01:12 AM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PGStats

05-11-2018 10:15 AM

Will do - thanks for this!