<?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 Remove subjects only observed once in repeated measures analysis in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9764#M104</link>
    <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I'm working with a large dataset (5,000+ subjects) that were measured anywhere between one and nine times. I'm using repeated measures in proc mixed to analyze my data. My variables are subject, year measured, and size. I have a lot of subjects, however, that were only measured in one year. Does anyone know how to remove subjects that only appear once in the dataset?  &lt;BR /&gt;
&lt;BR /&gt;
thanks for your help!&lt;BR /&gt;
Carolyn</description>
    <pubDate>Sat, 24 Apr 2010 18:32:48 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-04-24T18:32:48Z</dc:date>
    <item>
      <title>Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9764#M104</link>
      <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I'm working with a large dataset (5,000+ subjects) that were measured anywhere between one and nine times. I'm using repeated measures in proc mixed to analyze my data. My variables are subject, year measured, and size. I have a lot of subjects, however, that were only measured in one year. Does anyone know how to remove subjects that only appear once in the dataset?  &lt;BR /&gt;
&lt;BR /&gt;
thanks for your help!&lt;BR /&gt;
Carolyn</description>
      <pubDate>Sat, 24 Apr 2010 18:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9764#M104</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-24T18:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9765#M105</link>
      <description>Assuming you have one measure per row of data, this shell will work.&lt;BR /&gt;
&lt;BR /&gt;
PROC SORT; BY subject;&lt;BR /&gt;
&lt;BR /&gt;
DATA;&lt;BR /&gt;
SET;&lt;BR /&gt;
BY subject;&lt;BR /&gt;
IF FIRST.subject &amp;amp; LAST.subject THEN DELETE;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
The if expression will only be true for subjects with just one row.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Sun, 25 Apr 2010 13:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9765#M105</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-04-25T13:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9766#M106</link>
      <description>Thank you! That is exactly what I was looking for. I really appreciate your help. &lt;BR /&gt;
&lt;BR /&gt;
Carolyn</description>
      <pubDate>Sun, 25 Apr 2010 15:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9766#M106</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-25T15:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9767#M107</link>
      <description>Another option to consider is the PROC SORT feature using keyword NODUPKEY and the DUPOUT= parameter.  &lt;BR /&gt;
&lt;BR /&gt;
This approach creates an output file containing those observations that have more than one unique combination of your BY statement variables -- the NODUPKEY parameter (slightly different than NODUPS which interrogates all observation variables looking for duplicate values but only for "adjacent" observations).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
proc sort nodupkey dupout site:sas.com</description>
      <pubDate>Sun, 25 Apr 2010 20:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9767#M107</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-04-25T20:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9768#M108</link>
      <description>The methods that have been mentioned will do what you have requested.  But why do you want to remove the subjects who appear only once?&lt;BR /&gt;
&lt;BR /&gt;
It is not necessary to do so for the purposes of estimation of model parameters.  It might be necessary if you believe that the missing observations for those individuals are not missing at random.  However, if you believe that the missingness is unrelated to the response, then you would actually be better off leaving these individuals in your analysis.</description>
      <pubDate>Tue, 27 Apr 2010 19:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9768#M108</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-04-27T19:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9769#M109</link>
      <description>Thanks for your help. I wanted to remove all of the single observations because most of them are not random, but represent plants that only lived for one year and so were not measured more than once.&lt;BR /&gt;
&lt;BR /&gt;
Carolyn</description>
      <pubDate>Thu, 29 Apr 2010 19:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9769#M109</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-29T19:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Remove subjects only observed once in repeated measures analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9770#M110</link>
      <description>Hmm, I don't know that your reasoning is valid.  You are censoring plants based on some quality of their response.  Thus, you do not have a situation in which the response is missing at random.  I would advise against removal of the observations which have only one response.  It &lt;B&gt;&lt;I&gt;&lt;U&gt;might&lt;/U&gt;&lt;/I&gt;&lt;/B&gt; be OK to do a sensitivity analysis in which you look at results with and without the plants that lived for only one year.  But I think your primary analysis should include all plants.</description>
      <pubDate>Fri, 30 Apr 2010 18:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Remove-subjects-only-observed-once-in-repeated-measures-analysis/m-p/9770#M110</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-04-30T18:57:22Z</dc:date>
    </item>
  </channel>
</rss>

