<?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 Find the average post-intervention umaqs score for each patient in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862210#M42617</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a dataset called wide1 with the following id variables which represent each individual. Here is a sample of my data below.&lt;/P&gt;&lt;P&gt;How would I find the average post-intervention umaqs score for each patient? umaqs0 is measure before intervention, umaqs6- umaqs26 is measure post intervention.&lt;/P&gt;&lt;P&gt;I want using the code below but am not sure if this is right.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc means data=wide1;&lt;BR /&gt;var umaqs6 umaqs12 umaqs26;&lt;BR /&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs ID Group _NAME_ umaqs0 umaqs6 umaqs12 umaqs26123456 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;14789&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15170&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15611&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15697&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15844&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15846&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 03 Mar 2023 20:44:47 GMT</pubDate>
    <dc:creator>CathyVI</dc:creator>
    <dc:date>2023-03-03T20:44:47Z</dc:date>
    <item>
      <title>Find the average post-intervention umaqs score for each patient</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862210#M42617</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a dataset called wide1 with the following id variables which represent each individual. Here is a sample of my data below.&lt;/P&gt;&lt;P&gt;How would I find the average post-intervention umaqs score for each patient? umaqs0 is measure before intervention, umaqs6- umaqs26 is measure post intervention.&lt;/P&gt;&lt;P&gt;I want using the code below but am not sure if this is right.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc means data=wide1;&lt;BR /&gt;var umaqs6 umaqs12 umaqs26;&lt;BR /&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs ID Group _NAME_ umaqs0 umaqs6 umaqs12 umaqs26123456 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;14789&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15170&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15611&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15697&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15844&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15846&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;umaqs&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2023 20:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862210#M42617</guid>
      <dc:creator>CathyVI</dc:creator>
      <dc:date>2023-03-03T20:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find the average post-intervention umaqs score for each patient</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862216#M42618</link>
      <description>&lt;P&gt;From now on, data should be provided as working SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;) and not as screen captures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is not clear to me which column is the patient, as you have not provided a variable named patient. Honestly, it is hard to align the data you do show with your description.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;I want using the code below but am not sure if this is right.&lt;/P&gt;
&lt;P&gt;proc means data=wide1;&lt;BR /&gt;var umaqs6 umaqs12 umaqs26;&lt;BR /&gt;run;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any time you are not sure if your code is right, my recommendation is that you actually try the code and see.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 21:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862216#M42618</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-03T21:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Find the average post-intervention umaqs score for each patient</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862219#M42619</link>
      <description>&lt;P&gt;If what you want is to compute the average across several variables for each row of your data set, then you can use the MEAN function in the DATA step. For example, these statements compute the average across the umaqs6-umaqs26 variables for each row and record the average in a new variable called AVG_UMAQS:&lt;/P&gt;
&lt;P&gt;data new;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;set your-dataset-name;&lt;/P&gt;
&lt;P&gt;avg_umaqs=mean(of umaqs2-umaqs26);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 21:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862219#M42619</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-03-03T21:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Find the average post-intervention umaqs score for each patient</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862220#M42620</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;Thank you for your observation.&lt;/P&gt;&lt;P&gt;This is the sample data. I have more than 100 rows. How do I find the&amp;nbsp;&lt;SPAN&gt;average post-intervention umaqs score for each patient? It is the "each patient" that's getting me confused.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data wide1;&lt;BR /&gt;input ID$ Group umaqs0 umaqs6 umaqs12 umaqs26;&lt;BR /&gt;datalines;&lt;BR /&gt;14789 2 10 10 15 15&lt;BR /&gt;15170 2 16 20 20 20&lt;BR /&gt;15611 1 10 20 18 22&lt;BR /&gt;15697 1 10 10 10 11&lt;BR /&gt;15844 1 21 26 26 27&lt;BR /&gt;;run;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 21:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862220#M42620</guid>
      <dc:creator>CathyVI</dc:creator>
      <dc:date>2023-03-03T21:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Find the average post-intervention umaqs score for each patient</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862223#M42622</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253321"&gt;@CathyVI&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;Thank you for your observation.&lt;/P&gt;
&lt;P&gt;This is the sample data. I have more than 100 rows. How do I find the&amp;nbsp;&lt;SPAN&gt;average post-intervention umaqs score for each patient? It is the "each patient" that's getting me confused.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data wide1;&lt;BR /&gt;input ID$ Group umaqs0 umaqs6 umaqs12 umaqs26;&lt;BR /&gt;datalines;&lt;BR /&gt;14789 2 10 10 15 15&lt;BR /&gt;15170 2 16 20 20 20&lt;BR /&gt;15611 1 10 20 18 22&lt;BR /&gt;15697 1 10 10 10 11&lt;BR /&gt;15844 1 21 26 26 27&lt;BR /&gt;;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You still haven't made it clear what "each patient" means here. Are we trying to average numbers across rows? (If so then I think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; is on the right track) Or are you not trying to average across rows, and you want something else?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 21:40:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Find-the-average-post-intervention-umaqs-score-for-each-patient/m-p/862223#M42622</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-03T21:40:36Z</dc:date>
    </item>
  </channel>
</rss>

