<?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 Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873356#M43204</link>
    <description>&lt;P&gt;I do not understand your data -- is it a crossover design with repeated measures? Or just a repeated measures data? If you can share your data that would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statement --&lt;/P&gt;
&lt;PRE&gt;random Intercept phase/sub=case;&lt;/PRE&gt;
&lt;P&gt;specifies 2 columns in the Z matrix for each subject -- a column of 1 (intercept) and a column for Phase.&lt;/P&gt;
&lt;P&gt;The Estimated G matrix is not positive definite message indicates that the model might not work for your data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statement --&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;random  Intercept/sub=case type=cs residual;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;models the correlations in the (linearized) residuals. It is similar to the REPEATED statement in PROC MIXED. So there is no G-side random effect, therefore no Z matrix. The syntax above specifies INTERCEPT as the repeated effect, which might not be appropriate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statements -&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;random  phase/sub=case type=cs residual;
random intercept/sub =case;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;specify a random intercept model as well as a CS correlated "residuals". This is likely an overspecified model and therefore encountered some convergence issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, if you can share your data (even with the fake y values) I might be able to provide more assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 12:50:47 GMT</pubDate>
    <dc:creator>jiltao</dc:creator>
    <dc:date>2023-05-02T12:50:47Z</dc:date>
    <item>
      <title>Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873031#M43174</link>
      <description>&lt;P&gt;I have repeated (over time) data on 9 subjects, subjected to two types of 'Phases' - Treatment and Control, similar to below table (for just 2 subjects - second columns is outcome Y - in count format). There are a total of 4 phases, alternating in an ABAB design.&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="64" height="19" style="height: 14.5pt; width: 48pt;"&gt;A&lt;/TD&gt;
&lt;TD width="64" align="right" style="width: 48pt;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;B&lt;/TD&gt;
&lt;TD align="right"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I converted the outcomes to proportions and am trying to fit a mixed effects logit model. The first model only has 2 random effects - Intercept and Phase :&lt;/P&gt;
&lt;PRE&gt;title "Basic logit model";
proc glimmix data=lambert2;
class case;
model y = phase/solution dist=binomial 	link=logit cl;
random Intercept phase/sub=case;
run;
OUTPUT:
Dimensions 
G-side Cov. Parameters 2 
Columns in X 2 
Columns in Z per Subject 2 
Subjects (Blocks in V) 9 
Max Obs per Subject 59 


Estimated G matrix is not positive definite. 


Fit Statistics 
-2 Res Log Pseudo-Likelihood 1847.10 
Generalized Chi-Square 241.97 
Gener. Chi-Square / DF 0.53 



Covariance Parameter Estimates 
Cov Parm Subject Estimate Standard
Error 
Intercept case 0 . 
phase case 0 . 


&lt;/PRE&gt;
&lt;P&gt;Q1: In the Output Dimensions Table, which are the columns in X and which variables go in Z? Are both Intercept and Phase random errors considered G-side parameters? Both covariance parameters are 0 - what does this mean?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, I dummy coded the Phase variable to reflect the ABAB design (with three dummies ) and re-ran the Mixed Logit model with what I thought were R-side errors using compound symmetry (I mean that I am modeling the within subject correlation using compound symmetry) as below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Model with only R-side CS errors";
proc glimmix data=model_dat2;
class case phase;
model y = flag_2 flag_3 flag_4/solution dist=binomial 	link=logit cl;
random  Intercept/sub=case type=cs residual;
run;

OUTPUT:
Dimensions 
R-side Cov. Parameters 2 
Columns in X 4 
Columns in Z per Subject 0 
Subjects (Blocks in V) 9 
Max Obs per Subject 59 

Fit Statistics 
-2 Res Log Pseudo-Likelihood 1718.07 
Generalized Chi-Square 141.32 
Gener. Chi-Square / DF 0.31 



