<?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: Surveyreg Procedure in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772728#M245389</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; Sir, beautifully explained. Thank you. I have noted too! Cheers!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2021 13:52:08 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2021-10-07T13:52:08Z</dc:date>
    <item>
      <title>Surveyreg Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772717#M245384</link>
      <description>&lt;P&gt;I use the following code for clustering standard errors for industry and year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Surveyreg data=have;&lt;/P&gt;
&lt;P&gt;cluster industry year;&lt;/P&gt;
&lt;P&gt;class industry year;&lt;/P&gt;
&lt;P&gt;model y= independent_variables industry year/solution;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two questions.&lt;/P&gt;
&lt;P&gt;1. Why does the last value in the cluster variable either industry or year become zero? In the following picture, the value of the year 2019 becomes zero. Can you elaborate, why does this appears, and if require, how to solve this (Maybe x metric is not fully run)?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ramin1_0-1633611843146.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64456iEB766586FB170BDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ramin1_0-1633611843146.png" alt="Ramin1_0-1633611843146.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. How can I get the output of proc surveyreg in SAS data format? I want to get just only the parameter estimate of all companies (when I cluster by gvkey_id), especially the value of standard errors. Otherwise, I can do it manually in excel, it actually will take time as lots of companies are there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for your valuable comments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 13:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772717#M245384</guid>
      <dc:creator>Ramin1</dc:creator>
      <dc:date>2021-10-07T13:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Surveyreg Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772721#M245385</link>
      <description>&lt;P&gt;Question 1: this is how SAS (by default) handles regression coefficients for categorical variables. The last category, alphabetically, is assigned a value of zero. It's normal and nothing to worry about. There are many possible parameterizations for this model with categorical variable, and they are all equivalent — same model, same model fit, same predictions. See &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-with-Categorical/m-p/591230#M28913" target="_self"&gt;here&lt;/A&gt; for further explanation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better than looking at the regression coefficients is to look at the LSMEANS for the categorical variables, this doesn't have the problem of having the last value alphabetically set to zero, and is more easily interpretable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question 2: What output are you talking about? Regression coefficients or predicted values, or something else? PROC SURVEYREG has output data sets, and any table can be turned into a SAS data set via ODS OUTPUT. The &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_surveyreg_overview.htm" target="_self"&gt;documentation&lt;/A&gt; has all the details.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 13:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772721#M245385</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-07T13:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Surveyreg Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772728#M245389</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; Sir, beautifully explained. Thank you. I have noted too! Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 13:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/772728#M245389</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-10-07T13:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Surveyreg Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/775170#M246417</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Hello PaigeMiller, I have a query. I want to capture annual and industry fixed effects that's why I am using code:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Proc Surveyreg data=have;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;cluster industry year;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;class industry year;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;model y= independent_variables industry year/solution;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;However, I want to get the standard errors for each firm, if I use the following does it capture the fixed effect of year and industry?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Proc Surveyreg data=have;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;cluster gvkey;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;class industry year;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;model y= independent_variables industry year/solution;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 16:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Surveyreg-Procedure/m-p/775170#M246417</guid>
      <dc:creator>Ramin1</dc:creator>
      <dc:date>2021-10-19T16:58:39Z</dc:date>
    </item>
  </channel>
</rss>

