<?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 MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/300442#M15978</link>
    <description>&lt;P&gt;I'm really at a loss then. &amp;nbsp;Is this something like what you want to do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED data= InDat.;
          class city qtr ;
          MODEL response =  fixed_effects qtr fixed_effect*qtr   / DDFM=KR Solution;
          RANDOM intercept /  subject=city Solution;
 
          REPEATED qtr  / TYPE=ARMA(1,1) subject=city;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may need to move to HPMIXED or HPLMIXED to get anything to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&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 2016 17:01:06 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2016-09-23T17:01:06Z</dc:date>
    <item>
      <title>PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299406#M15926</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running multiple versions of a model through the %MACRO below. &amp;nbsp;I want to specify an AR(1) (or ARMA 1,1) for the&amp;nbsp;&lt;STRONG&gt;R&lt;/STRONG&gt; matrix&amp;nbsp;&lt;U&gt;&lt;EM&gt;and&lt;/EM&gt;&lt;/U&gt; produce estimates of the in-group mixed effect estimates (in other words, the group-specific coefficients).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program runs fine when the REPEATED statement is not used, but the marginal Var-Covar matrix does not appear to have the correct form. &amp;nbsp;I've seen many examples of using RANDOM and REPEATED together to produce an AR(1) Covariance structure, but none with the ESTIMATE function being run -- Am I doing something wrong, misunderstanding how RANDOM and/or REPEATED interact??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;%macro ME_Estimate(InDat, FEtab, REtable, groupvar, FE, RE);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %local i;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %let nRE = %sysfunc(countw(&amp;amp;RE.));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;DATA temp; set &amp;amp;InDat.; RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;PROC SQL noprint;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SELECT DISTINCT &amp;amp;GROUPVAR. INTO :GRP_LIST separated by " " FROM temp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SELECT COUNT(DISTINCT CITY) INTO :N_grp FROM temp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;PROC MIXED data= &amp;amp;InDat.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;class &amp;amp;groupvar. qtr;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;MODEL response&amp;nbsp;= &amp;nbsp; &amp;amp;FE. &amp;nbsp; &amp;nbsp;/ DDFM=KR Solution;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;RANDOM &amp;amp;RE. / TYPE=ARMA(1,1) subject=&amp;amp;groupvar. Solution;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;REPEATED qtr &amp;nbsp;/&amp;nbsp;TYPE=ARMA(1,1) subject=&amp;amp;groupvar.;&lt;STRONG&gt; * HERE IS THE PROBLEM ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%DO i = 1 %TO &amp;amp;N_grp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%LET CURR_GRP =%SCAN(&amp;amp;GRP_LIST,&amp;amp;I.);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%DO tests = 1 %TO &amp;amp;nRE.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%LET CURR_RE = %SCAN(&amp;amp;RE., &amp;amp;tests.);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;ESTIMATE "&amp;amp;CURR_RE._&amp;amp;CURR_GRP." &amp;amp;CURR_RE. 1 | &amp;amp;CURR_RE. 1 / subject %est_Zeroes(&amp;amp;i.);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%END;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%END;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;ods output SolutionF = &amp;amp;FEtab.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SolutionR = REdeviate &amp;nbsp;estimates = &amp;amp;REtable.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;PROC DATASETS noprint; DELETE TEMP; RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;%mend;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then call the macro with something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%let FEvars1 = Var1&amp;nbsp;Var2&amp;nbsp;Var3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %let REvars1_1 = Var1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%ME_Estimate(InDat=V&amp;amp;V._ALL(where=(qtr &amp;gt;= '1JAN1987'd)), &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;FEtab = FEout1_1,&amp;nbsp;REtable= REout1_1, groupvar=GRP1,&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;FE = &amp;amp;FEvars1.,&amp;nbsp;RE = &amp;amp;REvars1_1.)&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the Est_Zeroes macro is simply:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;%macro est_Zeroes(numzeroes);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;%local i;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;%do i = 1 %to %eval(&amp;amp;numzeroes-1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;%end;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;%mend;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I said, it works fine without the REPEATED statement. &amp;nbsp;When I include REPEATED the Std Errors and/or the estimates from the Random Effects Solutions are zero!! &amp;nbsp;I'm not sure what's going on. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 22:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299406#M15926</guid>
      <dc:creator>TBeans</dc:creator>
      <dc:date>2016-09-19T22:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299569#M15931</link>
      <description>&lt;P&gt;One thing that helps me is to step back from the macro version and see if I can get PROC MIXED to behave with regular input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED data= InDat.;
          class groupvar qtr fixed_effects;
          MODEL response =  fixed_effects qtr fixed_effect*qtr   / DDFM=KR Solution;
          RANDOM intercept /  subject=groupvar Solution;
 
          REPEATED qtr  / TYPE=ARMA(1,1) subject=groupvar;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here I used groupvar to mean the subject on which the repeated measures are observed. I introduce fixed_effects to cover all fixed effects in the model, qtr is the time indicator, and I make sure I include the time by fixed effect interaction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the RANDOM statement, I do not specify any TYPE=, as I only want to model variability across subjects.&lt;/P&gt;
