<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Display n, mean, and SD of ordinal variable in best manner in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710862#M20871</link>
    <description>&lt;P&gt;Thanks for your response. Statistician wrote back to me and she is saying that n, mean, SD should be marked for each data point in the figure. Do you know how to do that? I am only aware of datalabel statement in SG plot.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jan 2021 17:16:03 GMT</pubDate>
    <dc:creator>tarheel13</dc:creator>
    <dc:date>2021-01-12T17:16:03Z</dc:date>
    <item>
      <title>Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710845#M20869</link>
      <description>&lt;P&gt;I am making a plot of mean and SD of an ordinal variable. Shell says to display n, mean, SD in appropriate manner. Anyone have suggestion on how to display n? I am plotting the ordinal variable over different study days.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=dsn;&lt;/P&gt;&lt;P&gt;vline folderseq / response=ordinal_visit stat=mean limitstat=stddev markers;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lrackley_0-1610467688487.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53412i02F350535211FA11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lrackley_0-1610467688487.png" alt="lrackley_0-1610467688487.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 16:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710845#M20869</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T16:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710853#M20870</link>
      <description>&lt;P&gt;In PROC SGPLOT, you can use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n1waawwbez01ppn15dn9ehmxzihf.htm&amp;amp;locale=en#n1eufrvegbi4djn1y2k2iu92d896b" target="_self"&gt;VBOX&lt;/A&gt; statement with the DISPLAYSTATS= option. You could also use the NOTCHES option, where the smaller the "notch", the bigger the N.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In PROC BOXPLOT, you can use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_boxplot_syntax06.htm&amp;amp;locale=en#statug.boxplot.opt_boxwidth" target="_self"&gt;BOXWIDTHSCALE=&lt;/A&gt; option to make the width of the boxplot proportional to N.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 16:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710853#M20870</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-01-12T16:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710862#M20871</link>
      <description>&lt;P&gt;Thanks for your response. Statistician wrote back to me and she is saying that n, mean, SD should be marked for each data point in the figure. Do you know how to do that? I am only aware of datalabel statement in SG plot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:16:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710862#M20871</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T17:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710864#M20872</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181158"&gt;@tarheel13&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your response. Statistician wrote back to me and she is saying that n, mean, SD should be marked for each data point in the figure.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does that mean for each DATE (not data point) on the x-axis?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710864#M20872</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-01-12T17:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710868#M20873</link>
      <description>&lt;P&gt;No, I don't think she means date. I have to get the mean, SD, and N for each study day and then the disease severity (moderate, severe, or all subjects). I imagine she would mean display mean, SD, and N for each point. If I specify datalabel, that will put the label for each marker on the figure. However, it sounds like she wants the SD and N too and that's what I was asking.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See direct quote: "For the first line, I am saying that the N, Mean, standard deviation for each point should be marked in some manner in the figure for each data point of the figure."&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710868#M20873</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T17:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710870#M20874</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;"For the first line, I am saying that the N, Mean, standard deviation for each point should be marked in some manner in the figure for each data point of the figure."&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe we're just getting confused because you have one interpretation of those words and I have a different interpretation, but in my interpretation, a data point does not have an N, it does not have a mean and it does not have a standard deviation. (Or trivially, N=1 for each data point). In my interpretation, the x-axis positions on your plot (which are days) do have an N, a mean and a standard deviation, and I already explained how to create a boxplot that includes those values either graphically or textually.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710870#M20874</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-01-12T17:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710871#M20875</link>
      <description>&lt;P&gt;Do you mean this?&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/12/23/box-plot-with-stat-table-and-markers/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2015/12/23/box-plot-with-stat-table-and-markers/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like the table underneath?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710871#M20875</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T17:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710874#M20876</link>
      <description>Reporting a Standard Deviation and Mean for an Ordinal variable seems weird to be honest. Usually just counts and percentages are reported, though most frequent/median would also be of interest. I find it hard to understand how SD would be useful here.</description>
      <pubDate>Tue, 12 Jan 2021 17:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710874#M20876</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-12T17:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710875#M20877</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181158"&gt;@tarheel13&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Do you mean this?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/12/23/box-plot-with-stat-table-and-markers/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/graphicallyspeaking/2015/12/23/box-plot-with-stat-table-and-markers/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like the table underneath?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I gave links to what I meant. But that link works too.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:56:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710875#M20877</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-01-12T17:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710880#M20878</link>
      <description>&lt;P&gt;Because it is a 1-8 scale of disease severity. I did not write the SAP so just trying to program according to SAP and shell. It is a measure of disease severity. So 8 means the patient is about to die and 1 is stable. Recovery is defined as this score reaching 1,2, or 3.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 18:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710880#M20878</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T18:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710882#M20879</link>
      <description>&lt;P&gt;I can get you most of the way there:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=dsn;
