<?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: OLS repeated-measures regression with fixed effect for subject and clustered standard errors in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834932#M41362</link>
    <description>&lt;P&gt;Interesting that removing the reference had such an effect on the estimates.&lt;/P&gt;
&lt;P&gt;Thanks so much for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2022 19:04:25 GMT</pubDate>
    <dc:creator>confooseddesi89</dc:creator>
    <dc:date>2022-09-23T19:04:25Z</dc:date>
    <item>
      <title>OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834758#M41351</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working on some repeated-measures long-format data where each subject (identified by user_ID) has a value (outcome) at several moments in time. Avg_Num is the time point indicator and represents a three-day average around daylight savings time (DST), with 0 indicating the three-day average for that outcome begins with the DST date for Fall 2021 – that is, Nov 7 to Nov 9. The average for Nov 10 to Nov 12 is indicated by a 1 for Avg_Num; and Nov 4 to Nov 6 is −1, Nov 1 to Nov 3 is −2, etc. I created dummy-coded variables for each Avg_Num such that &lt;STRONG&gt;Neg_4&lt;/STRONG&gt;_FA_21 = 1 means that Avg_Num = −4 (the 4&lt;SUP&gt;th&lt;/SUP&gt; 3-day average before Nov 7; Oct 26-28) for that row/average; &lt;STRONG&gt;Neg_3&lt;/STRONG&gt;_FA_21 = 1 means that Avg_Num = −3 (the 3&lt;SUP&gt;rd&lt;/SUP&gt; 3-day average before Nov 7; Oct 29-31) for that row/average; &lt;STRONG&gt;Zero&lt;/STRONG&gt;_FA_21 = 1 means that Avg_Num=0 (Nov 7-9), etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See sample data below:&lt;/P&gt;
&lt;TABLE width="1302"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;user_id&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;Avg_Num&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;outcome&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;Neg_4_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;Neg_3_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;Neg_2_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;Zero_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;Pos_1_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;Pos_2_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;Pos_3_FA_21&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;478.333&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;461.333&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;389.667&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;458&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;499&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;384.667&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;460.667&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;300&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;381.667&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;96.5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;130.5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;285&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;85&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;125.5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;383.667&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;304&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;574.5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;305&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;232.333&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;305&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;516&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;305&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;493&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;305&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;-1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;405.667&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="63.2667px" height="30px"&gt;
&lt;P&gt;305&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="80.75px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72.1667px" height="30px"&gt;
&lt;P&gt;441.333&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.85px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150.867px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="136.6px" height="30px"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="165.283px" height="30px"&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The goal is to examine whether the outcome at each three-day average differs from average at the reference point, which is three days before Nov 7 (Nov 4-6), where Avg_Num = −1 and Neg_1_FA_21 = 1. Therefore, my effects in the model would be Neg_4_FA_21, Neg_3_FA_21, Neg_2_FA_21, Zero_FA_21, Pos_1_FA_21, Pos_2_FA_21, and Pos_3_FA_21 (skipping the reference dummy of Neg_1_FA_21).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on discussions with my colleagues, I would like to run an ordinary least squares regression &lt;STRONG&gt;with a fixed effect for the subject (user_ID) &lt;/STRONG&gt;and &lt;STRONG&gt;clustered standard errors&lt;/STRONG&gt; to represent the repeated-measures nature of the data. Here is the code I've come up with based on some Googling:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm; absorb user_ID;
 model outcome = Neg_4_FA_21 Neg_3_FA_21 Neg_2_FA_21 Zero_FA_21 
Pos_1_FA_21 Pos_2_FA_21 Pos_3_FA_21;
repeated user_ID / type=un; run;quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could anyone please provide me guidance on whether this code is correct? For example, do I need the "repeated" statement if I have the "absorb" statement? I'm more familiar with PROC REG and MIXED than with GLM, and I'm not sure if this is the best way to examine the change in my outcome around Nov 7. In fact, I'd much rather do the analyses in PROC MIXED, but I don't know how to do a fixed effect for subject in PROC MIXED, only a random effect. Any help is appreciated.&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>Fri, 23 Sep 2022 01:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834758#M41351</guid>
      <dc:creator>confooseddesi89</dc:creator>
      <dc:date>2022-09-23T01:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834833#M41355</link>
      <description>&lt;P&gt;I would do this in MIXED as well. It should be easy enough, and I don't see any reason to create all of the dummy variables - the CLASS statement should do that for you.&amp;nbsp; Where things get complicated is the request to do this using OLS, where MIXED is a likelihood based program. You could specify method=mivque0 to prevent iterative calculation of the likelihood.&amp;nbsp; Don't try something like method=type3, as that applies only to variance component models with no subject effects and no repeated statement.&amp;nbsp; However, I would prefer the default REML method to the OLS method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are interested solely in the marginal response, look at PROC GEE as an alternative.&amp;nbsp; Search this forum for posts by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;for help on that approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 13:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834833#M41355</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-09-23T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834872#M41357</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for this reply. I much prefer PROC MIXED. Could you take a look at the following code? Also, is the "fixed effect" for subject represented in the "repeated" line of my code?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed NOCLPRINT NOITPRINT;
