BookmarkSubscribeRSS Feed
Olivia0223
Fluorite | Level 6

constant is zero.jpg

 

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

12 REPLIES 12
whymath
Lapis Lazuli | Level 10
There is a "noint" option when you are using "model" statement in SAS.
Olivia0223
Fluorite | Level 6

Olivia0223_1-1681482679641.png

Olivia0223_2-1681482685547.png

I can not find that..

Olivia0223
Fluorite | Level 6

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

Olivia0223_0-1681482881102.png

 

tom_grant
SAS Employee
Just Un-check the Intercept on the Edit Model screen
Olivia0223
Fluorite | Level 6

Thank you very much!!

I got the answer.

PaigeMiller
Diamond | Level 26

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
Olivia0223
Fluorite | Level 6

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

Olivia0223_0-1681486290799.png

 

Reeza
Super User
0.8 is a decent model, 0.98 is a model is likely overfit.
Olivia0223
Fluorite | Level 6

When I working in the SAS system the answer show looks different,I saw the coefficient intercept p value is 0.78(over 0.05) which suggests that the intercept variable is not statistically significant.

 

Olivia0223_0-1681490377035.png

 

PaigeMiller
Diamond | Level 26

@Olivia0223 wrote:

When I working in the SAS system the answer show looks different,I saw the coefficient intercept p value is 0.78(over 0.05) which suggests that the intercept variable is not statistically significant.

 


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?

PaigeMiller_0-1681493638850.pngPaigeMiller_1-1681493655692.png

 

 

 

 

 

--
Paige Miller
PaigeMiller
Diamond | Level 26

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
Olivia0223
Fluorite | Level 6

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

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 12 replies
  • 402 views
  • 11 likes
  • 5 in conversation