vline folderseq / response=ordinal_visit stat=mean limitstat=stddev markers;
xaxistable ordinal / stat=mean location=inside;
xaxistable ordinal / stat=freq location=inside;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Unfortunately, you cannot currently compute the SD in the axis table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 18:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710882#M20879</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-01-12T18:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710886#M20880</link>
      <description>&lt;P&gt;Thank you. I will try this. The only other idea I have is to output a dataset from proc means and then do something like this:&lt;/P&gt;&lt;P&gt;proc means data=visits n mean stddev maxdec=2;&lt;/P&gt;&lt;P&gt;class sev folderseq;&lt;/P&gt;&lt;P&gt;var ordinal_visit;&lt;/P&gt;&lt;P&gt;output out=MeanOut n=n mean=mean stddev=SD;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=summary;&lt;/P&gt;&lt;P&gt;series x=folderseq y=mean/group=sev;&lt;/P&gt;&lt;P&gt;scatter x=folderseq y=mean / group=sev yerrrorlower=lowerSD yerrorupper=upperSD;&lt;/P&gt;&lt;P&gt;xaxistable SD;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I don't really like how this looks lol. And for some reason, my formats of folderseq are not showing up. I had them set up to display Day 1, Day 3, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lrackley_0-1610476317470.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53422i2FC60825BF389838/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lrackley_0-1610476317470.png" alt="lrackley_0-1610476317470.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 18:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710886#M20880</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T18:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710892#M20881</link>
      <description>A 100% stacked bar chart would also show this quite nicely IMO.&lt;BR /&gt;&lt;A href="https://chartio.com/learn/charts/stacked-bar-chart-complete-guide/#percentage-stacked-bar-chart" target="_blank"&gt;https://chartio.com/learn/charts/stacked-bar-chart-complete-guide/#percentage-stacked-bar-chart&lt;/A&gt;</description>
      <pubDate>Tue, 12 Jan 2021 18:47:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710892#M20881</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-12T18:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710893#M20882</link>
      <description>&lt;P&gt;This should work for you:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=sashelp.class nway;
class age sex;
var weight;
output out=tempdata mean=Mean n=N stddev=StdDev;
run;

data tempdata2;
set tempdata;
lowerSD = Mean - StdDev;
upperSD = Mean + StdDev;
run;

proc sgplot data=tempdata2;
series x=age y=mean / group=sex;
scatter x=age y=mean / group=sex yerrorlower=lowerSD yerrorupper=upperSD;
xaxistable  N Mean StdDev / location=inside;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jan 2021 18:49:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710893#M20882</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-01-12T18:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Display n, mean, and SD of ordinal variable in best manner</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710908#M20883</link>
      <description>&lt;P&gt;She just told me that she needs to be able to estimate N, mean, SD for each data point. I do not know "appropriate manner" to display that. I was going to just print number of subjects underneath the figure and use datalabel statement to get mean for each point. I think the limitstat=stddev already shows the SD fine but it's not my call.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;we do have stacked bar chart of ordinal scores in another version of shells. This figure is supposed to be for DSMB though.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 19:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Display-n-mean-and-SD-of-ordinal-variable-in-best-manner/m-p/710908#M20883</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-12T19:26:23Z</dc:date>
    </item>
  </channel>
</rss>

