<?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: Reproduce Stata GLM is SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832128#M82022</link>
    <description>&lt;P&gt;I don't understand, it seems as if you have not answered my question, or you did answer my question but worded it confusingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The standard error for treatment in SAS is _________________&lt;/P&gt;
&lt;P&gt;The standard error for treatment in STATA is _________________&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2022 14:41:43 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-09-07T14:41:43Z</dc:date>
    <item>
      <title>Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832115#M82017</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to reproduce a GLM in SAS that I originally created in Stata. Although my estimates are exactly the same, the standard errors are not, and I'm not quite sure why. Note that cost is continuous while treatment, var1, and var2 are all categorical. Here is both codes:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;SAS&lt;/U&gt;&lt;/P&gt;
&lt;PRE class="bbcode_code"&gt;proc genmod data=data;
 class clinician treatment var1 var2 / param=ref;
 model cost = treatment var1 var2/ link=LOG dist=gamma type3;
repeated SUBJECT=clinician/ PRINTMLE TYPE=ind;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;Stata&lt;/U&gt;&lt;/P&gt;
&lt;PRE class="bbcode_code"&gt;glm cost i.treatment i.var1 i.var2, f(gam) l(log) cluster(clinician)&lt;BR /&gt;testparm i.treatment&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate the help&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 22:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832115#M82017</guid>
      <dc:creator>JonKetchup</dc:creator>
      <dc:date>2022-09-07T22:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832118#M82018</link>
      <description>&lt;P&gt;Are the degrees of freedom the same? Show us.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832118#M82018</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-07T13:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832120#M82019</link>
      <description>&lt;P&gt;Yes, DFs are all the same along with the estimates. Only the standard errors (and thus the p-values) are different)&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832120#M82019</guid>
      <dc:creator>JonKetchup</dc:creator>
      <dc:date>2022-09-07T13:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832122#M82020</link>
      <description>&lt;P&gt;How far apart are these estimates of standard errors? Give us a specific case, what are the actual numbers from SAS and what is the actual number in STATA?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What is the estimate of Scale from each program?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 14:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832122#M82020</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-07T14:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832124#M82021</link>
      <description>&lt;P&gt;The estimate for treatment is -0.0356. In SAS, the standard error is 0.1301 while in Stata, the standard error is 0.1469.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure how to find the scale in Stata, but the scale is SAS is 0.5432.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 14:44:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832124#M82021</guid>
      <dc:creator>JonKetchup</dc:creator>
      <dc:date>2022-09-07T14:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832128#M82022</link>
      <description>&lt;P&gt;I don't understand, it seems as if you have not answered my question, or you did answer my question but worded it confusingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The standard error for treatment in SAS is _________________&lt;/P&gt;
&lt;P&gt;The standard error for treatment in STATA is _________________&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 14:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832128#M82022</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-07T14:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832129#M82023</link>
      <description>&lt;P&gt;My apologies. My last reply had a few errors. It is rewritten, but to again answer your question:&lt;/P&gt;
&lt;P&gt;The standard error for treatment in SAS is 0.1301.&lt;/P&gt;
&lt;P&gt;The standard error for treatment in STATA is 0.1469.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 14:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832129#M82023</guid>
      <dc:creator>JonKetchup</dc:creator>
      <dc:date>2022-09-07T14:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832140#M82024</link>
      <description>&lt;P&gt;Ok, so at this point, I have to say I don't really have enough familiarity with STATA to help further, but the problem (in my opinion) is either&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;the SAS algorithm estimates scale and standard errors differently than STATA algorithm does; or&lt;/LI&gt;
&lt;LI&gt;the models specified are not identical (despite the matching estimates) because of the REPEATED command in PROC GENMOD produces different estimates of scale and different standard errors than STATA model specification does&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 07 Sep 2022 15:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832140#M82024</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-07T15:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reproduce Stata GLM is SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832262#M82025</link>
      <description>&lt;P&gt;Figured it out. The answer is twofold.&lt;/P&gt;
&lt;P&gt;1) Genmod and Stata estimate the scale parameter and correlation structure slightly differently. Details are given on&amp;nbsp;&lt;A href="https://www.stata.com/support/faqs/statistics/xtgee-divisor-stata-11/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;xtgee&lt;/SPAN&gt;-related FAQ.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2) Genmod by default produces score type III tests while Stata produces Wald type III tests. Wald tests can be requested for SAS, but score tests cannot be produced by Stata.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 21:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reproduce-Stata-GLM-is-SAS/m-p/832262#M82025</guid>
      <dc:creator>JonKetchup</dc:creator>
      <dc:date>2022-09-07T21:59:58Z</dc:date>
    </item>
  </channel>
</rss>

