<?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 Deleting data to create new dataset for relative risk analysis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881268#M348209</link>
    <description>&lt;P&gt;I’m trying to delete certain data with variables not equal to one, but the below code deletes all the data. I can’t figure out the OR statement so that not all the data is deleted. I’m running a relative risk analysis and have included that code for reference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ata hf8mb;&lt;BR /&gt;set hf8;&lt;BR /&gt;time = 0 ;&lt;BR /&gt;if timelapse &amp;lt; .8 then delete;&lt;BR /&gt;if surver = 'BIT1' then delete;&lt;BR /&gt;if met_brst_scrn ne 1 then delete;&lt;BR /&gt;if met_cer_scrn ne 1 then delete;&lt;BR /&gt;if met_cer_scrn ne 1 then delete;&lt;BR /&gt;if met_co_scrn ne 1 then delete;&lt;BR /&gt;if met_pneu_vac ne 1 then delete;&lt;BR /&gt;if met_hpv_vac ne 1 then delete;&lt;BR /&gt;if met_flu_vac ne 1 then delete;&lt;BR /&gt;keep time par_id....&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=hf8m3 order=data;&lt;BR /&gt;tables time*need_brst_scrn / relrisk;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Jun 2023 14:56:35 GMT</pubDate>
    <dc:creator>dhuerta</dc:creator>
    <dc:date>2023-06-17T14:56:35Z</dc:date>
    <item>
      <title>Deleting data to create new dataset for relative risk analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881268#M348209</link>
      <description>&lt;P&gt;I’m trying to delete certain data with variables not equal to one, but the below code deletes all the data. I can’t figure out the OR statement so that not all the data is deleted. I’m running a relative risk analysis and have included that code for reference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ata hf8mb;&lt;BR /&gt;set hf8;&lt;BR /&gt;time = 0 ;&lt;BR /&gt;if timelapse &amp;lt; .8 then delete;&lt;BR /&gt;if surver = 'BIT1' then delete;&lt;BR /&gt;if met_brst_scrn ne 1 then delete;&lt;BR /&gt;if met_cer_scrn ne 1 then delete;&lt;BR /&gt;if met_cer_scrn ne 1 then delete;&lt;BR /&gt;if met_co_scrn ne 1 then delete;&lt;BR /&gt;if met_pneu_vac ne 1 then delete;&lt;BR /&gt;if met_hpv_vac ne 1 then delete;&lt;BR /&gt;if met_flu_vac ne 1 then delete;&lt;BR /&gt;keep time par_id....&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=hf8m3 order=data;&lt;BR /&gt;tables time*need_brst_scrn / relrisk;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2023 14:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881268#M348209</guid>
      <dc:creator>dhuerta</dc:creator>
      <dc:date>2023-06-17T14:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting data to create new dataset for relative risk analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881272#M348212</link>
      <description>&lt;P&gt;Use a single condition (because the action is always DELETE).&lt;/P&gt;
&lt;P&gt;If you intend for all conditions to be true to cause a delete, combine them with AND.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2023 15:15:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881272#M348212</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-17T15:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting data to create new dataset for relative risk analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881273#M348213</link>
      <description>&lt;P&gt;BTW OR is not a &lt;EM&gt;statement&lt;/EM&gt;, it is a logical&amp;nbsp;&lt;EM&gt;operator&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2023 15:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881273#M348213</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-17T15:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting data to create new dataset for relative risk analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881283#M348220</link>
      <description>&lt;P&gt;The SAS DELETE statement removes observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you intending to set values to missing so they are not included in analysis?&lt;/P&gt;
&lt;P&gt;Might be a good idea to show an example of your data and what you expect the result to look like AFTER this process is done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2023 18:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-data-to-create-new-dataset-for-relative-risk-analysis/m-p/881283#M348220</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-17T18:46:35Z</dc:date>
    </item>
  </channel>
</rss>

