<?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: Obtain results of CLASS variables from GENMOD in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906475#M45014</link>
    <description>&lt;P&gt;I used the following code to get a similar result to the PROC GENMOD. Is there a way to tweak my code to yield the same result? The confidence intervals are also wider with PROC MIXED. I assume that's from the different methodology used to calculate them, but it doesn't look like you can specify method with PROC MIXED.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data= DSNIN;
 by ACTARMN;
 class USUBJID;
 model log2_AVAL=ATPTN / s htype= 3 cl corrb outpred= Prediction;
 *random int / sub= USUBJID;
 repeated / subject= USUBJID type= ar(1);
 ods output SolutionF= Reg_Mod2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Dec 2023 15:28:02 GMT</pubDate>
    <dc:creator>mariko5797</dc:creator>
    <dc:date>2023-12-06T15:28:02Z</dc:date>
    <item>
      <title>Obtain results of CLASS variables from GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906304#M44994</link>
      <description>&lt;P&gt;Per code from a previous study, half-life is calculated as follows using a linear model. However, in addition to the mean half-life, I also want the minimum and maximum, and I want to calculate a p-value (Mann Whitney U Test). Is there a way to get the half-life results for each individual subject using GENMOD or a different SAS procedure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DSNIN;
 label 	USUBJID	= "Unique Subject Identifier"
 		ACTARMN	= "Actual Treatment Arm (N)"
		ATPTN	= "Analysis Time Point (N)"
		AVAL	= "Analysis Value (PRNT Result)"
		;
 input USUBJID ACTARMN ATPTN AVAL @@;
 cards;
 1	1	1	10 	1	1	15	49 	1	1	29	79 
 1	1	43	271	1	1	57	216	1	1	90	142
 1	1	181	86 	1	1	365	20 
 2	1	1	12 	2	1	15	54 	2	1	29	89 
 2	1	43	267	2	1	57	209	2	1	90	131
 2	1	181	80 	2	1	365	26 
 3	1	1	21 	3	1	15	60 	3	1	29	101
 3	1	43	282	3	1	57	220	3	1	90	151
 3	1	181	85 	3	1	365	29 
 4	2	1	17 	4	2	15	55 	4	2	29	90 
 4	2	43	291	4	2	57	232	4	2	90	160
 4	2	181	100	4	2	365	32 
 5	2	1	17 	5	2	15	59  5	2	29	99 
 5	2	43	286	5	2	57	203	5	2	90	151
 5	2	181	91 	5	2	365	18 
 6	2	1	20 	6	2	15	56 	6	2	29	92 
 6	2	43	288	6	2	57	226	6	2	90	151
 6	2	181	90 	6	2	365	18 
 ;
data DSNIN;
 set DSNIN;
 where ATPTN&amp;gt;=29;	/*after second vaccination*/
 	log2_AVAL = log2(AVAL);
run;

/*GEE Model*/
proc genmod data= DSNIN; 
 by ACTARMN;
 class USUBJID;
 model log2_AVAL=ATPTN	/ dist= normal link= identity corrb type3;
 ods output GEEEmpPEst= Reg_Mod;
 repeated subject= USUBJID / corr= ar(1) corrw;
run;

proc sql;
 create table Results as
 	select 'PRNT' as ASSAY, ACTARMN, -1*(1/Estimate) as T_HALF, -1*(1/LowerCL) as T_HALF_LB, -1*(1/UpperCL) as T_HALF_UB
		from Reg_Mod
		where PARM= 'ATPTN';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 18:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906304#M44994</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2023-12-05T18:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain results of CLASS variables from GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906318#M44996</link>
      <description>&lt;P&gt;If I understand your question, you can use PROC MIXED to fit the model, then &lt;SPAN&gt;use&amp;nbsp;&lt;/SPAN&gt;&lt;A title="PROC MIXED documentation of the OUTPRED= option" href="https://bit.ly/2Pzfysj" target="_blank"&gt;the OUTPRED= option on the MODEL statement&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;to create an output data set in which the predicted values incorporate the random intercept for each person.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;See the last example and discussion at&amp;nbsp;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/12/19/visualize-mixed-model.html" target="_self"&gt;Visualize a mixed model that has repeated measures or random coefficients&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 19:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906318#M44996</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-12-05T19:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain results of CLASS variables from GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906475#M45014</link>
      <description>&lt;P&gt;I used the following code to get a similar result to the PROC GENMOD. Is there a way to tweak my code to yield the same result? The confidence intervals are also wider with PROC MIXED. I assume that's from the different methodology used to calculate them, but it doesn't look like you can specify method with PROC MIXED.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data= DSNIN;
 by ACTARMN;
 class USUBJID;
 model log2_AVAL=ATPTN / s htype= 3 cl corrb outpred= Prediction;
 *random int / sub= USUBJID;
 repeated / subject= USUBJID type= ar(1);
 ods output SolutionF= Reg_Mod2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Dec 2023 15:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906475#M45014</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2023-12-06T15:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain results of CLASS variables from GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906489#M45015</link>
      <description>&lt;P&gt;They are different models, so rather than trying to get the results to be the same, you should ask yourself which model is more appropriate for your data. The GEE model is marginal, whereas the mixed model is conditional. You can do an internet search to read more about when you should use GEE vs mixed models. For example, see &lt;A href="https://stats.stackexchange.com/questions/16390/when-to-use-generalized-estimating-equations-vs-mixed-effects-models" target="_blank"&gt;When to use generalized estimating equations vs. mixed effects models? - Cross Validated (stackexchange.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kathleen Kiernan wrote a paper on using GLIMMIX to model data and she includes a discussion of GEE vs mixed on p 9-11&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings18/2179-2018.pdf" target="_blank"&gt;Insights into Using the GLIMMIX Procedure to Model Categorical Outcomes with Random Effects (sas.com)&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;She also shows how you can&amp;nbsp;use the EMPIRICAL option in PROC GLIMMIX to obtain results that are similar to estimating a GEE model in PROC GENMOD.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 16:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-results-of-CLASS-variables-from-GENMOD/m-p/906489#M45015</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-12-06T16:13:52Z</dc:date>
    </item>
  </channel>
</rss>

