<?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 output variance-covariance matrix from PROC GENMOD? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-variance-covariance-matrix-from-PROC-GENMOD/m-p/705648#M216522</link>
    <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output CovB=want;
proc genmod data=sashelp.cars;
class DriveTrain(ref="Front") type(ref="SUV") origin(ref="Asia")/param=ref;
model MPG_Highway=DriveTrain type origin type|origin/covb dist=negbin link=log ;
run;


proc print data=want noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 14 Dec 2020 12:36:41 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-12-14T12:36:41Z</dc:date>
    <item>
      <title>How to output variance-covariance matrix from PROC GENMOD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-variance-covariance-matrix-from-PROC-GENMOD/m-p/705549#M216477</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm trying to calculate 95%CI of interaction terms (povcat|racecat) in PROC GENMOD. Both povcat and racecat are categorical variables.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The 95% confidence intervals for RR's based on one estimate are outputted (Wald 95% CI). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'd like to calculate 95% CI &lt;/SPAN&gt;&lt;SPAN&gt;for those with two estimates (interaction terms) based on the variance by taking the square root.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My question is what is the option that I can specify in PROC GENMOD&amp;nbsp;to output variance-covariance matrix V (a+b) = V(a)&amp;nbsp;+ V(b) - CoV (a, b)?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks so much for help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*sashelp dataset*/
proc genmod data=sashelp.cars;
class DriveTrain(ref="Front") type(ref="SUV") origin(ref="Asia")/param=ref;
model MPG_Highway=DriveTrain type origin type|origin/dist=negbin link=log offset=ln;
run;

/*my model*/
proc genmod data=temp;
class zone(ref="0") povcat(ref="1") racecat(ref="0") agecat(ref="6")/param=ref;
model OUTCOME=zone povcat racecat1 agecat povcat|racecat
/dist=negbin link=log offset=ln maxiter=5000;
run;
ods rtf close;
data par1 (keep=PARAMETER LEVEL1 LEVEL2 RR LOW_RR UP_RR); set par;
RR= exp(estimate);
low_rr=exp(estimate-(1.96*stderr));
up_rr=exp(estimate+(1.96*stderr));
where PARAMETER not in ('Intercept','Scale');
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Dec 2020 21:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-variance-covariance-matrix-from-PROC-GENMOD/m-p/705549#M216477</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2020-12-13T21:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to output variance-covariance matrix from PROC GENMOD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-variance-covariance-matrix-from-PROC-GENMOD/m-p/705648#M216522</link>
      <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output CovB=want;
proc genmod data=sashelp.cars;
class DriveTrain(ref="Front") type(ref="SUV") origin(ref="Asia")/param=ref;
model MPG_Highway=DriveTrain type origin type|origin/covb dist=negbin link=log ;
run;


proc print data=want noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Dec 2020 12:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-variance-covariance-matrix-from-PROC-GENMOD/m-p/705648#M216522</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-12-14T12:36:41Z</dc:date>
    </item>
  </channel>
</rss>