class user_ID Avg_Num (ref='-1');
model outcome = Avg_Num / SOLUTION;
repeated / subject=user_ID type=ar(1);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 16:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834872#M41357</guid>
      <dc:creator>confooseddesi89</dc:creator>
      <dc:date>2022-09-23T16:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834891#M41358</link>
      <description>&lt;P&gt;I don't think that will do exactly what you want, but without some data to play with I can't be sure.&amp;nbsp; For instance, given your design I would try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed NOCLPRINT NOITPRINT;
class user_ID Avg_Num; /* (ref='-1'); -&amp;gt; removed as a midrange reference point can create problems when you start creating LSMEANS */
model outcome = Avg_Num / SOLUTION;
repeated Avg_Num/ subject=user_ID type=ar(1); /* not critical, but it makes it apparent immediately what the repeated factor is */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So in this case user_ID is a fixed effect, so any inference refers only to those users included in your data.&amp;nbsp; If you wish to expand to all possible users, you will need a statement like:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;RANDOM intercept/subject=user_ID;&lt;/PRE&gt;
&lt;P&gt;However, convergence or even estimation may require more data than you have available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 17:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834891#M41358</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-09-23T17:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834903#M41360</link>
      <description>&lt;P&gt;Okay, it looks like the changes you made were (1) removing the -1 reference point (I added it back because I need this as the reference), and (2) adding "Avg_Num" after "repeated."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you explain to me what (2) does? With this addition, according to the output for PROC MIXED on my full dataset, the estimates are lower, the standard errors are higher, and the p-values are higher. If you absolutely need some sample data to assist, I could provide that, but for privacy reasons I would prefer not to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 18:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834903#M41360</guid>
      <dc:creator>confooseddesi89</dc:creator>
      <dc:date>2022-09-23T18:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834914#M41361</link>
      <description>&lt;P&gt;I am pretty sure the two are connected.&amp;nbsp; By setting -1 as the reference, the matrix is set up so that the last entry (set to zero) is the reference.&amp;nbsp; This disturbs the ordinal nature of your data, as the estimate of the correlation used in AR(1) is dependent on the ordering and not on an index.&amp;nbsp; As a result, rho is estimated from values at -4, -3, -2, 0, 1, 2, 3, -1, rather than the ordinal values from -4 to 3. That will increase the standard error in this case, and cause a small change in the point estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wish to compare the other timepoints to -1, there are better ways than setting that group as a reference and examining the solution vector, and those preserve the ordinal nature of your data. You can compare the LSmeans at the various other timepoints to that timepoint by using an LSMESTIMATE statement, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed NOCLPRINT NOITPRINT;
class user_ID Avg_Num; /* (ref='-1'); -&amp;gt; removed as a midrange reference point can create problems when you start creating LSMEANS */
model outcome = Avg_Num / SOLUTION;
repeated Avg_Num/ subject=user_ID type=ar(1); /* not critical, but it makes it apparent immediately what the repeated factor is */
lsmeans avg_num/cl;
lsmestimate avg_num '-4 v -1' -1 0 0 1 0 0 0 0,
                     '-3 v -1' 0 -1 0 1 0 0 0 0,&lt;BR /&gt;                     '-2 v -1' 0 0 -1 1 0 0 0 0,&lt;BR /&gt;                     '0 v -1'  0 0 0 1 -1 0 0 0,&lt;BR /&gt;                      '1 v -1' 0 0 0 1 0 -1 0 0,&lt;BR /&gt;                      '2 v -1' 0 0 0 1 0 0 -1 0,&lt;BR /&gt;                      '3 v -1' 0 0 0 1 0 0 0 -1/ cl /* add in any multiple comparisons method if you want */;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 18:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834914#M41361</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-09-23T18:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: OLS repeated-measures regression with fixed effect for subject and clustered standard errors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834932#M41362</link>
      <description>&lt;P&gt;Interesting that removing the reference had such an effect on the estimates.&lt;/P&gt;
&lt;P&gt;Thanks so much for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 19:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/OLS-repeated-measures-regression-with-fixed-effect-for-subject/m-p/834932#M41362</guid>
      <dc:creator>confooseddesi89</dc:creator>
      <dc:date>2022-09-23T19:04:25Z</dc:date>
    </item>
  </channel>
</rss>

