<?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: Replicate the margins command from STATA in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/357217#M18762</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you might be looking for the, "&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;LS-Means&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;" option??&lt;/P&gt;&lt;P&gt;Also, here is this&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect053.htm" target="_self"&gt;Proc GENMOD Logistic Regression&lt;/A&gt;&amp;nbsp;. GENMOD will let you use the LS-Means statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively,&amp;nbsp;&amp;nbsp;&lt;A href="http://documentation.sas.com/?cdcId=statcdc&amp;amp;cdcVersion=14.2&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_glimmix_examples.htm&amp;amp;locale=en" target="_blank"&gt;Proc GLIMMIX&lt;/A&gt;&amp;nbsp;. Even though you may not ever use the random intercepts or slopes. I tend to go with Glimmix, because the "&lt;EM&gt;&lt;STRONG&gt;NLOPTIONS&lt;/STRONG&gt;&lt;/EM&gt;" statement lets you be fairly flexable if the model has a difficult time converging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think each one of those procedures&amp;nbsp;has information on the LS-means functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck! &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2017 15:40:04 GMT</pubDate>
    <dc:creator>lkeyes</dc:creator>
    <dc:date>2017-05-09T15:40:04Z</dc:date>
    <item>
      <title>Replicate the margins command from STATA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/354984#M18720</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;I am still new in SAS&amp;nbsp;and trying to modelize my first probit model. I am using the following sequence of command in order to obtain my probit estimate:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;logistic&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=pop_final;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; SEX (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;REF&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"M"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) AGEGR (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;REF&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"3"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) NON_EE (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;REF&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"0"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)/&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;PARAM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=REF;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; SCIENCE = SEX AGEGR NON_EE / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;link&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=probit &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;technique&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=newton;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ods&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; parameterestimates=prbparms;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outprb &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;prob&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=p &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xbeta&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=xbpr;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;However, I would now like to replicate the margins command in STATA (&lt;A href="http://www.stata.com/manuals13/rmargins.pdf" target="_blank"&gt;http://www.stata.com/manuals13/rmargins.pdf&lt;/A&gt;). It allowed me to estimate margins of responses for specified values of covariates of a previously fit model. For example, following my probit model that estimated, in particular, the effect of changing industry of employment following a layoff, I was able to use the margin command to estimate the probability of a workers being laid-off from a specific industry to change industry in his following job.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Would someone know a command in SAS that could replicate what I was able to do with STATA?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you in advance&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 17:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/354984#M18720</guid>
      <dc:creator>Shawn08</dc:creator>
      <dc:date>2017-05-01T17:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replicate the margins command from STATA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/357217#M18762</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you might be looking for the, "&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;LS-Means&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;" option??&lt;/P&gt;&lt;P&gt;Also, here is this&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect053.htm" target="_self"&gt;Proc GENMOD Logistic Regression&lt;/A&gt;&amp;nbsp;. GENMOD will let you use the LS-Means statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively,&amp;nbsp;&amp;nbsp;&lt;A href="http://documentation.sas.com/?cdcId=statcdc&amp;amp;cdcVersion=14.2&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_glimmix_examples.htm&amp;amp;locale=en" target="_blank"&gt;Proc GLIMMIX&lt;/A&gt;&amp;nbsp;. Even though you may not ever use the random intercepts or slopes. I tend to go with Glimmix, because the "&lt;EM&gt;&lt;STRONG&gt;NLOPTIONS&lt;/STRONG&gt;&lt;/EM&gt;" statement lets you be fairly flexable if the model has a difficult time converging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think each one of those procedures&amp;nbsp;has information on the LS-means functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck! &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/357217#M18762</guid>
      <dc:creator>lkeyes</dc:creator>
      <dc:date>2017-05-09T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replicate the margins command from STATA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/358019#M18809</link>
      <description>&lt;P&gt;Sounds like you want to estimate so-called marginal effects which are the derivative of the event probability with respect to a predictor of interest. &amp;nbsp;See &lt;A href="http://support.sas.com/kb/22604" target="_self"&gt;this note&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 18:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/358019#M18809</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-05-11T18:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Replicate the margins command from STATA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/358024#M18811</link>
      <description>&lt;P&gt;Yeah, I totally misunderstood. What&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;said is where you need to be.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 19:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/358024#M18811</guid>
      <dc:creator>lkeyes</dc:creator>
      <dc:date>2017-05-11T19:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Replicate the margins command from STATA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/358209#M18823</link>
      <description>&lt;P&gt;Sorry for the delay in the reply, thank you for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 12:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Replicate-the-margins-command-from-STATA/m-p/358209#M18823</guid>
      <dc:creator>Shawn08</dc:creator>
      <dc:date>2017-05-12T12:06:21Z</dc:date>
    </item>
  </channel>
</rss>

