<?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: Selecting timepoints in longitudinal data in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936233#M42075</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/465761"&gt;@Stanley3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset with multiple timepoint measurements for the same ID. For each unique ID, I need to keep only the earliest observation and delete the rest. How can I code this?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    by id;
    if first.id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Additionally, using the example below, how can I fill in the missing value for the 'sex' variable at timepoint 1 with the value from timepoint 2?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;See&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Look-Ahead-and-Look-Back/ta-p/475772" target="_blank"&gt;Look Ahead and Look Back&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 16:48:48 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-07-18T16:48:48Z</dc:date>
    <item>
      <title>Selecting timepoints in longitudinal data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936228#M42074</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a dataset with multiple timepoint measurements for the same ID. For each unique ID, I need to keep only the earliest observation and delete the rest. How can I code this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, using the example below, how can I fill in the missing value for the 'sex' variable at timepoint 1 with the value from timepoint 2?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Timepoint&lt;/TD&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0001&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0001&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0001&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0002&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0002&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0003&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0003&lt;/TD&gt;&lt;TD&gt;4&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 16:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936228#M42074</guid>
      <dc:creator>Stanley3</dc:creator>
      <dc:date>2024-07-18T16:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting timepoints in longitudinal data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936233#M42075</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/465761"&gt;@Stanley3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset with multiple timepoint measurements for the same ID. For each unique ID, I need to keep only the earliest observation and delete the rest. How can I code this?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    by id;
    if first.id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Additionally, using the example below, how can I fill in the missing value for the 'sex' variable at timepoint 1 with the value from timepoint 2?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;See&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Look-Ahead-and-Look-Back/ta-p/475772" target="_blank"&gt;Look Ahead and Look Back&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 16:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936233#M42075</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-18T16:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting timepoints in longitudinal data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936234#M42076</link>
      <description>Brilliant, thank you so much!</description>
      <pubDate>Thu, 18 Jul 2024 17:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-timepoints-in-longitudinal-data/m-p/936234#M42076</guid>
      <dc:creator>Stanley3</dc:creator>
      <dc:date>2024-07-18T17:00:18Z</dc:date>
    </item>
  </channel>
</rss>

