<?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: regression analysis for continuous dependent variable using genmod in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948226#M47424</link>
    <description>"but since my outcome variable is not normal (Shapiro-Wilk test significant) I tried it with genmod using a gamma distribution."&lt;BR /&gt;You don't need to assume Y variable to confirm normal distribution, just make sure ERROR distribution is normal distribution to make some statistical inferrence.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; wrote a blog about it before.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"but Im still not able to tell the strenght and direction of the association between predictor and outcome "&lt;BR /&gt;&lt;BR /&gt;Then you need to take WEEK variable as a numeric type not category type, so remove CLASS statement.&lt;BR /&gt;If you want keep CLASS statement then check the following URL.&lt;BR /&gt;&lt;BR /&gt;Testing for trends (linear, quadratic, cubic ...) using PROC GLM&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/22/912.html" target="_blank"&gt;https://support.sas.com/kb/22/912.html&lt;/A&gt;&lt;BR /&gt;</description>
    <pubDate>Sat, 19 Oct 2024 06:48:36 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-10-19T06:48:36Z</dc:date>
    <item>
      <title>regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947786#M47412</link>
      <description>&lt;P&gt;Dear SAS Communities,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using genmod to analyze the relationship between a continuous dependent variable (Fruit_firmness) and two predictor variables; harvest_month (1, 2, 4, 6, 8 ) and storage_weeks (0, 1, 3, 6). With the code I am using I'm able to see that the predictors are significantly associated with the dependent variable in the Table of Max Likelihood Estimates. However, is there a way to get more output information to further explore this association (like the information you get in the Odds Ratio Estimates Table when using proc logistic)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc genmod data=one;&lt;BR /&gt;where Variety='BL516' and Season=2021;&lt;BR /&gt;model Fruit_firmness= harvest_month&amp;nbsp; storage_weeks/dist=gamma link=log;&lt;BR /&gt;output out=out predicted=Fruit_firmness;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would greatly appreciate your feedback!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Caroline&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 00:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947786#M47412</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-17T00:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947788#M47413</link>
      <description>&lt;P&gt;I think you should include "harvest_month storage_weeks" in CLASS statement,since these variable are nominal not ordinal variables.&lt;BR /&gt;If you want more info , you could check the estimated coefficient:&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/38/384.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/38/384.html&lt;/A&gt;&lt;BR /&gt;and using ESTIMATE, LSMEANS, LSMESTIMATE statement to explore more:&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/24/447.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/24/447.html&lt;/A&gt;&lt;BR /&gt;And use EFFECTPLOT to visualize the result of model:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/05/30/visualize-interaction-effects-regression.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2019/05/30/visualize-interaction-effects-regression.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/01/08/confidence-band-regression-sas.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2020/01/08/confidence-band-regression-sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 00:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947788#M47413</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-18T00:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947792#M47414</link>
      <description>&lt;BR /&gt;Testing for trends (linear, quadratic, cubic ...) using PROC GLM&lt;BR /&gt;         &lt;A href="https://support.sas.com/kb/22/912.html" target="_blank"&gt;https://support.sas.com/kb/22/912.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Oct 2024 01:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947792#M47414</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-17T01:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947902#M47417</link>
      <description>&lt;P&gt;Thank you so much for your quick reply and all the resources provided Ksharp.&lt;/P&gt;