&lt;P&gt;The REPEATED statement covers the ARMA structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try fitting this to see if it gives sensible results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see the following as possible causes of your problem--failure to include the repeated effect variable in the model statement, or modeling both the RANDOM and REPEATED effect identically. &amp;nbsp;The latter will lead to zeroes (as you have found), the former fails to apply the repeated nature of observations to the subjects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&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>Tue, 20 Sep 2016 14:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299569#M15931</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-09-20T14:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299616#M15934</link>
      <description>&lt;P&gt;Hi Steve!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I certainly agree with the general principle of wokring in regular, non-macro version. &amp;nbsp;I've beening trying your suggestions but I think I'm running into the limitations of my dataset and available processing power.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) When I include my fixed effects variables in the CLASS statement&amp;nbsp;then I get the &lt;FONT face="courier new,courier"&gt;Error:&amp;nbsp;The SAS System stopped processing this step because of insufficient memory&lt;/FONT&gt;. &amp;nbsp;I can avoid this by reducing the model to a single covariate (which I really don't want to do) but even then the model fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) In the greatly simplified model I get the &lt;FONT face="courier new,courier"&gt;Warning: Stopped because of infinite likelihood&lt;/FONT&gt;&amp;nbsp; (actually, I got this after I upped the maxiter to over 1000).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the issue really seems to be inclusion of the Fixed Effect covariates in the CLASS statement. &amp;nbsp;I don't fully understand why this is necessary -- but whenever I don't do this, I return to my original problem: zero estimated random effects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could you explain why it is necessary to include the FE-Vars in CLASS&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given these results, would you recommend trying to shift into PROC HPMIXED? &amp;nbsp;I've already started to try this, but I'm getting similar issues with infinite likelihood values (i.e., No valid objective function could be found) or a Non-PD G matrix....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 17:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299616#M15934</guid>
      <dc:creator>TBeans</dc:creator>
      <dc:date>2016-09-20T17:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299619#M15935</link>
      <description>&lt;P&gt;Most likely you are running out of memory because you put a continuous variable on the CLASS statement. Only put the categorical (discrete) fixed effects on the CLASS statement. Include the continuous effects in the MODEL statement, but not in the CLASS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 17:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299619#M15935</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-09-20T17:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299621#M15936</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;&amp;nbsp;has pointed this out, and it is where you were at the start. It isn't necessary to include them as CLASS variables, provided it makes sense to consider each of them as a continuous regressor, as you are not going to be able to get point estimates without extensive use of the AT= option in the ESTIMATE and LSMESTIMATE statement. &amp;nbsp;If you are going to go this route, consider centering all of them (but don't rescale).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now as far as the infinite likelihood problem. &amp;nbsp;That is most often due to multiple observations per subject at a time point. &amp;nbsp;If this occurs, it will show up right away, and never get started. &amp;nbsp;However, if you hit an infinite likelihood after 1000 iterations, it is something else, most likely a near floating point overflow. &amp;nbsp;Recentering your covariates will help. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, are the covariates time-varying? &amp;nbsp;If they are not constant across all time points, then this becomes a very different problem. &amp;nbsp;You may want to look into PROC PANEL in SAS/ETS to get around this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, some basic info--how many levels of qtr do you hope to fit, how many fixed effects do you hope to include in the model, and how many subjects do you have? &amp;nbsp;I probably should have asked that to begin with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 17:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299621#M15936</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-09-20T17:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299696#M15948</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;&amp;nbsp;That makes sense -- I figured it was the inclusion of a continuous variable in the CLASS statement that was eating up the memory. &amp;nbsp;I do have some non-continuous regressors that I guess I should include the CLASS statement. &amp;nbsp;But the failed model estimtations I referred to in my earlier reply did not include these discrete variables.... the final model woud/should, so thanks for clarifying!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham﻿&lt;/a&gt;&amp;nbsp;My observations -- 11 cities which are my SUBJECT, and each contain (in this particular version) 57 quarters of data. &amp;nbsp;I'm trying to pull out Mixed Effects specific to each city. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;By way of background&lt;/U&gt;: Before attempting an explicit AR(1) residual covariance specification, I implemented a&amp;nbsp;&lt;STRONG&gt;Crossed Effects&amp;nbsp;&lt;/STRONG&gt;model in which I independently grouped by City and Quarter. &amp;nbsp;I was doing this in R (for the the &lt;FONT face="courier new,courier"&gt;lme4&lt;/FONT&gt; package makes such implementation easy), I specifically changed to SAS upon learning of its wider arrange of covariance structure otpions. &amp;nbsp;In the crossed effects model, the idea was that controlling for cross-sectional variations (i.e., the qurater groups) helped control for some of the serial/AR correlation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Regarding your other questions:&lt;/P&gt;&lt;P&gt;A) I don't have multiple observations: Each observation is 1 city in 1 quarter.&lt;/P&gt;&lt;P&gt;B) All of the covariates are time-varying.&lt;/P&gt;&lt;P&gt;C) I would like to include six (6) or seven (7) Fixed Effects, and then permute which covariates I treat as random effects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm fairly new to SAS, but I haven't looking into PROC PANEL because I'm specifically intersted in extracting the CITY-level effects, and -- AFAIK -- Panel methodologies will either be "fixed effects" in which I can only pull out a constant term (and not a "slope" estiamte) for each group, and "random effects" using the FGLS approach (and is rather similar to the LMM approach) doesn't give you a way to pull out group-specific estimates. &amp;nbsp;Why do you say it becomes a very different problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try recentering the variables! &amp;nbsp;That's a great idea -- and now I remember having to do this rebasing in R sometime ago.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know what you think is reasonable or illogical in what I'm thinking now!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks to you both!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 21:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/299696#M15948</guid>
      <dc:creator>TBeans</dc:creator>
      <dc:date>2016-09-20T21:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/300442#M15978</link>
      <description>&lt;P&gt;I'm really at a loss then. &amp;nbsp;Is this something like what you want to do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED data= InDat.;
          class city qtr ;
          MODEL response =  fixed_effects qtr fixed_effect*qtr   / DDFM=KR Solution;
          RANDOM intercept /  subject=city Solution;
 
          REPEATED qtr  / TYPE=ARMA(1,1) subject=city;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may need to move to HPMIXED or HPLMIXED to get anything to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&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 2016 17:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/300442#M15978</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-09-23T17:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED AR(1) with RANDOM and REPEATED fails to ESTIMATE Random Effect coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/313586#M16513</link>
      <description>&lt;P&gt;Sorry for the long delayed reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes in the end moving to PROC HPMIXED overcame the limitations I was facing with the MIXED procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-AR-1-with-RANDOM-and-REPEATED-fails-to-ESTIMATE/m-p/313586#M16513</guid>
      <dc:creator>TBeans</dc:creator>
      <dc:date>2016-11-22T20:31:10Z</dc:date>
    </item>
  </channel>
</rss>

