<?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 Is there a way to efficiently identify and input missing data for repeated measures data? in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360830#M2545</link>
    <description>&lt;P&gt;Hi, I am a student using SAS studio to analyze a set of repeated measures data. &amp;nbsp;The beginning of my dataset looks like this:&lt;/P&gt;&lt;P&gt;subject trt sex age visit time visual&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;1 Active F 71 1 0 59&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;1 Active F 71 2 4 55&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;1 Active F 71 3 12 45&lt;/FONT&gt;&lt;BR /&gt;2 Active F 59 1 0 65&lt;BR /&gt;2 Active F 59 2 4 70&lt;BR /&gt;2 Active F 59 3 12 65&lt;BR /&gt;2 Active F 59 4 24 65&lt;BR /&gt;2 Active F 59 5 52 55&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 1 0 40&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 2 4 40&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 3 12 37&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 4 24 17&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this dataset, "visual" is the outcome measure/response variable. Each subject had the opportunity to have the variable "visual" evaluated&amp;nbsp;5 times-i.e. at visits 1-5. However, not all subjects made it to all 5 visits. For example, as labeled in red above, subject 1 only had 3 visits, and subject 3 had 4 visits. Subject 2 had all 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to enter missing data lines for the missing data. For example:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3 Placebo F 73 5 52 . &amp;nbsp; &amp;nbsp; to indicate that this data is missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I would like to do a nonlinear mixed models analysis of this repeated measures data using proc mixed or proc nlmixed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;1. Is there an efficient way in SAS to identify which subjects do not have all 5 visits and then enter the missing data?&lt;/P&gt;&lt;P&gt;2. If data is missing, do I need to enter it into the dataset as I'm describing? Or can I do my analysis without adding these missing rows? I have the impression from the attached SAS guide pages 5-8, that maybe I don't need to add in the missing data lines if I specify the repeated statement appropriately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was planning to use the answer from this question: &lt;A href="https://communities.sas.com/t5/SAS-Procedures/Adding-extra-data-to-existing-dataset/td-p/117310&amp;nbsp;to" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Adding-extra-data-to-existing-dataset/td-p/117310&amp;nbsp;to&lt;/A&gt; add my missing data lines (or just to enter them in manually), but I was wondering if there is a better way to identify which subjects are missing visit data, rather than going through the 1101 observations in the dataset manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;&lt;P&gt;Sheila&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2017 17:10:03 GMT</pubDate>
    <dc:creator>SheilaSR</dc:creator>
    <dc:date>2017-05-23T17:10:03Z</dc:date>
    <item>
      <title>Is there a way to efficiently identify and input missing data for repeated measures data?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360830#M2545</link>
      <description>&lt;P&gt;Hi, I am a student using SAS studio to analyze a set of repeated measures data. &amp;nbsp;The beginning of my dataset looks like this:&lt;/P&gt;&lt;P&gt;subject trt sex age visit time visual&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;1 Active F 71 1 0 59&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;1 Active F 71 2 4 55&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;1 Active F 71 3 12 45&lt;/FONT&gt;&lt;BR /&gt;2 Active F 59 1 0 65&lt;BR /&gt;2 Active F 59 2 4 70&lt;BR /&gt;2 Active F 59 3 12 65&lt;BR /&gt;2 Active F 59 4 24 65&lt;BR /&gt;2 Active F 59 5 52 55&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 1 0 40&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 2 4 40&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 3 12 37&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;3 Placebo F 73 4 24 17&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this dataset, "visual" is the outcome measure/response variable. Each subject had the opportunity to have the variable "visual" evaluated&amp;nbsp;5 times-i.e. at visits 1-5. However, not all subjects made it to all 5 visits. For example, as labeled in red above, subject 1 only had 3 visits, and subject 3 had 4 visits. Subject 2 had all 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to enter missing data lines for the missing data. For example:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3 Placebo F 73 5 52 . &amp;nbsp; &amp;nbsp; to indicate that this data is missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I would like to do a nonlinear mixed models analysis of this repeated measures data using proc mixed or proc nlmixed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;1. Is there an efficient way in SAS to identify which subjects do not have all 5 visits and then enter the missing data?&lt;/P&gt;&lt;P&gt;2. If data is missing, do I need to enter it into the dataset as I'm describing? Or can I do my analysis without adding these missing rows? I have the impression from the attached SAS guide pages 5-8, that maybe I don't need to add in the missing data lines if I specify the repeated statement appropriately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was planning to use the answer from this question: &lt;A href="https://communities.sas.com/t5/SAS-Procedures/Adding-extra-data-to-existing-dataset/td-p/117310&amp;nbsp;to" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Adding-extra-data-to-existing-dataset/td-p/117310&amp;nbsp;to&lt;/A&gt; add my missing data lines (or just to enter them in manually), but I was wondering if there is a better way to identify which subjects are missing visit data, rather than going through the 1101 observations in the dataset manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;&lt;P&gt;Sheila&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 17:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360830#M2545</guid>
      <dc:creator>SheilaSR</dc:creator>
      <dc:date>2017-05-23T17:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to efficiently identify and input missing data for repeated measures data?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360844#M2547</link>
      <description>&lt;P&gt;Assuming your data is grouped by subject and sorted by visit as shown this should create the additional records you requested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   by subject notsorted;
   array x (5) _temporary_ (0, 4, 12, 24,52);
   output;
   if last.subject and visit ne 5 then do;
      call missing(visual);
      do visit=(visit+1) to 5;
         time= x[visit];
         output;
      end;
   end;
end;&lt;/PRE&gt;
&lt;P&gt;Assumes that your time and visit are actually numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 17:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360844#M2547</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-23T17:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to efficiently identify and input missing data for repeated measures data?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360851#M2548</link>
      <description>&lt;P&gt;Thank you for your help ballardw! I really appreciate your help! The code worked great and makes sense. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 17:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Is-there-a-way-to-efficiently-identify-and-input-missing-data/m-p/360851#M2548</guid>
      <dc:creator>SheilaSR</dc:creator>
      <dc:date>2017-05-23T17:33:36Z</dc:date>
    </item>
  </channel>
</rss>

