I am trying to create a histogram with the following code
Options pagesize=45;
Data Fish;
Input time quality @@;
Cards;
0 8.5
0 8.4
3 7.9
3 8.1
6 7.8
6 7.6
9 7.3
9 7.0
12 6.8
12 6.7
;
Run;
Proc Reg;
Model quality=time;
plot quality*time='*';
plot R.*P.='?';
plot R.*time='@';
output out=error R=resid;
Run;
Proc Chart;
vbar resid;
run;
The following errors occur
I appears that ODS Graphics is somehow turn off in your case. Also, use PROC SGPLOT instead of PROC CHART. Try this:
ods graphics on;
Proc Reg;
Model quality=time;
plot quality*time='*';
plot R.*P.='?';
plot R.*time='@';
output out=error R=resid;
Run;
Proc sgplot data=error;
vbar resid;
run;
Hope this helps!
Dan
I appears that ODS Graphics is somehow turn off in your case. Also, use PROC SGPLOT instead of PROC CHART. Try this:
ods graphics on;
Proc Reg;
Model quality=time;
plot quality*time='*';
plot R.*P.='?';
plot R.*time='@';
output out=error R=resid;
Run;
Proc sgplot data=error;
vbar resid;
run;
Hope this helps!
Dan
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.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.