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 Super FREQ
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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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