BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gtjoeckel
Fluorite | Level 6

Hello,

 

I'm coming up with the following warnings when I run a GLM SELECT regression model along with PROC REG to generate diagnostics and residual plots.  The code doesn't produce the fit statistic plots I need.

 

gtjoeckel_0-1586841649999.png

Here is some sample data and the code I've used to try and generate these plots.  Any ideas on how to generate the plots to check the fit statistics of the model?

 

 data WORK.GALANEWDATA;
   infile datalines dsd truncover;
   input EquivalentFOB:BEST. Grade:$22. GrowingMethod:$10. Packaging:$10. Size:$11. EquivalentCartons:BEST. DestCategory:$8. Season:$6. CropYear:$4. DaysUntilShip:32.;
   format EquivalentFOB BEST. EquivalentCartons BEST.;
   label EquivalentFOB="EquivalentFOB" Grade="Grade" GrowingMethod="GrowingMethod" Packaging="Packaging" Size="Size" EquivalentCartons="EquivalentCartons";
 datalines;
 13.6364 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.55 Export Spring 2018 268
 12.3077 US Extra Fancy NonOrganic Tray Pack Large 152.75 Domestic Fall 2018 66
 5.527777778 WA Extra Fancy Premium NonOrganic Bags Extra Small 1.8 Domestic Summer 2017 342
 5 WA Extra Fancy Premium NonOrganic Tray Pack Small 125 Domestic Winter 2018 203
 15.3846 WA Extra Fancy Premium NonOrganic Tray Pack Large 2.925 Domestic Fall 2018 112
 15.3846 WA Extra Fancy #1 NonOrganic Tray Pack Large 2.275 Domestic Spring 2018 242
 5.25 WA Extra Fancy #1 NonOrganic Tray Pack Small 14 Domestic Fall 2018 45
 5.25 WA Extra Fancy #1 NonOrganic Tray Pack Medium 17 Domestic Fall 2018 45
 5.25 WA Extra Fancy #1 NonOrganic Tray Pack Small 116 Domestic Fall 2018 45
 6 WA Extra Fancy #2 NonOrganic Bags Extra Small 72 Domestic Winter 2017 205
 6.111111111 US Extra Fancy NonOrganic Bags Extra Small 9 Domestic Winter 2017 203
 6.111111111 WA Extra Fancy #1 NonOrganic Bags Extra Small 44.1 Domestic Spring 2017 222
 16.923076923 WA Extra Fancy Premium NonOrganic Tray Pack Large 27.625 Domestic Winter 2016 188
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 13.65 Domestic Fall 2018 110
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 27.3 Domestic Fall 2018 113
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 9.1 Domestic Fall 2018 120
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 9.1 Domestic Winter 2018 126
 6.666666667 WA Extra Fancy Premium NonOrganic Bags Extra Small 36 Domestic Winter 2017 167
 6.777777778 US Extra Fancy NonOrganic Bags Extra Small 131.4 Domestic Winter 2017 198
 6.944444444 US Extra Fancy NonOrganic Bags Extra Small 44.1 Domestic Spring 2017 238
 7.111111111 WA Extra Fancy #2 NonOrganic Bags Small 396 Domestic Winter 2017 209
 7.111111111 WA Extra Fancy #2 NonOrganic Bags Extra Small 106.2 Domestic Spring 2017 212
 7.166666667 WA Extra Fancy #2 NonOrganic Bags Extra Small 324 Domestic Spring 2017 223
 7.166666667 WA Extra Fancy #2 NonOrganic Bags Extra Small 324 Domestic Spring 2017 230
 10.4 WA Extra Fancy #1 NonOrganic Tray Pack Large 40 Domestic Spring 2018 288
 7.222222222 WA Extra Fancy #1 NonOrganic Bags Extra Small 617.4 Domestic Winter 2017 201
 7.222222222 WA Extra Fancy #1 NonOrganic Bags Extra Small 88.2 Domestic Spring 2017 225
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 9.1 Domestic Winter 2016 163
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 4.55 Domestic Winter 2016 189
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 4.55 Domestic Winter 2016 195
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 15.925 Domestic Spring 2016 218
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 140
 20 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 11.375 Domestic Winter 2016 142
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 148
 20 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 18.2 Domestic Winter 2016 148
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 163
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.325 Domestic Winter 2016 176
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 184
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.325 Domestic Winter 2016 189
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 202
 20 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 6.825 Domestic Spring 2016 209
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Spring 2016 244
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Spring 2016 279
 7.232323232 WA Extra Fancy #2 NonOrganic Bags Small 396 Domestic Winter 2017 209
 7.237777778 WA Extra Fancy #2 NonOrganic Bags Extra Small 360 Domestic Spring 2017 215
 7.334487963 WA Extra Fancy Premium NonOrganic Bags Extra Small 108 Domestic Winter 2017 164
 7.444444444 WA Extra Fancy #2 NonOrganic Bags Extra Small 122.4 Domestic Spring 2017 211
 6.75 US Extra Fancy Organic Tray Pack Large 52 Domestic Summer 2017 329
 6.75 WA Extra Fancy #1 Organic Tray Pack Large 8 Domestic Summer 2017 329
 6.75 WA Extra Fancy #1 Organic Tray Pack Large 17 Domestic Summer 2017 329
 ;;;;

