02-02-2016 05:15 AM
I am running statistics on survival of planted tree seedlings using SAS 9.3. Each seedling received a 1 for alive or a 0 for dead. Because I'm using binary data, I don't have a normal distribution. I want to use proc glimmix to transform my distribution.
This is what I entered in the editor:
infile 'F:\RC_2016\Field_Study_Data.csv' DLM=',' DSD MISSOVER firstobs=2;
input site $ mulch herb species $ seedling Alive n;
proc print data=rcb;
proc glimmix data=rcb ;
class site species mulch herb seedling ;
model Alive (event='1') = mulch herb species mulch*herb mulch*species herb*species mulch*herb*species/s
random site site*mulch site*herb site*species site*mulch*herb site*mulch*species site*herb*species /s;
When I use univariate to look at normality and my distribution, it has not changed. What am I missing?
Thanks for your time,
02-02-2016 07:03 AM
This isn't really the forum for teaching all about logistic regression. Entire books have been written about it. You need to learn how to do it, how to interpret the results and so on. You could start with the documentation for PROC LOGISTIC; there are also papers on this from various RUGs, SGF and SUGIs (including a couple by me) but you probably need a good book or else to hire a consultant.
02-02-2016 11:25 AM
Try adding an lsmeans statement to your model, to see if you get proportions out that you can understand. Also, using by subject processing can greatly improve your chances of convergence. I have rewritten your random statement to take advantage of this.
proc glimmix data=rcb ; class site species mulch herb seedling ; model Alive (event='1') = mulch herb species mulch*herb mulch*species herb*species mulch*herb*species/s dist=binary link=logit; random intercept mulch herb species mulch*herb mulch*species herb*species /subject=site s;
lsmeans mulch|herb|species/diff ilink; run;
Now, i would also suggest that perhaps your random statement probably overspecifies the number of random effects. You could probably get by with:
Also, you should consider some points brought out by Walt Stroup in his book Generalized Linear Mixed Models (get a copy)--that the estimates and tests from this method tend to be biased, and that you may want to consider adding METHOD=LAPLACE to the PROC GLIMMIX statement.
Need further help from the community? Please ask a new question.