<?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 What analysis would work? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906267#M44992</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am conducting a study looking at change in&amp;nbsp; average use of cigarettes from week to week in each unique user. The "y" is the number of cigarettes , hence it's continuous. The "X" is&amp;nbsp; week1, week 2, etc.&amp;nbsp; There are repeated measures for every individual and several timepoints that are different from one another. Can&amp;nbsp; I use&amp;nbsp; linear mixed model for the data analysis? If not, what type of analysis would you suggest?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 16:33:33 GMT</pubDate>
    <dc:creator>Liz123</dc:creator>
    <dc:date>2023-12-05T16:33:33Z</dc:date>
    <item>
      <title>What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906267#M44992</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am conducting a study looking at change in&amp;nbsp; average use of cigarettes from week to week in each unique user. The "y" is the number of cigarettes , hence it's continuous. The "X" is&amp;nbsp; week1, week 2, etc.&amp;nbsp; There are repeated measures for every individual and several timepoints that are different from one another. Can&amp;nbsp; I use&amp;nbsp; linear mixed model for the data analysis? If not, what type of analysis would you suggest?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 16:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906267#M44992</guid>
      <dc:creator>Liz123</dc:creator>
      <dc:date>2023-12-05T16:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906305#M44993</link>
      <description>&lt;P&gt;Can you show an example of some cases of your data?&lt;/P&gt;
&lt;P&gt;It is not clear to me exactly what your data may look like as regards "repeated measures" (does this mean multiple within a given "week"?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the data is actually an identifier, a numeric value for "week" and the count of cigarettes without multiple values for given weeks then a simple regression would give the "average change in cigarettes per week" as the parameter of the Week variable with something like:&lt;/P&gt;
&lt;PRE&gt;data example;
  input id $ week y;
datalines;
a 1 100
a 2 98
a 3 99
a 4 94
a 5 93
b 1 44
b 2 42
b 3 40
b 4 38
b 5 36
;

proc reg data=example;
   by id;
   model y=week;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2023 18:41:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906305#M44993</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-12-05T18:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906386#M45004</link>
      <description>&lt;P&gt;Yes . You should use Mixed Model.&lt;/P&gt;
&lt;P&gt;Since your Y is count data, you should use PROC GLIMMIX with possion distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=counts method=quad;
class sub ;
model count = week / link=log s dist=poisson;
random int / subject=sub;&lt;BR /&gt;&lt;BR /&gt;random week/ subject=sub residual ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt;&amp;nbsp; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;could give you better code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 09:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906386#M45004</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-06T09:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906450#M45009</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;'s code has a residual option in one of the random statements. METHOD=QUAD doesn't accept R-side (residual side) effects. I would add week to the CLASS statement and try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=counts method=quad;
class sub week ;
model count = week / link=log s dist=poisson;
random int / subject=sub;
random week/ subject=sub type=ar(1) ; /* You may want to consider other structures */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am going to call in&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;because I think this question might be addressed better using PROC GEE (and he is much more familiar with PROC GEE than I am), as I believe you are interested in the marginal effects of time, rather than subject-specific effects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 14:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906450#M45009</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-12-06T14:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906460#M45010</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello Ballardw,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks so much for your reply. Highly appreciated. Each individual has multiple values of cigarette counts in a week. For example, someone may have 5 cigarettes in one day, then next day, 15, following day 7 etc.&amp;nbsp;and the unique users all have different several timepoints. I hope that answers&amp;nbsp;your question.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 14:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906460#M45010</guid>
      <dc:creator>Liz123</dc:creator>
      <dc:date>2023-12-06T14:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906463#M45011</link>
      <description>&lt;P&gt;Hello Ksharp,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for this! I will try this and let you know whether it works. Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 15:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906463#M45011</guid>
      <dc:creator>Liz123</dc:creator>
      <dc:date>2023-12-06T15:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906473#M45013</link>
      <description>&lt;P&gt;Hello SteveDenham,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay. Thanks so&amp;nbsp; much for your suggestion! Much appreciated! I will try this as well and I will let you know if I have any questions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 15:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906473#M45013</guid>
      <dc:creator>Liz123</dc:creator>
      <dc:date>2023-12-06T15:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906652#M45023</link>
      <description>&lt;P&gt;Here you could find more example in the famous book "&lt;STRONG&gt;&lt;SPAN&gt;Applied Longitudinal Analysis, 2&lt;SUP&gt;nd&lt;/SUP&gt;&amp;nbsp;Edition&lt;/SPAN&gt;&lt;/STRONG&gt;".&lt;/P&gt;
&lt;P&gt;&lt;A href="https://content.sph.harvard.edu/fitzmaur/ala2e/" target="_blank"&gt;Applied Longitudinal Analysis (harvard.edu)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;E.X.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data seizure;
     infile 'epilepsy.dat';
     input id trt age y0 y1 y2 y3 y4;
          y=y0; visit=0; output;
          y=y1; visit=1; output;
          y=y2; visit=2; output;
          y=y3; visit=3; output;
          y=y4; visit=4; output;
          drop y0-y4;


proc sort;
by id visit;

data seizure;
     set seizure;
     if visit=0 then do; 
          time=0; 
          ltime=log(8); 
     end;
     else do; 
          time=1; 
          ltime=log(2); 
     end;



title1 Mixed Effects Log-linear Regression Model (Random Intercept and Slope);
title2 Clinical Trial of Epileptic Patients;


proc glimmix method=quad(qpoints=50);

     class id;

     model y = time trt trt*time / dist=poisson link=log offset=ltime solution;

     random intercept time / subject=id type=un g;   
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Dec 2023 06:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906652#M45023</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-07T06:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: What analysis would work?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906731#M45030</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;, thank you!!! This is helpful!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 16:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906731#M45030</guid>
      <dc:creator>Liz123</dc:creator>
      <dc:date>2023-12-07T16:16:38Z</dc:date>
    </item>
  </channel>
</rss>

