<?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 quickly generate an indicator for observations included in regression models in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679280#M205111</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/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;for your response!&lt;/P&gt;&lt;P&gt;I'm not referring to a specific type of proc. I have multiple regressions to run with different kind of missingness in the independent variables and dependent variables. Then I want to see if there are systematic differences among different analytic samples I have when examining different outcomes/key independent variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping there will be a quicker way to generate indicators for different analytic samples in one data set.&lt;/P&gt;&lt;P&gt;However, based on your response, looks like I do have to take a few more steps by first output the data set and then generate indicators for included/excluded observations. And because I have multiple output datasets to generate, I then need to merge all the data sets. Am I understanding correctly?&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2020 20:01:40 GMT</pubDate>
    <dc:creator>sdaniels429</dc:creator>
    <dc:date>2020-08-25T20:01:40Z</dc:date>
    <item>
      <title>How to quickly generate an indicator for observations included in regression models</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679219#M205097</link>
      <description>&lt;P&gt;Hi, SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if there is a quick way to generate an indicator for observations included in regression models? In stata, after running the regression model, we can use a post-estimation function (e(sample)) to identify the actual analytic sample. I haven't been able to find an equivalent function in SAS. Is there a quick way to do it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 17:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679219#M205097</guid>
      <dc:creator>sdaniels429</dc:creator>
      <dc:date>2020-08-25T17:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to quickly generate an indicator for observations included in regression models</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679236#M205099</link>
      <description>&lt;P&gt;The output data set generated should be pretty clear as to which observations were used and which were not. Which PROC are you using?&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/319180"&gt;@sdaniels429&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, SAS community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if there is a quick way to generate an indicator for observations included in regression models? In stata, after running the regression model, we can use a post-estimation function (e(sample)) to identify the actual analytic sample. I haven't been able to find an equivalent function in SAS. Is there a quick way to do it ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 18:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679236#M205099</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-25T18:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to quickly generate an indicator for observations included in regression models</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679239#M205100</link>
      <description>&lt;P&gt;Typically, SAS regression procedures exclude observations that contain missing values. Procedures usually give you a count of complete observations that were included in the fit. To get a dataset showing which observations were included, you could run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data included;&lt;BR /&gt;set myData;&lt;BR /&gt;where ... ; /* Same statement as the where statement in the regression procedure */&lt;BR /&gt;excluded = cmiss(myYvar, myX1Var, ... ) &amp;gt; 0; /* All the vars from the model statement */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, if the regression procedure supports an output statement, you can ask for predicted values and look for missing predictions.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 18:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679239#M205100</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-08-25T18:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to quickly generate an indicator for observations included in regression models</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679280#M205111</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/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;for your response!&lt;/P&gt;&lt;P&gt;I'm not referring to a specific type of proc. I have multiple regressions to run with different kind of missingness in the independent variables and dependent variables. Then I want to see if there are systematic differences among different analytic samples I have when examining different outcomes/key independent variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping there will be a quicker way to generate indicators for different analytic samples in one data set.&lt;/P&gt;&lt;P&gt;However, based on your response, looks like I do have to take a few more steps by first output the data set and then generate indicators for included/excluded observations. And because I have multiple output datasets to generate, I then need to merge all the data sets. Am I understanding correctly?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 20:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679280#M205111</guid>
      <dc:creator>sdaniels429</dc:creator>
      <dc:date>2020-08-25T20:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to quickly generate an indicator for observations included in regression models</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679288#M205115</link>
      <description>&lt;P&gt;I feel we would need more concrete example code to help you further with programming issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note however that comparing models fitted on different sets of observations can be very tricky. It might be easier to build a set of complete observations for all your models by&lt;/P&gt;
&lt;P&gt;1)&lt;/P&gt;
&lt;P&gt;deleting any observation showing a missing value for any of the variables from any of your models&lt;/P&gt;
&lt;P&gt;or 2)&lt;/P&gt;
&lt;P&gt;imputing values to replace missing values for any of the variables from any of your models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 20:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679288#M205115</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-08-25T20:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to quickly generate an indicator for observations included in regression models</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679577#M205215</link>
      <description>All SAS procs use row wise elimination. So unless you're running models with different variables you're going to have the same base sample every time. &lt;BR /&gt;&lt;BR /&gt;If any variable indicated in the PROC (not necessarily used, eg listed in CLASS but not included in MODEL) is missing a value that whole row is eliminated.</description>
      <pubDate>Wed, 26 Aug 2020 19:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-quickly-generate-an-indicator-for-observations-included/m-p/679577#M205215</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-26T19:23:25Z</dc:date>
    </item>
  </channel>
</rss>

