- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How can I set the number of decimal places for outputted means in PROC UNIVARIATE?
I can find the option for decimal places for percentiles, but not means.
PROC UNIVARIATE DATA=Data_02_long NORMAL;
CLASS time group;
VAR
Efflux;
HISTOGRAM;
OUTPUT OUT=data_01_output mean=Efflux std=Efflux;
RUN;
PROC PRINT DATA=data_01_output;
RUN;
Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When you do a PROC PRINT, you can control the decimal places there with a format statement. For example:
format efflux 8.2;
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When you do a PROC PRINT, you can control the decimal places there with a format statement. For example:
format efflux 8.2;
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Whoops, I may have jumped the gun in accepting this as the solution. Sorry, I want to plot these means using PROC SGPLOT so I need the control the decimal places in the OUTPUT or in the PROC SGPLOT.
PROC SGPLOT data=data_01_output;
series x=time y=Efflux / lineattrs=(thickness=3px) group=group
markers markerattrs=(size=10pt) DATALABEL DATALABELATTRS=(Color=grey Family="Arial" Size=12
Style=Italic Weight=Bold);
yaxis
values=(8 to 12 BY 1) label='Efflux (Mean)'
labelattrs=(size=12pt weight=bold color=gray33)
valueattrs=(size=12pt weight=bold color=gray33)
offsetmin=0 offsetmax=0 grid minor minorcount=1;
xaxis
values=(1 to 3 BY 1) label='Timepoint'
labelattrs=(size=12pt weight=bold color=gray33)
valueattrs=(size=12pt weight=bold color=gray33)
offsetmin=0 offsetmax=0 grid minor minorcount=1;
/* FORMAT timepoint_graph timepoint_graph_.; */
TITLE "Change in Efflux Over Time (Mean)";
/* TITLE2 "PROMIS Pain Intensity Score"; */
footnote "Footnote: CONFIDENTIAL";
RUN;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@_maldini_ wrote:
Whoops, I may have jumped the gun in accepting this as the solution. Sorry, I want to plot these means using PROC SGPLOT so I need the control the decimal places in the OUTPUT or in the PROC SGPLOT.
PROC SGPLOT data=data_01_output; series x=time y=Efflux / lineattrs=(thickness=3px) group=group markers markerattrs=(size=10pt) DATALABEL DATALABELATTRS=(Color=grey Family="Arial" Size=12 Style=Italic Weight=Bold); yaxis values=(8 to 12 BY 1) label='Efflux (Mean)' labelattrs=(size=12pt weight=bold color=gray33) valueattrs=(size=12pt weight=bold color=gray33) offsetmin=0 offsetmax=0 grid minor minorcount=1; xaxis values=(1 to 3 BY 1) label='Timepoint' labelattrs=(size=12pt weight=bold color=gray33) valueattrs=(size=12pt weight=bold color=gray33) offsetmin=0 offsetmax=0 grid minor minorcount=1; /* FORMAT timepoint_graph timepoint_graph_.; */ TITLE "Change in Efflux Over Time (Mean)"; /* TITLE2 "PROMIS Pain Intensity Score"; */ footnote "Footnote: CONFIDENTIAL"; RUN;
I'm not following this at all. You don't have to control the number of decimal places in the output of PROC MEANS/PROC SUMMARY/PROC UNIVARIATE to run PROC SGPLOT.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is the current graph. I'd like to limit the decimal places to 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If all you want is means and standard deviations, you should use PROC MEANS/PROC SUMMARY rather than PROC UNIVARIATE. PROC UNIVARIATE calculates a lot of statistics that you aren't asking for, so its probably inefficient to use for this purpose.
In PROC MEANS, there is a MAXDEC= option to specify the maximum number of decimal places in the output.
Paige Miller