<?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: Plotting Means by Groups (Proc GLM) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864776#M42763</link>
    <description>&lt;P&gt;What exactly does "Below is a graph I have, but it's not what I'm going for. I would like to have the guideline_levels together. ". Together where?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I see the x axis values are "together", as in "Adequate" is together.&lt;/P&gt;
&lt;P&gt;If you mean the 0/1 suffix then you should pay attention to that order. If your variable is CHARACTER it will sort alphabetically by default for the Xaxis variable. If you want the 0/1 together change the value to start with 0 or 1.&lt;/P&gt;
&lt;P&gt;Otherwise provide actual data as a working data set and tell us explicitly what order you want, where.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also don't see any plot options in your code.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 10:07:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-03-17T10:07:10Z</dc:date>
    <item>
      <title>Plotting Means by Groups (Proc GLM)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864729#M42759</link>
      <description>&lt;P&gt;Hi! I hope my title makes sense and my problem also makes sense!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm comparing lsmeans of groups of people who meet exercise minute guidelines (variable=&lt;SPAN&gt;guideline_levels, and the groupings are none, insufficient, adequate, and high). And I want to look at their cardiovascular score (iCVH). With the&amp;nbsp;guideline_levels, I want to group compare means by APO (adverse pregnancy outcomes).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FYI: The other variables in my code are age, time between visits, race, insurance status, and smoking status. These are just additional variables for my model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is a graph I have, but it's not what I'm going for. I would like to have the guideline_levels together.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.PNG" style="width: 673px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81700i7705975C9EAC1F4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas.PNG" alt="sas.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc glm data= exercise.analyticsample;
	class guideline_levels (ref='None') APO crace Insurance Smoking;
	model iCVH_v5 = guideline_levels age_at_v1 time_bw_cv_ped crace Insurance Smoking APO guideline_levels*APO;
	lsmeans guideline_levels*APO / cl obsmargins;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2023 03:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864729#M42759</guid>
      <dc:creator>chester2018</dc:creator>
      <dc:date>2023-03-17T03:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means by Groups (Proc GLM)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864776#M42763</link>
      <description>&lt;P&gt;What exactly does "Below is a graph I have, but it's not what I'm going for. I would like to have the guideline_levels together. ". Together where?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I see the x axis values are "together", as in "Adequate" is together.&lt;/P&gt;
&lt;P&gt;If you mean the 0/1 suffix then you should pay attention to that order. If your variable is CHARACTER it will sort alphabetically by default for the Xaxis variable. If you want the 0/1 together change the value to start with 0 or 1.&lt;/P&gt;
&lt;P&gt;Otherwise provide actual data as a working data set and tell us explicitly what order you want, where.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also don't see any plot options in your code.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 10:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864776#M42763</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-17T10:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means by Groups (Proc GLM)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864893#M42770</link>
      <description>&lt;P&gt;I was talking about grouping the&amp;nbsp;&lt;SPAN&gt;guideline_levels&amp;nbsp;as one. I would like to have 4 values in the x-axis, and not 8.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 15:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864893#M42770</guid>
      <dc:creator>chester2018</dc:creator>
      <dc:date>2023-03-17T15:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means by Groups (Proc GLM)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864917#M42771</link>
      <description>&lt;P&gt;Create a format that groups variable values.&lt;/P&gt;
&lt;P&gt;Maybe (since I am still not sure which actual groups you want)&lt;/P&gt;
&lt;PRE&gt;Proc format;
value $guide
'Adequate 0', 'Adequate 1' ='Adequate'
&amp;lt;repeat as needed, I'm too lazy to type a bunch of stuff from a picture&amp;gt;
;

and add to your GLM code:

format Guideline_levels $guide. ;
You will need to change the Class reference value to the new formatted value as well.&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2023 16:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-Means-by-Groups-Proc-GLM/m-p/864917#M42771</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-17T16:14:41Z</dc:date>
    </item>
  </channel>
</rss>

