Solved
Contributor
Posts: 20

# choosing the right PROC to analyse categorical response variable vs. 3 categorical explanatory varia

Hi,

I am not sure which PROC to choose to analyse the following model, I would greatly appreciate any advices:

the model:

PROC (I used GLIMMIX to start) data=mydata;

class a  b c ID;

Y= a|b|c;

/* Y is a categorical variable that can take 9 values: from 3 to 9 (= number of days)*/

/* a is the population name*/

/*b is a categorical variable (treatment 1) with 3 values: 1, 2, 3 for example */

/* c is categorical variable (treatment 2) with 2 values: 1, 2 for example*/

/* ID= individual, each individual has 4 replicates*/

random int/sub=ID(a);

run;

I started with PROC GLIMMIX, it works fine but I am not sure it is designed fir Y categorical variable?

Accepted Solutions
Solution
‎04-22-2016 07:42 AM
Posts: 2,655

## Re: choosing the right PROC to analyse categorical response variable vs. 3 categorical explanatory v

I don't think you have to consider number of days as a categorical variable.  If it is a duration, you may want to consider fitting with a gamma distribution, and if it is a count of days  (sucha as days when a condition is observed), you may want to consider fitting with a Poisson distribution.

If your research question restricts the dependent variable to being a categorical variable, then you should consider fitting with multinomial distribution and an appropriate link function (most likely a cumulative logit).

Your current approach assumes that the residuals of the model fit a Gaussian distribution.  Take a look at the diagnostic plots to see if that is an appropriate assumption.

Steve Denham

All Replies
Solution
‎04-22-2016 07:42 AM
Posts: 2,655

## Re: choosing the right PROC to analyse categorical response variable vs. 3 categorical explanatory v

I don't think you have to consider number of days as a categorical variable.  If it is a duration, you may want to consider fitting with a gamma distribution, and if it is a count of days  (sucha as days when a condition is observed), you may want to consider fitting with a Poisson distribution.

If your research question restricts the dependent variable to being a categorical variable, then you should consider fitting with multinomial distribution and an appropriate link function (most likely a cumulative logit).

Your current approach assumes that the residuals of the model fit a Gaussian distribution.  Take a look at the diagnostic plots to see if that is an appropriate assumption.

Steve Denham

Contributor
Posts: 20

## Re: choosing the right PROC to analyse categorical response variable vs. 3 categorical explanatory v

Hello Steve,

The variable "number of days" is more a date than a count variable. Value "3" means we observed that trait (=spores from a fungi) three days after the beginning of the experiment, value 4=four days after the beginning and so on.

I thought the number of days has to be categorical because it can ONLY take few values. For some samples, only values 3, 4 and 5 (meaning that we observed that trait day number 3, 4 and 5 after thet start of the experiment). If Y is only 3, 4 and 5 can I fit a gamma distribution?

Thanks again!

Valued Guide
Posts: 684

## Re: choosing the right PROC to analyse categorical response variable vs. 3 categorical explanatory v

Yes, you can consider it to be gamma.

PROC Star
Posts: 275