ods noproctitle;
ods graphics / imagemap=on;
filename sfile '/home/gtjoeckel0/Capstone/galapredictionscoringcode.sas';

proc glmselect data=CAPSTONE.GALANEWDATA 
		outdesign(addinputvars)=Work.Glmselect_Design seed=7777;
	partition fraction(validate=0.4 test=0.1);
	class Grade GrowingMethod Packaging Size DestCategory Season CropYear / 
		param=glm;
	model EquivalentFOB=Grade GrowingMethod Packaging Size DestCategory Season 
		CropYear EquivalentCartons DaysUntilShip / selection=stepwise
(select=sl slentry=0.05 slstay=0.05) hierarchy=single;
	score out=CAPSTONE.galapredictionscoring predicted residual;
	code file=sfile;
run;

proc reg data=Work.Glmselect_Design plots(only)=(diagnostics residuals);
	ods select DiagnosticsPanel ResidualPlot;
	where Grade is not missing & GrowingMethod is not missing & Packaging is not 
		missing & Size is not missing & DestCategory is not missing & Season is not 
		missing & CropYear is not missing;
	model EquivalentFOB=&_GLSMOD /;
	run;
quit;

 

Thanks,

Garrett

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Ah, that explains it! The sample data is less than the plots cutoff, which defaults to 5,000 for scatter plots and 150,000 for heat maps. Use the MAXPOINTS=NONE option to specify that you want the plots anyway:

 

proc reg data=Work.Glmselect_Design plots(only maxpoints=none)=(diagnostics residuals);

...

quit;

 

To learn more about the PROC REG plots and heat maps, see "New heat maps in the REG procedure."

 

What I don't understand is why the SAS log didn't display a warning. I would have expected you to see a message in the log that says

WARNING: ODS graphics with more than 5000 points have been suppressed. Use
the PLOTS(MAXPOINTS= ) option in the PROC REG statement to change
or override the cutoff.

View solution in original post

10 REPLIES 10
Rick_SAS
SAS Super FREQ

The DATA step you posted does not run for me so I cannot use your data. However, the basic approach you are using valid. I suggest you check the data and also the value of the _GLSMOD macro. (Make sure it is not empty.) Here is some code that runs and shows how to perform the computation. It produces the graphs you want.

 

proc glmselect data=sashelp.cars
		outdesign(addinputvars)=Glmselect_Design seed=7777;
	partition fraction(validate=0.4 test=0.1);
	class Origin / 
		param=glm;
	model mpg_city=origin Invoice EngineSize Cylinders Horsepower Weight Wheelbase Length / selection=stepwise
