<?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 calculate standard errors of marginal effects in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/338832#M17853</link>
    <description>&lt;P&gt;This example seems to give SE and CI for each value at which a ME is calculated. If we are interested in average marginal effects, other examples use PROC MEANS in combination with PROC QLIM to average all of the MEs to get the desired result. (&lt;A href="https://support.sas.com/rnd/app/ets/examples/margeff/index.html" target="_blank"&gt;https://support.sas.com/rnd/app/ets/examples/margeff/index.html&lt;/A&gt;) Would we get the correct standard errors and confidence intervals simiply using proc means as such:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;MEANS&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=OUTNL &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;MEAN&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;STDERR&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CLM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;VAR&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PRED;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or is there another way to leverage NLMIXED in a such a way to produce average marginal effects and their standard errors? I'm thinking to get&amp;nbsp;standard errors for marginal effects calculated&amp;nbsp;&amp;nbsp;this way some sort of loop/bootstrap approach might be necessary?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know this is an old discussion but looking for a solution today and I ran across this string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2017 15:26:50 GMT</pubDate>
    <dc:creator>SlutskyFan</dc:creator>
    <dc:date>2017-03-07T15:26:50Z</dc:date>
    <item>
      <title>How to calculate standard errors of marginal effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/227014#M11990</link>
      <description>&lt;P&gt;I am running a probit regression and want to report marginal effects and the standard errors of the marginal effects. Here is my code for the regression and marginal effects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc qlim data=sa.Ipumsi_sa_reg;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model CHDIED=SADC ROA AGE / DISCRETE(d=probit);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;where OSEAS=0 and 20 le AGE le 35;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;weight WTPER;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=outme marginal;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;proc means data=outme n mean;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var Meff_P2_SADC Meff_P2_ROA Meff_P2_AGE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title 'Average of the Individual Marginal Effects';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I calculate the standard errors of the marginal effects?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 23:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/227014#M11990</guid>
      <dc:creator>burtsm</dc:creator>
      <dc:date>2015-09-23T23:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard errors of marginal effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/227087#M11995</link>
      <description>&lt;P&gt;You can get the estimated marginal effects and their standard errors by fitting the model in PROC NLMIXED and using the PREDICT statement as shown in &lt;A href="http://support.sas.com/kb/22604" target="_self"&gt;this note&lt;/A&gt;&amp;nbsp;on marginal effects. &amp;nbsp;For example, these statements use QLIM and NLMIXED to fit the same probit model to the cancer remission data shown in the first example in the LOGISTIC documentation. &amp;nbsp;The OUTNL output data set from PROC NLMIXED contains the estimated marginal effects (Pred) and the standard errors (StdErrPred).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc qlim data=remiss;&lt;BR /&gt;model remiss=blast smear / discrete;&lt;BR /&gt;output out=outqlim marginal;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc nlmixed data=remiss;&lt;BR /&gt;lp=int+bblast*blast+bsmear*smear;&lt;BR /&gt;p=probnorm(lp);&lt;BR /&gt;model remiss ~ binary(p);&lt;BR /&gt;predict pdf('NORMAL',lp)*bblast out=outnl;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/227087#M11995</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2015-09-24T15:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard errors of marginal effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/338832#M17853</link>
      <description>&lt;P&gt;This example seems to give SE and CI for each value at which a ME is calculated. If we are interested in average marginal effects, other examples use PROC MEANS in combination with PROC QLIM to average all of the MEs to get the desired result. (&lt;A href="https://support.sas.com/rnd/app/ets/examples/margeff/index.html" target="_blank"&gt;https://support.sas.com/rnd/app/ets/examples/margeff/index.html&lt;/A&gt;) Would we get the correct standard errors and confidence intervals simiply using proc means as such:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;MEANS&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=OUTNL &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;MEAN&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;STDERR&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CLM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;VAR&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PRED;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or is there another way to leverage NLMIXED in a such a way to produce average marginal effects and their standard errors? I'm thinking to get&amp;nbsp;standard errors for marginal effects calculated&amp;nbsp;&amp;nbsp;this way some sort of loop/bootstrap approach might be necessary?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know this is an old discussion but looking for a solution today and I ran across this string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 15:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/338832#M17853</guid>
      <dc:creator>SlutskyFan</dc:creator>
      <dc:date>2017-03-07T15:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard errors of marginal effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/505518#M26001</link>
      <description>&lt;P&gt;The average marginal effect and its standard error can be computed with the &lt;A href="http://support.sas.com/kb/63038" target="_self"&gt;Margins macro&lt;/A&gt;. The standard error if determined using the delta method.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 13:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-standard-errors-of-marginal-effects/m-p/505518#M26001</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-10-18T13:01:00Z</dc:date>
    </item>
  </channel>
</rss>

