<?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: How to set the observations for a groups of variables with a prefix to missing? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771664#M244931</link>
    <description>&lt;P&gt;Use a call routine, specifically, &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1iq436yh8838rn1ud38om45n99k.htm" target="_self"&gt;CALL MISSING&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if age_group in (2,3) and school_zone in (1,3,4,5,6,7,10,13,14,16) then call missing(of pre_fix_vars_: ) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Another option is to use an array with a loop but this is more succinct for sure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a tutorial on using Arrays in SAS&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/84351"&gt;@Emma_at_SAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I created a series of variables and now for some observations, I want to set them to missing.&lt;/P&gt;
&lt;P&gt;Something like this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if age_group in (2,3) and school_zone in (1,3,4,5,6,7,10,13,14,16) then pre_fix_vars_: = . ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I appreciate your help. Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Oct 2021 19:14:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-10-01T19:14:33Z</dc:date>
    <item>
      <title>How to set the observations for a groups of variables with a prefix to missing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771660#M244927</link>
      <description>&lt;P&gt;I created a series of variables and now for some observations, I want to set them to missing.&lt;/P&gt;
&lt;P&gt;Something like this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if age_group in (2,3) and school_zone in (1,3,4,5,6,7,10,13,14,16) then pre_fix_vars_: = . ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I appreciate your help. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 19:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771660#M244927</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-10-01T19:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the observations for a groups of variables with a prefix to missing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771663#M244930</link>
      <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_010/lefunctionsref/p1iq436yh8838rn1ud38om45n99k.htm" target="_self"&gt;CALL MISSING&lt;/A&gt; function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call missing(of pre_fix_vars_:);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Oct 2021 19:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771663#M244930</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-01T19:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the observations for a groups of variables with a prefix to missing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771664#M244931</link>
      <description>&lt;P&gt;Use a call routine, specifically, &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1iq436yh8838rn1ud38om45n99k.htm" target="_self"&gt;CALL MISSING&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if age_group in (2,3) and school_zone in (1,3,4,5,6,7,10,13,14,16) then call missing(of pre_fix_vars_: ) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Another option is to use an array with a loop but this is more succinct for sure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a tutorial on using Arrays in SAS&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/84351"&gt;@Emma_at_SAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I created a series of variables and now for some observations, I want to set them to missing.&lt;/P&gt;
&lt;P&gt;Something like this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if age_group in (2,3) and school_zone in (1,3,4,5,6,7,10,13,14,16) then pre_fix_vars_: = . ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I appreciate your help. Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 19:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771664#M244931</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-01T19:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the observations for a groups of variables with a prefix to missing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771675#M244934</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;! It's amazing!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 19:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-observations-for-a-groups-of-variables-with-a/m-p/771675#M244934</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-10-01T19:36:32Z</dc:date>
    </item>
  </channel>
</rss>

