<?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: PROC SURVEYREG: Find Grand Mean at certain value of X when you have fixed effects in model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674216#M32264</link>
    <description>&lt;P&gt;I am curious why you are using Surveyreg if you do not have a complex sample design. You don't show any of the sample design information that Surveyreg would expect to have for a complex design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Aug 2020 22:00:45 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-08-03T22:00:45Z</dc:date>
    <item>
      <title>PROC SURVEYREG: Find Grand Mean at certain value of X when you have fixed effects in model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674211#M32262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a stats/PROC SURVEYREG question related to fixed effects models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using PROC SURVEYREG to estimate graduation rates.&amp;nbsp; The model includes fixed effects for schools and a continuous running variable called RANK, which is a number that schools assign students based on their middle school GPA and test scores.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to know is how do I calculate an estimated overall average graduation rate for a particular value of RANK.&amp;nbsp; Currently, I know that intercept actually represents one of the school indicator variables that was dropped due to multicollinearity.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of the code.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SURVEYREG DATA = HAVE;
    CLASS SCHOOL;
    MODEL GRADUATION = SCHOOL + RANK / SOLUTION;
RUN:&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;What I want to know is, for example, what would be the overall average graduation rate for a given value of RANK such as RANK = 10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any help.&amp;nbsp; Please let me know if there is any additional information I can provide.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bill&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 21:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674211#M32262</guid>
      <dc:creator>whs278</dc:creator>
      <dc:date>2020-08-03T21:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYREG: Find Grand Mean at certain value of X when you have fixed effects in model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674216#M32264</link>
      <description>&lt;P&gt;I am curious why you are using Surveyreg if you do not have a complex sample design. You don't show any of the sample design information that Surveyreg would expect to have for a complex design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 22:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674216#M32264</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-03T22:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYREG: Find Grand Mean at certain value of X when you have fixed effects in model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674237#M32265</link>
      <description>&lt;P&gt;That is a good question.&amp;nbsp; There is some weighting involved, and we are also clustering standard errors.&amp;nbsp; &amp;nbsp;In the previous example, I was trying to simplify the code a little bit, but the actual code looks more like this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SURVEYREG DATA = HAVE;
   CLUSTER DISTRICT;
   CLASS SCHOOL; 
   MODEL GRADUATION = SCHOOL RANK / SOLUTION;
   WEIGHT WEIGHTS;
RUN; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Aug 2020 01:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674237#M32265</guid>
      <dc:creator>whs278</dc:creator>
      <dc:date>2020-08-04T01:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYREG: Find Grand Mean at certain value of X when you have fixed effects in model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674308#M32273</link>
      <description>&lt;P&gt;PROC SURVEYREG supports the LSMEANS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding this line to your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LSMEANS school / AT rank= &amp;lt;insert the given value of rank that interests you.&amp;nbsp; You can have several LSMEANS statements each with a different rank value&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would give the marginal means at a given rank for each of the schools.&amp;nbsp; Using an ODS OUTPUT statement you could get these into a dataset.&amp;nbsp; &amp;nbsp;From these, a weighted mean could be calculated using SURVEYMEANS with a BY statement.&amp;nbsp; You may have to merge (or use SQL) to get the cluster variable DISTRICT on the marginal means dataset. In PROC SURVEYMEANS this would become a STRATA variable. I know this seems kind of round-about, but I don't see a way to obtain the higher level (overall) adjusted means staying with just SURVEYREG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 11:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYREG-Find-Grand-Mean-at-certain-value-of-X-when-you/m-p/674308#M32273</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-08-04T11:21:25Z</dc:date>
    </item>
  </channel>
</rss>

