<?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: Probability of binary event proc logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766621#M37476</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;is it possible just to get the list of independent variables and their predictions&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Take a look at EFFECTPLOT or SLICES but I think odds ratio for each variable is essentially telling you what you want to know. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have you walked through this example in the tutorials?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_examples02.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_examples02.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 15:27:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-09-08T15:27:18Z</dc:date>
    <item>
      <title>Probability of binary event proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766612#M37474</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with information on buildings and structural failure risk. I am a bit new to SAS and statistical modelling, so apologies if this is a poor question.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   input Buildtype $ RoofType $ Failure $;
   datalines;
Detached Mansard  No
Detached Flat Yes
Senidetached Pitched  No
Apartment   Flat No
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested in the probability of failure of different building types and roofs, and the uncertainty estimates of this probability. So far, I have been using proc logistic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
  class Buildtype RoofType / param=ref ;
  model Failure (event='Yes') = Buildtype RoofType;
  Output out=want lower=lower upper=upper predicted=predicted;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This outputs:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Printed odds ratios and maximum likelihood estimates relative to a reference value. This is useful, but I would like to show a risk of failure relative to the average for all dwellings, if that makes sense.&lt;/LI&gt;&lt;LI&gt;A dataset &lt;EM&gt;want&lt;/EM&gt; that is the same as the &lt;EM&gt;have&lt;/EM&gt; dataset, with predicted failures and confidence intervals added as columns at the end. This is what I want, but is it possible just to get the list of independent variables and their predictions, instead of the entire dataset? The original dataset is quite large...&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766612#M37474</guid>
      <dc:creator>tuni_jt</dc:creator>
      <dc:date>2021-09-08T15:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Probability of binary event proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766619#M37475</link>
      <description>&lt;UL&gt;
&lt;LI&gt;
&lt;BLOCKQUOTE&gt;Printed odds ratios and maximum likelihood estimates relative to a reference value. This is useful, but I would like to show a risk of failure relative to the average for all dwellings, if that makes sense.&lt;/BLOCKQUOTE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Average for all dwellings generally would not make sense in this case unless the data/experiment was completely balanced, so each buildtype*rooftype occurs an equal number of times. Usually, the comparison is indeed the levels of buildtype to each other and the levels of rooftype to each other (and if desired, the interaction levels as well compared to each other)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;BLOCKQUOTE&gt;A dataset&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;want&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that is the same as the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;have&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;dataset, with predicted failures and confidence intervals added as columns at the end. This is what I want, but is it possible just to get the list of independent variables and their predictions, instead of the entire dataset? The original dataset is quite large...&lt;/BLOCKQUOTE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I think what you want is the output from the LSMEANS statement with the ILINK option.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766619#M37475</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-08T15:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Probability of binary event proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766621#M37476</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;is it possible just to get the list of independent variables and their predictions&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Take a look at EFFECTPLOT or SLICES but I think odds ratio for each variable is essentially telling you what you want to know. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have you walked through this example in the tutorials?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_examples02.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_examples02.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:27:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766621#M37476</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-08T15:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Probability of binary event proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766622#M37477</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use a KEEP= data set option on the WANT dataset to specify the columns you want to keep:&lt;/P&gt;
&lt;P&gt;Like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;output out=want(keep=Failure Buildtype RoofType lower upper predicted) &lt;BR /&gt;lower=lower upper=upper predicted=predicted;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766622#M37477</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-09-08T15:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Probability of binary event proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766648#M37480</link>
      <description>&lt;P&gt;There are two basic statistics for this - LS-means (as mentioned earlier) and predictive margins. LS-means can be obtained for any categorical predictor which is specified in the CLASS statement. Note that you need to specify the PARAM=GLM option in the CLASS statement in order to use the LSMEANS statement. The following provides estimates the event probabilities and confidence intervals for each level of each predictor while holding the other predictor constant. The ILINK option gives the estimates on the mean (probability) scale, the CL option gives the confidence limits, and the E option shows the coefficients on the parameters that define each LS-mean and allows you to see how the other predictor(s) are fixed.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  class Buildtype RoofType / param=glm;
  model Failure (event='Yes') = Buildtype RoofType;
  lsmeans Buildtype RoofType / ilink cl e;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Margins for a predictor do not hold the other predictor(s) constant but rather averages the predicted values. Predictive margins can be obtained for categorical predictors and marginal effects for continuous predictors. These are provided by the &lt;A href="http://support.sas.com/kb/63038" target="_self"&gt;Margins macro&lt;/A&gt;. See the discussion and examples in its documentation.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/766648#M37480</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-09-08T17:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Probability of binary event proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/767674#M37528</link>
      <description>&lt;P&gt;Thanks to everyone for their really quick replies - they are incredibly helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think odds ratios are probably a good option here, so let's go for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to output a table with just the dependent variables and their odds ratios, since I find it a bit easier to customise the charts using sgplot for example. I can output the odds ratios by using this statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ods output OddsRatiosWald= ORPlot;&lt;/PRE&gt;&lt;P&gt;But I am not sure how to do the same if I want to use PL insteads of Wald?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 11:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Probability-of-binary-event-proc-logistic/m-p/767674#M37528</guid>
      <dc:creator>tuni_jt</dc:creator>
      <dc:date>2021-09-14T11:56:55Z</dc:date>
    </item>
  </channel>
</rss>