(select=sl slentry=0.05 slstay=0.05) hierarchy=single;
	score out=galapredictionscoring predicted residual;
run;

%put &=_GLSMOD;

proc reg data=Work.Glmselect_Design plots(only)=(diagnostics residuals);
	ods select DiagnosticsPanel ResidualPlot;
	model mpg_city=&_GLSMOD /;
	run;
quit;
gtjoeckel
Fluorite | Level 6

Hi Rick,

 

Thank you for the response! I ran that %put statement and this is what the log showed.

 

gtjoeckel_0-1586884707533.png

 

Do you think this looks correct or would the labels being used in the macro be causing the issue.  Beyond this, when you say check the data, what about the data would be causing this to happen?

 

Also, I noticed my data step had my libref listed, not sure that was causing any issues, so I updated that. I've re linked the data below with revised data step, hopefully that helps you use the data I'm working with.

 

 data WORK.GALANEWDATA;
   infile datalines dsd truncover;
   input EquivalentFOB:BEST. Grade:$22. GrowingMethod:$10. Packaging:$10. Size:$11. EquivalentCartons:BEST. DestCategory:$8. Season:$6. CropYear:$4. DaysUntilShip:32.;
   format EquivalentFOB BEST. EquivalentCartons BEST.;
   label EquivalentFOB="EquivalentFOB" Grade="Grade" GrowingMethod="GrowingMethod" Packaging="Packaging" Size="Size" EquivalentCartons="EquivalentCartons";
 datalines;
 13.6364 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.55 Export Spring 2018 268
 12.3077 US Extra Fancy NonOrganic Tray Pack Large 152.75 Domestic Fall 2018 66
 5.527777778 WA Extra Fancy Premium NonOrganic Bags Extra Small 1.8 Domestic Summer 2017 342
 5 WA Extra Fancy Premium NonOrganic Tray Pack Small 125 Domestic Winter 2018 203
 15.3846 WA Extra Fancy Premium NonOrganic Tray Pack Large 2.925 Domestic Fall 2018 112
 15.3846 WA Extra Fancy #1 NonOrganic Tray Pack Large 2.275 Domestic Spring 2018 242
 5.25 WA Extra Fancy #1 NonOrganic Tray Pack Small 14 Domestic Fall 2018 45
 5.25 WA Extra Fancy #1 NonOrganic Tray Pack Medium 17 Domestic Fall 2018 45
 5.25 WA Extra Fancy #1 NonOrganic Tray Pack Small 116 Domestic Fall 2018 45
 6 WA Extra Fancy #2 NonOrganic Bags Extra Small 72 Domestic Winter 2017 205
 6.111111111 US Extra Fancy NonOrganic Bags Extra Small 9 Domestic Winter 2017 203
 6.111111111 WA Extra Fancy #1 NonOrganic Bags Extra Small 44.1 Domestic Spring 2017 222
 16.923076923 WA Extra Fancy Premium NonOrganic Tray Pack Large 27.625 Domestic Winter 2016 188
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 13.65 Domestic Fall 2018 110
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 27.3 Domestic Fall 2018 113
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 9.1 Domestic Fall 2018 120
 18.4615 WA Extra Fancy Premium NonOrganic Tray Pack Large 9.1 Domestic Winter 2018 126
 6.666666667 WA Extra Fancy Premium NonOrganic Bags Extra Small 36 Domestic Winter 2017 167
 6.777777778 US Extra Fancy NonOrganic Bags Extra Small 131.4 Domestic Winter 2017 198
 6.944444444 US Extra Fancy NonOrganic Bags Extra Small 44.1 Domestic Spring 2017 238
 7.111111111 WA Extra Fancy #2 NonOrganic Bags Small 396 Domestic Winter 2017 209
 7.111111111 WA Extra Fancy #2 NonOrganic Bags Extra Small 106.2 Domestic Spring 2017 212
 7.166666667 WA Extra Fancy #2 NonOrganic Bags Extra Small 324 Domestic Spring 2017 223
 7.166666667 WA Extra Fancy #2 NonOrganic Bags Extra Small 324 Domestic Spring 2017 230
 10.4 WA Extra Fancy #1 NonOrganic Tray Pack Large 40 Domestic Spring 2018 288
 7.222222222 WA Extra Fancy #1 NonOrganic Bags Extra Small 617.4 Domestic Winter 2017 201
 7.222222222 WA Extra Fancy #1 NonOrganic Bags Extra Small 88.2 Domestic Spring 2017 225
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 9.1 Domestic Winter 2016 163
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 4.55 Domestic Winter 2016 189
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 4.55 Domestic Winter 2016 195
 20 WA Extra Fancy #1 NonOrganic Tray Pack Extra Large 15.925 Domestic Spring 2016 218
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 140
 20 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 11.375 Domestic Winter 2016 142
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 148
 20 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 18.2 Domestic Winter 2016 148
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 163
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.325 Domestic Winter 2016 176
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 184
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.325 Domestic Winter 2016 189
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 202
 20 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 6.825 Domestic Spring 2016 209
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Spring 2016 244
 20 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Spring 2016 279
 7.232323232 WA Extra Fancy #2 NonOrganic Bags Small 396 Domestic Winter 2017 209
 7.237777778 WA Extra Fancy #2 NonOrganic Bags Extra Small 360 Domestic Spring 2017 215
 7.334487963 WA Extra Fancy Premium NonOrganic Bags Extra Small 108 Domestic Winter 2017 164
 7.444444444 WA Extra Fancy #2 NonOrganic Bags Extra Small 122.4 Domestic Spring 2017 211
 6.75 US Extra Fancy Organic Tray Pack Large 52 Domestic Summer 2017 329
 6.75 WA Extra Fancy #1 Organic Tray Pack Large 8 Domestic Summer 2017 329
 6.75 WA Extra Fancy #1 Organic Tray Pack Large 17 Domestic Summer 2017 329
 7.5 US Extra Fancy NonOrganic Bags Small 54.9 Domestic Winter 2017 160
 10 US Extra Fancy NonOrganic Bags Small 27 Domestic Winter 2017 160
 10 WA Extra Fancy #1 NonOrganic Bags Extra Small 242.325 Domestic Winter 2017 160
 10 WA Extra Fancy #1 Organic Euro Pack Large 1.35 Domestic Summer 2017 329
 10 WA Extra Fancy #1 Organic Euro Pack Large 2.025 Domestic Summer 2017 329
 10 WA Extra Fancy #1 Organic Euro Pack Large 2.7 Domestic Summer 2017 329
 11.25 WA Extra Fancy #1 Organic Bags Small 6 Domestic Summer 2017 329
 11.25 WA Extra Fancy Premium Organic Bags Small 3.6 Domestic Summer 2017 329
 7.5 WA Extra Fancy Premium NonOrganic Bags Extra Small 324 Domestic Spring 2017 297
 6 WA Extra Fancy Premium NonOrganic Heavy Pack Extra Small 60.95 Domestic Spring 2017 297
 6.9 WA Extra Fancy Premium NonOrganic Tray Pack Extra Small 7 Domestic Spring 2017 297
 6.9 WA Extra Fancy Premium NonOrganic Tray Pack Medium 98 Domestic Spring 2017 297
 11.04 US Extra Fancy NonOrganic Tray Pack Extra Large 11.25 Domestic Winter 2016 149
 11.04 US Extra Fancy NonOrganic Tray Pack Extra Large 13.125 Domestic Winter 2016 149
 11.04 US Extra Fancy NonOrganic Tray Pack Large 18.75 Domestic Winter 2016 149
 11.04 US Extra Fancy NonOrganic Tray Pack Extra Large 122.5 Domestic Winter 2016 149
 6.91 US Extra Fancy NonOrganic Bags Small 400 Domestic Winter 2017 184
 6.060869565 WA Extra Fancy Premium NonOrganic Heavy Pack Small 3.45 Domestic Summer 2017 342
 11.2 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 59.375 Domestic Fall 2018 122
 11.666666667 WA Extra Fancy #1 Organic Bags Small 439.8 Domestic Spring 2017 259
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 43.225 Domestic Winter 2016 121
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Small 149.5 Domestic Fall 2016 52
 11.2 US Extra Fancy NonOrganic Tray Pack Large 44.375 Domestic Winter 2017 156
 21.538461538 WA Extra Fancy #1 NonOrganic Tray Pack Large 4.55 Domestic Winter 2016 122
 21.538461538 WA Extra Fancy #1 NonOrganic Tray Pack Large 4.55 Domestic Winter 2016 129
 21.538461538 WA Extra Fancy #1 NonOrganic Tray Pack Large 6.825 Domestic Winter 2016 133
 21.538461538 WA Extra Fancy #1 NonOrganic Tray Pack Large 0.325 Domestic Summer 2017 357
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Fall 2016 93
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Fall 2016 101
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 119
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 129
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Winter 2016 133
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Extra Large 0.975 Domestic Summer 2016 301
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.975 Domestic Spring 2017 211
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.65 Domestic Spring 2017 219
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.975 Domestic Spring 2017 226
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 1.3 Domestic Spring 2017 243
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 1.3 Domestic Spring 2017 259
 21.538461538 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.975 Domestic Spring 2017 275
 7.788671024 WA Extra Fancy #1 NonOrganic Bags Extra Small 275.4 Domestic Winter 2017 198
 7.833430556 WA Extra Fancy #1 NonOrganic Bags Extra Small 201.6 Domestic Spring 2017 220
 7.8778 WA Extra Fancy Premium NonOrganic Bags Small 72 Domestic Fall 2018 74
 7.91362963 WA Extra Fancy #1 NonOrganic Bags Extra Small 396.9 Domestic Spring 2017 211
 10.584901842 WA Extra Fancy #1 NonOrganic Euro Pack Medium 494.1 Export Winter 2017 166
 8.055555556 WA Extra Fancy #1 NonOrganic Bags Extra Small 44.1 Domestic Spring 2017 297
 10.82962963 WA Extra Fancy #1 NonOrganic Euro Pack Large 20.25 Domestic Summer 2016 315
 8.266493056 WA Extra Fancy #1 NonOrganic Bags Extra Small 460.8 Domestic Winter 2017 198
 8.333333333 WA Extra Fancy Premium NonOrganic Bags Extra Small 72 Domestic Spring 2017 261
 8.333333333 WA Extra Fancy Premium NonOrganic Bags Extra Small 45 Domestic Spring 2017 259
 8.365142857 WA Extra Fancy #1 NonOrganic Bags Extra Small 308.7 Domestic Spring 2017 220
 ;;;;

