<?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: Splitting Longitudinal Data into Training &amp;amp; validation Sets in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279890#M14747</link>
    <description>&lt;P&gt;Thanks for a well presented problem. Here is a solution using surveyselect:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=bmiLong seed=8588 samprate=40 outall
    out=bmiLongGroups(rename=selected=validation) ;
cluster id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2016 02:46:14 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-06-24T02:46:14Z</dc:date>
    <item>
      <title>Splitting Longitudinal Data into Training &amp; validation Sets</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279847#M14746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can anyone please suggest a way how can I randomly split the longitudinal&amp;nbsp;data into training (60%) and validation (40%).&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In my case, I'd like split on a data set where each individual has more than one observation, in such a way that if an individual is in one of the training/validation sets, then all of their observations are in that same set.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example data (&lt;STRONG&gt;BMILONG&lt;/STRONG&gt;) below:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I want to split on BMILONG dataset generated in the&amp;nbsp;second step.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA BMI;&lt;BR /&gt;CALL STREAMINIT(12345);&lt;BR /&gt;DO ID = 1 TO 100;&lt;BR /&gt;GENDER=(MOD(ID,2)=0);&lt;BR /&gt;TREAT=( ID&amp;gt;50);&lt;BR /&gt;BASELINE = ROUND(RAND('NORMAL',35,2),.1);&lt;BR /&gt;IF GENDER=1 AND TREAT=0 THEN DO;&lt;BR /&gt;GROUP = 'FEMALE - PLACEBO';&lt;BR /&gt;MONTH3 = ROUND(BASELINE - .25 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH6 = ROUND(MONTH3 + .25 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH9 = ROUND(MONTH6 - .25 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH12= ROUND(MONTH9 + .25 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;END;&lt;BR /&gt;IF GENDER=0 AND TREAT=0 THEN DO;&lt;BR /&gt;GROUP = 'MALE - PLACEBO';&lt;BR /&gt;MONTH3 = ROUND(BASELINE - 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH6 = ROUND(MONTH3 - 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH9 = ROUND(MONTH6 + 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH12= ROUND(MONTH9 + 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;END;&lt;BR /&gt;IF GENDER=0 AND TREAT=1 THEN DO;&lt;BR /&gt;GROUP = 'MALE - TREAT';&lt;BR /&gt;MONTH3 = ROUND(BASELINE - 1.5 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH6 = ROUND(MONTH3 - 1.5 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH9 = ROUND(MONTH6 - 1.5 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH12= ROUND(MONTH9 - 1.5 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;END;&lt;BR /&gt;IF GENDER=1 AND TREAT=1 THEN DO;&lt;BR /&gt;GROUP = 'FEMALE - TREAT';&lt;BR /&gt;MONTH3 = ROUND(BASELINE - 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH6 = ROUND(MONTH3 - 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH9 = ROUND(MONTH6 - 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;MONTH12= ROUND(MONTH9 - 1 + RAND('NORMAL',0,1),.1);&lt;BR /&gt;END;&lt;BR /&gt;OUTPUT;&lt;BR /&gt;END;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA BMILONG;&lt;BR /&gt;SET BMI;&lt;BR /&gt;TIMEPT=0; BMI=BASELINE; OUTPUT;&lt;BR /&gt;TIMEPT=3; BMI=MONTH3; OUTPUT;&lt;BR /&gt;TIMEPT=6; BMI=MONTH6; OUTPUT;&lt;BR /&gt;TIMEPT=9; BMI=MONTH9; OUTPUT;&lt;BR /&gt;TIMEPT=12; BMI=MONTH12; OUTPUT;&lt;BR /&gt;DROP BASELINE MONTH:;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279847#M14746</guid>
      <dc:creator>anu1999</dc:creator>
      <dc:date>2016-06-23T20:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Longitudinal Data into Training &amp; validation Sets</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279890#M14747</link>
      <description>&lt;P&gt;Thanks for a well presented problem. Here is a solution using surveyselect:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=bmiLong seed=8588 samprate=40 outall
    out=bmiLongGroups(rename=selected=validation) ;
cluster id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 02:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279890#M14747</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-24T02:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Longitudinal Data into Training &amp; validation Sets</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279996#M14751</link>
      <description>&lt;P&gt;This works perfect!! Appreciate your help.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 14:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Splitting-Longitudinal-Data-into-Training-amp-validation-Sets/m-p/279996#M14751</guid>
      <dc:creator>anu1999</dc:creator>
      <dc:date>2016-06-24T14:17:54Z</dc:date>
    </item>
  </channel>
</rss>

