<?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: PROC GLMSELECT - Partitioning by a variable in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLMSELECT-Partitioning-by-a-variable/m-p/748879#M36405</link>
    <description>&lt;P&gt;Here is &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_013/statug/statug_glmselect_details23.htm" target="_self"&gt;the documentation that specifies the correct syntax.&lt;/A&gt;&amp;nbsp;I think for your data the PARTITION statement would look like this (untested)&lt;/P&gt;
&lt;PRE&gt;partition ROLEVAR=treated(test='1' train='0');&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You can also include a character variable named _ROLE_ in the input data that has the values "TRAIN" and "TEST". If the input data contains a _ROLE_ variable, then you can omit the PARTITION statement.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jun 2021 13:19:48 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2021-06-18T13:19:48Z</dc:date>
    <item>
      <title>PROC GLMSELECT - Partitioning by a variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLMSELECT-Partitioning-by-a-variable/m-p/748396#M36404</link>
      <description>&lt;P&gt;Hi SAS Forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently doing some LASSO regression, and have a headache, that I hope someone else has had before, and therefore might be able to sort out. I am doing a LASSO regression, and I want to partition my data. I have made a dummy variable indicating whether the data belongs to training or testing part of the data set, but I am having struggles implementing this into the partition statement. The dummy is treated. The SAS documentation is a bit limited and mainly focuses on partitioning by choosing a share of the data rather than choosing based on a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc glmselect data = forecastmerge2;
class herkomst;
model PostEmplSumD = Woman Married PriorEmpl c:/
selection = lasso(stop=none choose=cvex);
partition = treated(test=(treated=1) train=(treated=0));
output out=GLMOut p = p_hat;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any questions, please let me know. I tried to add all of the coding which seemed relevant for the question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oggylang&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 17:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLMSELECT-Partitioning-by-a-variable/m-p/748396#M36404</guid>
      <dc:creator>oggylang</dc:creator>
      <dc:date>2021-06-16T17:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLMSELECT - Partitioning by a variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLMSELECT-Partitioning-by-a-variable/m-p/748879#M36405</link>
      <description>&lt;P&gt;Here is &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_013/statug/statug_glmselect_details23.htm" target="_self"&gt;the documentation that specifies the correct syntax.&lt;/A&gt;&amp;nbsp;I think for your data the PARTITION statement would look like this (untested)&lt;/P&gt;
&lt;PRE&gt;partition ROLEVAR=treated(test='1' train='0');&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You can also include a character variable named _ROLE_ in the input data that has the values "TRAIN" and "TEST". If the input data contains a _ROLE_ variable, then you can omit the PARTITION statement.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 13:19:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLMSELECT-Partitioning-by-a-variable/m-p/748879#M36405</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-06-18T13:19:48Z</dc:date>
    </item>
  </channel>
</rss>