&lt;P&gt;So only continuous variables are not included in the class statement?&lt;/P&gt;
&lt;P&gt;I tried this code to make a graph but I'm having trouble with the variable used in the "at" statement since it is a categorical variable (level 1, 6, and 8&amp;nbsp; ). All my predictor variables are categorical. This is the error Im getting:&amp;nbsp;ERROR: For CLASS variables in the AT option, specify Harvest(coded)=value to indicate a coded design value, and specify Harvest='level' to indicate a CLASS level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;BR /&gt;proc logistic data=one;&lt;BR /&gt;class PercDFD Season Harvest Variety Wks / param=ref;&lt;BR /&gt;model SeedGerm= PercDFD Season Harvest Variety Wks;&lt;BR /&gt;effectplot slicefit(sliceby=Season plotby(rows)=Variety)&lt;BR /&gt;/ at(Harvest=1 6 8&amp;nbsp; ) obs(fringe jitter(seed=39393));&lt;BR /&gt;store logimodel;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you can help me with this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 16:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947902#M47417</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-17T16:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947916#M47418</link>
      <description>&lt;P&gt;Nevermind, I think I got it. This code gave me the graph I wanted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;BR /&gt;proc logistic data=one;&lt;BR /&gt;class Wks Variety Season Harvest PercDFD / param=ref;&lt;BR /&gt;model SeedGerm= Wks|Variety Season Harvest PercDFD;&lt;BR /&gt;effectplot interaction(plotby=Variety plotby(rows)=PercDFD)&lt;BR /&gt;/ at(Harvest=all);&lt;BR /&gt;store logimodel;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 17:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/947916#M47418</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-17T17:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948138#M47423</link>
      <description>&lt;P&gt;I wanted to run a linear regression with a continuous variable (firmness) and a categorical var (weeks=0,1,3,6), but since my outcome variable is not normal (Shapiro-Wilk test significant) I tried it with genmod using a gamma distribution.&amp;nbsp; If I use lsmeans statement I can see if there is a significant difference between levels of the predictor variable (weeks) but Im still not able to tell the strenght and direction of the association between predictor and outcome to make a statement like "a 1-unit increase in the predictor is associated with an x change in the outcome var".&amp;nbsp; So my question is if there is a way to get this information when runing a reg analysis with genmod or if there is a more appropiate procedure when the outcome var (continuous) is not normal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc genmod data=one;&lt;BR /&gt;Where Variety='BL516' and Season=2021;&lt;BR /&gt;class Weeks;&lt;BR /&gt;model Firmness= Weeks/dist=gamma link=log;&lt;BR /&gt;output out=out predicted=Firmness;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 21:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948138#M47423</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-18T21:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948226#M47424</link>
      <description>"but since my outcome variable is not normal (Shapiro-Wilk test significant) I tried it with genmod using a gamma distribution."&lt;BR /&gt;You don't need to assume Y variable to confirm normal distribution, just make sure ERROR distribution is normal distribution to make some statistical inferrence.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; wrote a blog about it before.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"but Im still not able to tell the strenght and direction of the association between predictor and outcome "&lt;BR /&gt;&lt;BR /&gt;Then you need to take WEEK variable as a numeric type not category type, so remove CLASS statement.&lt;BR /&gt;If you want keep CLASS statement then check the following URL.&lt;BR /&gt;&lt;BR /&gt;Testing for trends (linear, quadratic, cubic ...) using PROC GLM&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/22/912.html" target="_blank"&gt;https://support.sas.com/kb/22/912.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 19 Oct 2024 06:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948226#M47424</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-19T06:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948417#M47426</link>
      <description>&lt;P&gt;Thank you for your reply Ksharp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So instead of looking at the Shapiro-Wilk test, I should instead look at the distribution of residuals to check for normality?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the link to test for trends, it is very useful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc iml;&lt;BR /&gt;WksL={0 1 3 6};&lt;BR /&gt;contrL=orpol(WksL, 2);&lt;BR /&gt;print contrL;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glm;&lt;BR /&gt;class Wks;&lt;BR /&gt;model AvgFirm=Wks;&lt;BR /&gt;contrast 'linear' Wks -0.545545 -0.327327 0.1091089 0.7637626;&lt;BR /&gt;contrast 'quadratic' Wks 0.5128226 -0.170941 -0.740744 0.398862;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used these codes and this is what I got:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palolix_0-1729526435989.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101628iF89C86EE0BF39544/image-size/medium?v=v2&amp;amp;px=400" role="button" title="palolix_0-1729526435989.png" alt="palolix_0-1729526435989.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure GLM: Contrasts" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Contrast&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;DF&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Contrast SS&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Mean Square&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;F Value&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;F&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;linear&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;27880.08352&lt;/TD&gt;
&lt;TD class="r data"&gt;27880.08352&lt;/TD&gt;
&lt;TD class="r data"&gt;1630.39&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;quadratic&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;6793.04965&lt;/TD&gt;
&lt;TD class="r data"&gt;6793.04965&lt;/TD&gt;
&lt;TD class="r data"&gt;397.25&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Both, linear and cuadratic are significant.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to the graph, it looks to me like choosing a gamma distribution in genmod should be appropiate?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would greatly appreciate your feedback Ksharp.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you so much&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Caroline&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 16:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948417#M47426</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-21T16:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948424#M47428</link>
      <description>&lt;P&gt;i don't think so. Try running your GLM with the following option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV id="statug.glm.procstmt" class="AAsection"&gt;