ods noproctitle;
ods graphics / imagemap=on;

proc glmselect data=work.galanewdata 
		outdesign(addinputvars)=Work.Glmselect_Design plots=(criterionpanel) 
		seed=7777;
	partition fraction(validate=0.4 test=0.1);
	class Grade GrowingMethod Packaging Size DestCategory Season CropYear / 
		param=glm;
	model EquivalentFOB=Grade GrowingMethod Packaging Size DestCategory Season 
		CropYear EquivalentCartons DaysUntilShip / selection=stepwise
(select=sl slentry=0.05 slstay=0.05) hierarchy=single;
run;

%put &=_GLSMOD;

proc reg data=Work.Glmselect_Design plots(only)=(diagnostics residuals);
	ods select DiagnosticsPanel ResidualPlot;
	model EquivalentFOB=&_GLSMOD /;
	run;
quit;

Thanks,

Garrett

 

Rick_SAS
SAS Super FREQ

1 data WORK.GALANEWDATA;
2 infile datalines dsd truncover;
3 input EquivalentFOB:BEST. Grade:$22. GrowingMethod:$10.
3 ! Packaging:$10. Size:$11. EquivalentCartons:BEST. DestCategory:$8.
3 ! Season:$6. CropYear:$4. DaysUntilShip:32.;
4 format EquivalentFOB BEST. EquivalentCartons BEST.;
5 label EquivalentFOB="EquivalentFOB" Grade="Grade"
5 ! GrowingMethod="GrowingMethod" Packaging="Packaging" Size="Size"
5 ! EquivalentCartons="EquivalentCartons";
6 datalines;

