I have a data set which displays a "lognormal" shaped dependence of Y on X. The data is radioactive emission rate as a function of time. I see a rapid rise in the early stages followed by a slower decay over time.
The code I use is as follows:
proc glimmix data = QUERY_FOR_SUB1CT;
model rate = time / dist=lognormal link=log noscale solution;
run;
I found this code in an example in the communities. My question is how do I translate the results into a function that I can use in another program such as Excel. My parameter estimates are:
Parameter Estimates | |||||
Effect | Estimate | Standard | DF | t Value | Pr > |t| |
Intercept | -17.2289 | 65.7665 | 29249 | -0.26 | 0.7933 |
time | -0.00013 | 0 | 29249 | -Infty | <.0001 |
Scale | 11.9519 | 0.09883 | . | . | . |
I see on Wikipedia that the lognormal pdf is as attached in the pic but I fail to see how to populate this equation given the SAS output.
Are you sure that you want to use LINK=LOG?
To model lognormal data, most people use only DIST=LOGNORMAL and an identity link function.The assumption is that
LOG(rate) is normally distributed and is estimated by
LOG(RATE) = -17.23 - 0.00013*Time + eps
where eps (the residuals) is normally distributed with a variance that is estimated by the scale parameter.
Are you sure that you want to use LINK=LOG?
To model lognormal data, most people use only DIST=LOGNORMAL and an identity link function.The assumption is that
LOG(rate) is normally distributed and is estimated by
LOG(RATE) = -17.23 - 0.00013*Time + eps
where eps (the residuals) is normally distributed with a variance that is estimated by the scale parameter.
You are correct. I forgot to alter my code in what I posted above. On my machine I am using an identity link, such that results appear as follows.
Parameter Estimates | |||||
Effect | Estimate | Standard | DF | t Value | Pr > |t| |
Intercept | -2.7970 | 0.01497 | 29249 | -186.85 | <.0001 |
time | -0.00124 | 0.000120 | 29249 | -10.28 | <.0001 |
Scale | 3.5190 | 0.02910 | . | . | . |
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.