&lt;DIV class="AAoptions"&gt;
&lt;DL class="AAoptions"&gt;
&lt;DD&gt;
&lt;PRE&gt;PLOTS=(DIAGNOSTICS RESIDUALS)&lt;/PRE&gt;
&lt;/DD&gt;
&lt;/DL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;then look at the various histograms, and the quantile-quantile plot. That should tell you if you need to start thinking about a distribution other than the Gaussian. Judging by the plot you have, the residuals at each point look symmetric around the point estimate, but that is just my eyeball opinion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other thing that strikes me is that fitting a polynomial over the whole Weeks domain&amp;nbsp; may not be the best curve, based on what that figure looks like. It may be just me but I see a plateau, followed by a quadratic decay phase. Check out Example 87.1 Segmented Model in SAS/STAT 15.2 documentation for PROC NLIN for an example of what I see going on with these data. However, with only four time points, this may be overfitting, especially if the join point is greater than week=1. That would mean fitting the quadratic part with only 2 points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still pondering this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 16:55:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948424#M47428</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-10-21T16:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948443#M47429</link>
      <description>&lt;P&gt;Thank you so much for your reply Steve!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this is what you mean?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palolix_0-1729535338287.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101635iD605FE5F98CDE582/image-size/medium?v=v2&amp;amp;px=400" role="button" title="palolix_0-1729535338287.png" alt="palolix_0-1729535338287.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you think that there is a normal distribution of residuals looking at the quantile residual plot?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you Steve&lt;/P&gt;
&lt;P&gt;Caroline&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 18:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948443#M47429</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-21T18:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948453#M47430</link>
      <description>&lt;P&gt;No, the QQ plot isn't nearly straight enough to satisfy me that a normal distribution is the best fit for the residuals. This may also be indicating that the model being fit is missing a critical term. In addition, the skew shown in the histogram with the normal overlay says something to me about using a distribution with a log link. That means you probably hit the nail on the head - a gamma distribution with a log link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is the default in GLIMMIX for the gamma, but in GENMOD you will have to specify the LINK=LOG option because the default in GENMOD is the inverse. As far as diagnostic plots, PLOTS=ALL works fine for GLIMMIX. For GENMOD, the standardized and raw residuals should be plotted against the predicted value, which means adding the XBETA suboption to RESCHI, RESDEV, RESLIK, RESRAW and the standardized versions of these (e.g. STDRESCHI). Check the examples in the documentation for some of these.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 19:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948453#M47430</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-10-21T19:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948479#M47432</link>
      <description>&lt;P&gt;Thank you Steve,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These 3 different options seem to work, but I couldn't figure out how to add the suboption xbeta to reschi option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;BR /&gt;proc genmod plots=all;&lt;BR /&gt;model AvgFirm=Wks;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods graphics off;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;BR /&gt;proc genmod plots=(predicted reschi);&lt;BR /&gt;model AvgFirm=Wks;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods graphics off;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;BR /&gt;proc genmod plots(unpack)=dfbeta;&lt;BR /&gt;model AvgFirm=Wks;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 20:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948479#M47432</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-21T20:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948501#M47433</link>
      <description>"So instead of looking at the Shapiro-Wilk test, I should instead look at the distribution of residuals to check for normality?"&lt;BR /&gt;Yes. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; could offer you more info.&lt;BR /&gt;&lt;BR /&gt;"According to the graph, it looks to me like choosing a gamma distribution in genmod should be appropiate?"&lt;BR /&gt;Check AIC BIC of proc genmod when you use option DIST=NORMAL or GAMMA, the smaller is better .</description>
      <pubDate>Tue, 22 Oct 2024 01:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948501#M47433</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-22T01:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948504#M47434</link>
      <description>&lt;P&gt;Thank you Ksharp! It is strange because in the graph I posted before it looked more like a gamma distribution but if I compared the AIC or BIC, they are slightly lower when using normal (AIC=738 and BIC=752) than gamma (AIC=898 and BIC=913) distribution .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 02:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948504#M47434</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-22T02:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948506#M47435</link>
      <description>The graph you posted is to say residual is not normal distribution, you can not do some statistical inferrence. That does not mean your model did not fit data well.&lt;BR /&gt;You could try LOG it to make Y more look like normal distribution.&lt;BR /&gt;Or try Box-Cox transformation:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2022/08/22/box-cox-transform.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2022/08/22/box-cox-transform.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2022/08/17/box-cox-regression.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2022/08/17/box-cox-regression.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Firmness=log(Firmness);&lt;BR /&gt;...................&lt;BR /&gt;model Firmness= Weeks/dist=normal;&lt;BR /&gt;&lt;BR /&gt;P.S. I would pick up the model which have smaller AIC or BIC.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you want compare FULL model and SUB model ,you could try likelihood ratio test:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2024/03/27/likelihood-ratio-test.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2024/03/27/likelihood-ratio-test.html&lt;/A&gt;</description>
      <pubDate>Tue, 22 Oct 2024 03:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948506#M47435</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-22T03:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948598#M47436</link>
      <description>&lt;P&gt;Thank you Ksharp.&lt;/P&gt;
