BookmarkSubscribeRSS Feed
Celine_France
Calcite | Level 5

Hi everyone,

I made a quadratic regression thanks to the REG procedure. As I want to test a quadratic model without intercept, I specified the "noint" option.

Ex : proc reg data=tab; model Y = X X*X / noint; run; quit;

Now, I want to test the lack of fit of my regression. So, I know that I can do that with the RSREG procedure.

Ex : proc rsreg data=tab; model Y= X X*X / covar=1 lackfit; run; quit;

But, it computes the LOF with the intercept and I don't the intercept in the model.

I check in the SAS help but I've found no option to suppress the intercept. Does someone know how to do this ?

By advance, thanks a lot

Céline

1 REPLY 1
PGStats
Opal | Level 21

Well, it's about time somebody tries an answer. I suppose that you have a very good reason for not fitting an intercept. If you included the LACKFIT option in the MODEL statement of the REG procedure, you should see the test for lack of fit. Try for example:

data test;
call streaminit(4321);
do i = 1 to 4;
do x = 1 to 10;
  x2 = x*x;
  y = x + 0.1*x*x + rand('NORMAL',0,0.2);
  output;
end;
end;
run;

proc reg data=test;
model y = x x2 / noint lackfit;
run;

To perform this test, you need duplicate X values, because the lack of fit test (à la Draper & Smith) relies on those.

PG

PG

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1682 views
  • 0 likes
  • 2 in conversation