BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
oliverlb
Calcite | Level 5

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:

data rcb;
infile 'F:\RC_2016\Field_Study_Data.csv' DLM=',' DSD MISSOVER firstobs=2;
input site $ mulch herb  species $ seedling  Alive n;
run;
proc print data=rcb;
run;

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  site site*mulch site*herb site*species site*mulch*herb site*mulch*species site*herb*species /s;
run;

 

When I use univariate to look at normality and my distribution, it has not changed. What am I missing?

 

Thanks for your time,

Luke.

1 ACCEPTED SOLUTION

Accepted Solutions
plf515
Lapis Lazuli | Level 10

Since it is your dependent variable is binary, ANOVA is not appropriate.

View solution in original post

10 REPLIES 10
plf515
Lapis Lazuli | Level 10

PROC GLIMMIX does not transform the data, it lets you analyze it as is. This is similar to PROC LOGISTIC, only GLIMMIX lets you include data that is not independent.

oliverlb
Calcite | Level 5

OK,

 

Can you tell me what steps I need to take to transfer a binary distribution to a normal distribution?

 

-Luke.

plf515
Lapis Lazuli | Level 10

There is no way to transform binary data to normal data. That's one reason you need logistic regression.

 

Binary data can only take two values.  Normal data is continuous.

oliverlb
Calcite | Level 5

If I use logistic regression my results will be valid?

 

Does that apply to the homogeneity of variance as well?

plf515
Lapis Lazuli | Level 10

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.

Reeza
Super User
What type of analysis are you doing that requires normality? Always go back to your base assumptions.
oliverlb
Calcite | Level 5

I'm doing an ANOVA.

plf515
Lapis Lazuli | Level 10

Since it is your dependent variable is binary, ANOVA is not appropriate.

oliverlb
Calcite | Level 5

Got it. Thanks.

SteveDenham
Jade | Level 19

Luke, 

 

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:

 

random intercept/subject=site;

 

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.

 

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 10 replies
  • 2229 views
  • 4 likes
  • 4 in conversation