Covariance Parameter Estimates 
Cov Parm Subject Estimate Standard
Error 
CS case 0.006232 0.006211 
Residual   0.3099 0.02071 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For the model with the ABAB phase dummies as above, why is number of columns in Z=0? I have specified "Intercept" as a random effect (at least that's my intention)? Is my syntax incorrect? Is the variance of the Intercept not considered a G-side random effect?&lt;/P&gt;
&lt;P&gt;Then I&amp;nbsp;tried running the syntax below but this does not converge:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Model with only R-side CS errors -with Intercept";
proc glimmix data=model_dat2;
class case phase;
model y = flag_2 flag_3 flag_4/solution dist=binomial 	link=logit cl;
/*random Intercept flag_2 flag_3 flag_4/sub=case;*/
random  phase/sub=case type=cs residual;
random intercept/sub =case;
run;

OUTPUT:
Dimensions 
G-side Cov. Parameters 1 
R-side Cov. Parameters 2 
Columns in X 4 
Columns in Z per Subject 1 
Subjects (Blocks in V) 9 
Max Obs per Subject 59 

Did not converge. 



Covariance Parameter Estimates 
Cov Parm Subject Estimate Standard
Error 
Intercept case 0.2221 . 
CS case -0.03368 . 
Residual   0.3067 . 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How do I interpret the above results?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 03:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873031#M43174</guid>
      <dc:creator>nstdt</dc:creator>
      <dc:date>2023-04-30T03:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873233#M43195</link>
      <description>&lt;P&gt;I'll hit the last one as it is one I have seen many times when fitting an R side effect to a binomial dataset.&amp;nbsp; The most likely cause of failure to converge is that you have run up against the default maximum iteration limit of 20 iterations. Try adding an NLOPTIONS statement with maxiter=5000 for example. If you still are not converging, your data is probably "pathological" with respect to the residuals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Backing up one step, if you fit only an R side structure, the lack of Z columns is dependent solely on the syntax chosen, and the number of effects in your random / residual statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 18:54:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873233#M43195</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-05-01T18:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873250#M43198</link>
      <description>&lt;P&gt;Thanks so much for the reply! I will try increasing the interations. Meanwhile, I want to know how I can get G-side effects for the Intercept in the model shown below(I have specified a random Intercept - but number of columns in Z=0 per the SAS output - what is wrong with my syntax???):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Model with only R-side CS errors";
proc glimmix data=model_dat2;
class case phase;
model y = flag_2 flag_3 flag_4/solution dist=binomial 	link=logit cl;
random  Intercept/sub=case type=cs residual;
run;

OUTPUT:
Dimensions 
R-side Cov. Parameters 2 
Columns in X 4 
Columns in Z per Subject 0 
Subjects (Blocks in V) 9 
Max Obs per Subject 59 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2023 19:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873250#M43198</guid>
      <dc:creator>nstdt</dc:creator>
      <dc:date>2023-05-01T19:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873356#M43204</link>
      <description>&lt;P&gt;I do not understand your data -- is it a crossover design with repeated measures? Or just a repeated measures data? If you can share your data that would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statement --&lt;/P&gt;
&lt;PRE&gt;random Intercept phase/sub=case;&lt;/PRE&gt;
&lt;P&gt;specifies 2 columns in the Z matrix for each subject -- a column of 1 (intercept) and a column for Phase.&lt;/P&gt;
&lt;P&gt;The Estimated G matrix is not positive definite message indicates that the model might not work for your data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statement --&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;random  Intercept/sub=case type=cs residual;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;models the correlations in the (linearized) residuals. It is similar to the REPEATED statement in PROC MIXED. So there is no G-side random effect, therefore no Z matrix. The syntax above specifies INTERCEPT as the repeated effect, which might not be appropriate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statements -&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;random  phase/sub=case type=cs residual;
random intercept/sub =case;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;specify a random intercept model as well as a CS correlated "residuals". This is likely an overspecified model and therefore encountered some convergence issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, if you can share your data (even with the fake y values) I might be able to provide more assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 12:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873356#M43204</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2023-05-02T12:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873425#M43213</link>
      <description>&lt;P&gt;I have an ABAB design with repeated time observations within a single phase (A - baseline phase, B- treatment phase. Each subject gets both phases, repeated many times, about 10 to 30 per subject per phase). There are 9 subjects in total. What is the best wyay to model this data using a mixed model structure - I was trying to see if each subject is a 'unit', and it makes sense to have random effects for the Intercept and maybe the Phase for each subject. But there is also the correlation amongst 'outcome' scores for a specific subject within a Phase - surely that has to be something like AR(1) or CS?&lt;/P&gt;
&lt;P&gt;Here is data from one single subject 'case A1':&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case	phase	time	outcome
case A1	1	1	7
case A1	1	2	9
case A1	1	3	8
case A1	1	4	6
case A1	1	5	7
case A1	1	6	4
case A1	1	7	5
case A1	1	8	10
case A1	1	9	2
case A1	1	10	0
case A1	2	15	3
case A1	2	16	8
case A1	2	17	8
case A1	2	18	6
case A1	2	19	10
case A1	2	20	10
case A1	2	21	10
case A1	2	22	8
case A1	2	23	3
case A1	2	24	4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 May 2023 16:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873425#M43213</guid>
      <dc:creator>nstdt</dc:creator>
      <dc:date>2023-05-02T16:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873451#M43215</link>
      <description>&lt;P&gt;The following paper has an example that is similar to your situation --&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf" target="_blank"&gt;Microsoft Word - SAS1919-2015.docx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;See Pages 4-6.&lt;/P&gt;
&lt;P&gt;You might need to recode the values for time -- right now the values seem to be continuous throughout the data set, which might need to be changed. Also, Phase might need to be in the CLASS statement.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 18:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873451#M43215</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2023-05-02T18:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix - confusion about specifying R-side vs. G-side parameters and output interpretation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873475#M43218</link>
      <description>&lt;P&gt;Thanks so much! The values per se of the 'time' variable aren;t important - I'm just interested in the correlation over time within a Phase for a specific subject.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 19:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-confusion-about-specifying-R-side-vs-G-side/m-p/873475#M43218</guid>
      <dc:creator>nstdt</dc:creator>
      <dc:date>2023-05-02T19:31:38Z</dc:date>
    </item>
  </channel>
</rss>

