turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC GLIMMIX; selecting correct distribution

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-30-2016 07:33 PM

*Steve has helped with a similar problem (blood serum not normal) in the past, but needing additional advice.*

We completed a feedlot Trial with 4 treatments (animal was experimental unit). We collected blood (various times during the trial) and analyzed multiple blood serum components (e.g., blood urea nitrogen, glucose, etc.).

Ran PROC UNIV. and got different results for different variables. The Q-Q plots, (and Skap.-Wilk) showed that some variables were normally distributed; others were not. Some of the variables look like "count" data and some are just skewed (outliers have to stay in).

I then ran PROC Univ. on transformed data (log and ASIN). Tranformation didn't help some of the variables. Some variables became normal with natural log tranformation; ASIN was better than natLog on a few variables.

Since all data are continous (even though AST looks like "Count data"), I think the only for distribution options I have are lognormal, beta and gamma, correct?

Need help on how to select the best distribution and if I need a link function (when do you need a link function?).

Do you just run it with different distributions and pick the best fit?

Current code:

**PROC** **GLIMMIX**;

CLASS TRT DAY ID;

MODEL ALT = TRT day trt*day/dist=lognormal ddfm=kr2;

Random day/residual subject = id(trt) type =CSH (*or others; whichever fits best*);

**LSMEANS TRT day/DIFF ADJUST=TUKEY;LSmeans trt*day/slicediff=day adjust=tukey adjdfe=row (OR adjust=simulate?);**

**ODS OUTPUT lsmeans=lsmeans;RUN;**

Also, Steve provided the following code once to back-transform, but I don't understand it.

Now, to get lognormal estimates back onto the original scale you'll have to post-process the lsmeans

dataset, and this is where some mathematical statistics enters the picture. Simply exponentiating

the estimate will give an estimate of the median value. If you want to get an estimate of the

expected value and of the standard error of the expected value, you'll need the following code:

data btlsmeans;

set lsmeans;

omega=exp(stderr*stderr);

btlsmean=exp(estimate)*sqrt(omega);

btvar=exp(2*estimate)*omega*(omega-1);

btsem=sqrt(btvar);

run;