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 "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.
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.
SteveDenham
Thank yo so much Steve for helping me with this and for the valuable information. 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. I get AIC: 2.94 and BIC: 17.24. With a normal dist. and no transformation I get 738 and 752. With a gamma dist. I get 898 and 913. So I guess I will choose the log-transformed variable with the normal dist. in genmod.
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?
Thank you very much
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. There are some other issues that can render comparison of IC's invalid - see Stroup's text for discussion.
I have more to say down below.
SteveDenham
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.