NOTE: Invalid data for EquivalentFOB in line 7 1-86.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----
7 13.6364 WA Extra Fancy Premium NonOrganic Tray Pack Large 0.55
65 Export Spring 2018 268
EquivalentFOB=. Grade= GrowingMethod= Packaging= Size=
EquivalentCartons=. DestCategory= Season= CropYear= DaysUntilShip=.
_ERROR_=1 _N_=1
NOTE: Invalid data for EquivalentFOB in line 8 1-79.
8 12.3077 US Extra Fancy NonOrganic Tray Pack Large 152.75 Domest
65 ic Fall 2018 66
EquivalentFOB=. Grade= GrowingMethod= Packaging= Size=
EquivalentCartons=. DestCategory= Season= CropYear= DaysUntilShip=.
_ERROR_=1 _N_=2

...

gtjoeckel
Fluorite | Level 6

Sorry Rick, I realize now I should always check my data steps I post to verify their functioning.  Here's corrected data step. Although when I run this data through the PROC GLMSELECT and PROC REG for the diagnostic plots it works. 

 

I'm thinking at this point is has something to do with my data formatting/labeling?  Any guidance?

 

 data WORK.GALANEWDATA;
 	infile datalines dlm=',';
 	length Grade$ 22 GrowingMethod$ 10 Package$ 10 Size$ 12 DestCategory$ 8 Season$ 6 CropYear$ 4;
 	input EquivalentFOB Grade$ GrowingMethod$ Package$ Size$ EquivalentCartons DestCategory$ Season$ CropYear$ DaysUntilShip;  
 datalines;
 13.6364, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 0.55, Export, Spring, 2018, 268
 12.3077, US Extra Fancy, NonOrganic, Tray Pack, Large, 152.75, Domestic, Fall, 2018, 66
 5.527777778, WA Extra Fancy Premium, NonOrganic, Bags, Extra Small, 1.8, Domestic, Summer, 2017, 342
 5, WA Extra Fancy Premium, NonOrganic, Tray Pack, Small, 125, Domestic, Winter, 2018, 203
 15.3846, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 2.925, Domestic, Fall, 2018, 112
 15.3846, WA Extra Fancy #1, NonOrganic, Tray Pack, Large, 2.275, Domestic, Spring, 2018, 242
 5.25, WA Extra Fancy #1, NonOrganic, Tray Pack, Small, 14, Domestic, Fall, 2018, 45
 5.25, WA Extra Fancy #1, NonOrganic, Tray Pack, Medium, 17, Domestic, Fall, 2018, 45
 5.25, WA Extra Fancy #1, NonOrganic, Tray Pack, Small, 116, Domestic, Fall, 2018, 45
 6, WA Extra Fancy #2, NonOrganic, Bags, Extra Small, 72, Domestic, Winter, 2017, 205
 6.111111111, US Extra Fancy, NonOrganic, Bags, Extra Small, 9, Domestic, Winter, 2017, 203
 6.111111111, WA Extra Fancy #1, NonOrganic, Bags, Extra Small, 44.1, Domestic, Spring 2017, 222
 16.923076923, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 27.625, Domestic, Winter, 2016, 188
 18.4615, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 13.65, Domestic, Fall, 2018, 110
 18.4615, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 27.3, Domestic, Fall, 2018, 113
 18.4615, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 9.1, Domestic, Fall, 2018, 120
 18.4615, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 9.1, Domestic, Winter, 2018, 126
 6.666666667, WA Extra Fancy Premium, NonOrganic, Bags, Extra Small, 36, Domestic, Winter, 2017, 167
 6.777777778, US Extra Fancy, NonOrganic, Bags, Extra Small, 131.4, Domestic, Winter, 2017, 198
 6.944444444, US Extra Fancy, NonOrganic, Bags, Extra Small, 44.1, Domestic, Spring, 2017, 238
 7.111111111, WA Extra Fancy #2, NonOrganic, Bags, Small, 396, Domestic, Winter, 2017, 209
 7.111111111, WA Extra Fancy #2, NonOrganic, Bags, Extra Small, 106.2, Domestic, Spring, 2017, 212
 7.166666667, WA Extra Fancy #2, NonOrganic, Bags, Extra Small, 324, Domestic, Spring, 2017, 223
 7.166666667, WA Extra Fancy #2, NonOrganic, Bags, Extra Small, 324, Domestic, Spring, 2017, 230
 10.4, WA Extra Fancy #1, NonOrganic, Tray Pack, Large, 40, Domestic, Spring, 2018, 288
 7.222222222, WA Extra Fancy #1, NonOrganic, Bags, Extra Small, 617.4, Domestic, Winter, 2017, 201
 7.222222222, WA Extra Fancy #1, NonOrganic, Bags, Extra Small, 88.2, Domestic, Spring, 2017, 225
 20, WA Extra Fancy #1, NonOrganic, Tray Pack, Extra Large, 9.1, Domestic, Winter, 2016, 163
 20, WA Extra Fancy #1, NonOrganic, Tray Pack, Extra Large, 4.55, Domestic, Winter, 2016, 189
 20, WA Extra Fancy #1, NonOrganic, Tray Pack, Extra Large, 4.55, Domestic, Winter, 2016, 195
 20, WA Extra Fancy #1, NonOrganic, Tray Pack, Extra Large, 15.925, Domestic, Spring, 2016, 218
 20, WA Extra Fancy Premium, NonOrganic, Tray Pack, Large, 0.65, Domestic, Winter, 2016, 140
 ;;;;

