<?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: Generalized regression model for categorical data in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Generalized-regression-model-for-categorical-data/m-p/576423#M13063</link>
    <description>It doesn't seem like you have enough data points to split your regression like that, based on the number of points in each graph. You appear to have less than 10 points per time period. The typical rule of thumb is 25 data points per variable so I wouldn't be testing a ton of models here either. They all appear linear so I'm not sure if there's even any value in testing the quadratic but its easy enough to do in your model statement. &lt;BR /&gt;&lt;BR /&gt;Add a By statement to your desired regression procedure, for this, PROC REG or GLM may be fine, you don't have enough data for anything more complex.</description>
    <pubDate>Thu, 25 Jul 2019 01:19:47 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-25T01:19:47Z</dc:date>
    <item>
      <title>Generalized regression model for categorical data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Generalized-regression-model-for-categorical-data/m-p/576419#M13062</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Regression" style="width: 239px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31276i0A59B6A764555513/image-dimensions/239x154?v=v2" width="239" height="154" role="button" title="Picture1.png" alt="Regression" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Regression&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to fit categorical data to a continuous variable. The attached figure is a group of linear regression lines I created by putting both variables as continuous and grouped by another variable 'time'. My data is unbalanced, variable 'time' has unequal observations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help in obtaining regression equation (polynomial or quadratic?)&amp;nbsp; (y var to x var) for each 'time' variable but fitted with the best distribution.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*this is the code I used to fit my data and produce those figures*/

proc glimmix data=reg;
by time;
class block plot;
model Y=X / htype=3 solution cl;* dist=binomial link=logit;
random block;
random _residual_/ subject=plot type=cs;
run;


/*but I think 'by time' statement is not accurate, &lt;BR /&gt;so I tried doing this way, but do not know &lt;BR /&gt;how to extract regression equation for each 'time' from solution*/


proc glimmix data=reg;
class block plot time;
model Y=X|time / htype=3 solution cl;* dist=binomial link=logit;
random block;
random _residual_/ subject=plot type=cs;
run;

/* when trying with multinomial distribution and using method=quad, &lt;BR /&gt;because my data is unbalanced, I am getting this error
 "Estimation by quadrature is available only if the data can be processed by subjects. &lt;BR /&gt;Make sure that all G-side RANDOM statements have SUBJECT= effects. &lt;BR /&gt;If there are multiple SUBJECT= effects they need to form a containment
       hierarchy, e.g., SUBJECT=A, SUBJECT=A*B, SUBJECT=A(B), ... ."*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 01:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Generalized-regression-model-for-categorical-data/m-p/576419#M13062</guid>
      <dc:creator>panthibabu44</dc:creator>
      <dc:date>2019-07-25T01:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generalized regression model for categorical data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Generalized-regression-model-for-categorical-data/m-p/576423#M13063</link>
      <description>It doesn't seem like you have enough data points to split your regression like that, based on the number of points in each graph. You appear to have less than 10 points per time period. The typical rule of thumb is 25 data points per variable so I wouldn't be testing a ton of models here either. They all appear linear so I'm not sure if there's even any value in testing the quadratic but its easy enough to do in your model statement. &lt;BR /&gt;&lt;BR /&gt;Add a By statement to your desired regression procedure, for this, PROC REG or GLM may be fine, you don't have enough data for anything more complex.</description>
      <pubDate>Thu, 25 Jul 2019 01:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Generalized-regression-model-for-categorical-data/m-p/576423#M13063</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-25T01:19:47Z</dc:date>
    </item>
  </channel>
</rss>

