0
votes

I am performing robust regression using SAS. I am getting the following warning:

WARNING: The scale is close to 0. A possible exact fit is detected.

WARNING: Output 'GoodFit' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used."**

Why I am getting this warning? How can I rectify it so that Goodfit can be created? As the outttest=dataset does not have any observations in it, I am getting an error in my code as the output of outtest in used subsequently as an input further.

Code snippet is as follows:-

proc robustreg data=test method=m (wf=huber(c=1.3)) outest = fac1;
   class bucket bucket0;
   model R_res_new=xyz_ldg*bucket bucket0  abcdev_sh*bucket0 abcdev_lg*bucket0 /  noint;
   output out=fac1t residual=res;
   ods output GoodFit=fit1; 
run;

Test dataset is:-

bucket0 R_res_new     abcdev_sh      abcdev_lg    xyz_ldg     bucket
pp      0.118023674       0         0.427853531  0.622702006    aa
pp      0.2443029    -0.52011222    0            0.84582555     bb
pp      0.242459596  -0.198019513   0            3.796344334    bb
pp      0.150550397       0         0.05454537   0.57086536     bb
pp      0.093373827       0         0.855772297  0.68810985     bb
pp      0.401303208  -0.620039465   0            1.319799593    bb
1
Please add the PROC code (PROC ROBUSTREG?) you are running, and ideally a small amount of sample data that will generate the warning. Does the printed output show estimates you want, or are they not being computed at all? Any other messages in the log?Quentin
Here is the code below: proc robustreg data=crpc method=m (wf=huber(c=1.3)) outest = fac1; class bucket bucket0; model R_res_new=xyz_ldgbucket bucket0 abcdev_shbucket0 abcdev_lg*bucket0 / noint; output out=fac1t residual=res; ods output GoodFit=fit1; run;user8682462
Better to edit your question so that it includes the code. Is your problem about outest= or goodfit= or both?Quentin
I have added code snippet to the original question.Let me know if you require the input dataset as well(Though I have provided it I will format it to a more readable form).My problem is with the outtest= Its coming blank as a goodfit was not created. I want to have some kinda intercept into the same,post regression using above robust reg.user8682462

1 Answers

0
votes

I don't know PROC ROBUSTREG, but here's my guess, based on a quick skim of the docs.

You are using ods output GoodFit=fit1 to get the goodness of fit statistics (R-square, AIC, etc) written to an output dataset.

When I run your code, and look at the output, there are no goodness of fit statistics printed. If the PROC is not computing goodness of fit statistics, then they can't be written to an output dataset. They don't exist.

So the key question is, why isn't PROC ROBUSTREG computing goodness of fit statistics? I would assume this relates to the warning you get:

WARNING: The scale is close to 0. A possible exact fit is detected.

Exact Fit in a regression is typically not a good thing. Note that the standard error of each parameter estimate is 0, which is consistent with the exact fit. And to the big picture, you've got a dataset of 6 observations, and you're fitting a model with a lot of predictors. Not surprising you can get an exact fit. I cut it down to just one predictor, and it computes the fit statistics. But even then, even if it "works," a regression model based on just 6 records is pretty shaky...