&lt;P&gt;I must be doing something wrong because I am getting the same results whether I log the variable or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc genmod data=one;&lt;BR /&gt;Where Variety='BL516' and Season=2021;&lt;BR /&gt;Firmness=log(Firmness);&lt;BR /&gt;class Wks;&lt;BR /&gt;model Firmness= Wks/dist=normal;&lt;BR /&gt;output out=out predicted=Firmness;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how can I get the parameter estimates I need in order to make predictions like for instance "a 1-week increase in x is associated with ___ decrease in Firmness"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 15:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948598#M47436</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-22T15:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948606#M47438</link>
      <description>&lt;P&gt;Information Criteria (AIC, AICC, cAIC, BIC) are not good comparators for different data - identical models give different results for data with normal errors (no transformation) and data from a distribution like the gamma which involves transforming the data.&amp;nbsp; There are some other issues that can render comparison of IC's invalid - see Stroup's text for discussion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have more to say down below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 16:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948606#M47438</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-10-22T16:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948610#M47439</link>
      <description>&lt;P&gt;Please try defining logfirm = log(Firmness) in a DATA step. To get identical results strikes me as kinda suss, so just for now try comparing variables with different names. I like your selection of a gamma distribution. Now, to get an answer to "&lt;SPAN&gt;a 1-week increase in x is associated with ___ decrease in Firmness", you need to fit a first degree linear model (y = int + slope * x). Just about any other equation will need some extra interpretation. Since the fit is not a straight line, the decrease per week depends on which weekly interval you include. Given the figure you showed earlier, the decrease going from Week 0 to Week 1 is nearly zero, while the decrease going from Week 4 to Week 5 is probably greater than 10. Once you start going to non-normal distributions, this becomes a common issue, as almost every standard link is non-linear. Consequently, a figure is almost always a better way to convey change in response per unit change in the X variable.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, taking the log of your response and then fitting that is the equivalent of a lognormal distribution. Be aware that the simple back transformation (exp) gives the geometric mean, not the expected value on the original scale, and exponentiating the slope coefficient does not give the varying slope seen on the original scale. Thus, rethink your objective summary statement so that it reflects the non-linearity of the response curve on the original scale.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SteveDenham&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 16:48:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948610#M47439</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-10-22T16:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: regression analysis for continuous dependent variable using genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948635#M47441</link>
      <description>&lt;P&gt;Thank yo so much Steve for helping me with this and for the valuable information.&amp;nbsp; Ok, I used the log statement before the "cards" statement so it worked. If I use the log-transformed Firmness in genmod with a normal dist.&amp;nbsp; I get AIC: 2.94 and BIC: 17.24. With a normal dist. and no transformation I get 738 and 752.&amp;nbsp; With a gamma dist. I get 898 and 913.&amp;nbsp; So I guess I will choose the log-transformed variable with the normal dist. in genmod.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To the second point on making predictions: What do I have to include in my model in order to fit a first degree linear model? What would be the code for that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 17:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/regression-analysis-for-continuous-dependent-variable-using/m-p/948635#M47441</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-22T17:54:07Z</dc:date>
    </item>
  </channel>
</rss>