Thanks,

Garrett

Rick_SAS
SAS Super FREQ

I don't think it is formats or labels. My suggestion that you "check the data" means that you should look at the input data and make sure it is correct. For example, if you imported it from an Excel spread sheet, it might have a missing value or something else that corrupted the data set. The fact that your code works for this subset of the data makes me think something else is going on, although I am mostly guessing.

 

How is the GALANEWDATA data set created in real life?

 

gtjoeckel
Fluorite | Level 6

It's an excel file that I created out of a Microsoft Access export.  I imported the excel file into SAS Studio.  I have done some manipulations on it to transform some of the variables.  I went back and used a few fields from the original imported excel dataset and got the same result.  I've checked for missing observations and there are none.

Rick_SAS
SAS Super FREQ

How many observations in the data?

gtjoeckel
Fluorite | Level 6

Just under 200k

Rick_SAS
SAS Super FREQ

Ah, that explains it! The sample data is less than the plots cutoff, which defaults to 5,000 for scatter plots and 150,000 for heat maps. Use the MAXPOINTS=NONE option to specify that you want the plots anyway:

 

proc reg data=Work.Glmselect_Design plots(only maxpoints=none)=(diagnostics residuals);

...

quit;

 

To learn more about the PROC REG plots and heat maps, see "New heat maps in the REG procedure."

 

What I don't understand is why the SAS log didn't display a warning. I would have expected you to see a message in the log that says

WARNING: ODS graphics with more than 5000 points have been suppressed. Use
the PLOTS(MAXPOINTS= ) option in the PROC REG statement to change
or override the cutoff.

gtjoeckel
Fluorite | Level 6

Rick,

 

This worked! I went back to check the method without this option and the log did give me that warning message, for some reason I just really focused in on the other error messages.

 

I'm new to SAS, and the forums, and I have learned a lot, like making sure I include data code (that actually works), and to make sure to include all of the warnings on my questions, not just parts!  That would have saved a lot of time.

 

Thank you again Rick.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 10 replies
  • 971 views
  • 2 likes
  • 2 in conversation