Turn on suggestions

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

Showing results for

- Home
- /
- Learn SAS
- /
- SAS Software for Learning Community
- /
- How to find the the "constant is zero" in SAS system ?

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-13-2023 10:04 PM
(1220 views)

Hello I 'am new ,I need to help !!How to find the the "constant is zero" in SAS system ?

12 REPLIES 12

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

There is a "noint" option when you are using "model" statement in SAS.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I can not find that..

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you!! I still can not find that...😭

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Just Un-check the Intercept on the Edit Model screen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much!!

I got the answer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I point out that there are times when using no intercept/"constant is zero" is a very poor choice. In fact, it is rare when it is the right choice. So unless you have a good reason for using no intercept/"constant is zero", don't do it.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Because my first mode was bad so I want to remove the intercept.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

0.8 is a decent model, 0.98 is a model is likely overfit.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@Olivia0223 wrote:

Intercept not significant is not really a valid reason to remove it from the model. You are forcing the model through the point x=0 y=0 which may not be a good thing to do in most cases — this is not about statistical significance. You cause the other parameter estimates to be biased; and the residuals will not add to zero. https://stats.stackexchange.com/a/7950

Lastly, just do a plot of the fit between the two different regressions. Here's made up data, we add a certain amount of soap to a dish of water, agitate the water, and then measure the height of the suds formed.

```
data suds;
input soap suds;
cards;
0.6 1.1
0.7 1.2
0.8 1.33
0.9 1.39
1 1.47
1.2 1.6
;
title 'Model with Intercept';
proc reg data=suds;
ods select fitplot;
model suds=soap;
run; quit;
title 'Model without Intercept';
proc reg data=suds;
ods select fitplot;
model suds=soap/noint;
run; quit;
```

Here are the plots, by looking at them, which do you think fits better?

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

It has been a long time since I did the math, but I believe that R-squared without an intercept has to be interpreted differently than with an intercept, and so the two R-squared values are not directly comparable.

Adding: here is a discussion, which includes the math, explaining why you shouldn't compare R-squared with intercept to R-squared without intercept. https://stats.stackexchange.com/questions/26176/removal-of-statistically-significant-intercept-term-...

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

thank you for your explaining, let me think about how to fix my model.😂

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 16. Read more here about **why** you should contribute and **what is in it** for you!

Upcoming Events

- Ask the Expert: Improving Manufacturing Product Quality With Bayesian Computation in SAS® Viya® | 17-Sep-2024
- Visit SAS at Big Data London | 18-Sep-2024
- SAS Bowl XLIII, The New SAS Developer Portal | 18-Sep-2024
- RTSUG Presents: Creating Reports Again and Again...and Again with Macro | 19-Sep-2024
- SESUG 2024 | 22-Sep-2024
- Ask the Expert: Moving to SAS® Viya® from SAS®9 | 24-Sep-2024
- Ask the Expert: Why SQL Dictionary Tables are a Game-Changer for Data Scientists | 03-Oct-2024