# Multinomial logistic regression

#### whyisstatssohard

##### New Member
Hi,

I'm quite new to R and I need a little advise on whether multinomial logistic regression is right for what I'm hoping to do for my data. Basically, I've been given some camera trap data to work with. The data is non-normal and consists of 25 species documented over 30 different trap locations. I have environmental variables for each trap (e.g. canopy cover, distance to water source etc). I would like to see whether species abundance/diversity varies across different environmental variables. I initially thought a general linear model could work but reading around makes me think miltinomial logistic regression is the best option for me. I assume I can't do just logistic regression as that seems to need the dependent variable to be just 2 options e.g. presence vs absence of a particular species which is a bit limiting. So to do species diversity as the dependent variable with 3 or so environmental variables as independent variables would multinomial logistic regression be suitable? If so how do I perform one? (my book only covers linear and logistic regression).

I hope all that makes sense!

#### noetsi

##### No cake for spunky
How many levels does your dependent variable have? Are the levels of the DV ordered or not?

#### rogojel

##### TS Contributor
hi,
is the diversity measure just the number of different species you ind in the trap? Maybe a poisson tegression could work here?

regards

#### noetsi

##### No cake for spunky
I don't think they are ordered either.
If you have 25 distinct levels of your dependent variable than multinomial logistic regression probably is not your best bet. Generally once you get to something like 11 plus distinct levels your dependent variable becomes "interval like" and linear regression becomes a better option. Or so I have heard....

#### whyisstatssohard

##### New Member
Okay, thanks for your replies!

What's the difference between poisson and linear regression? Also the data is non-parametric if that makes a difference?

Sorry for all the questions!

#### whyisstatssohard

##### New Member
Looking into things a little more... multiple linear regression looks like the best option here. Would you agree?

#### GretaGarbo

##### Human
Let's take a repeat of this question. When that is answered it will probably be easier to suggest something.

hi,
is the diversity measure just the number of different species you ind in the trap? Maybe a poisson tegression could work here?

regards
(Rogojel meant Poisson regression.)

#### whyisstatssohard

##### New Member
Let's take a repeat of this question. When that is answered it will probably be easier to suggest something.

(Rogojel meant Poisson regression.)
Hi sorry for not replying to this part... yes diversity is just the number of species found at each trap location

#### GretaGarbo

##### Human
Hi sorry for not replying to this part... yes diversity is just the number of species found at each trap location
Then it it natural to use the Poisson regression model, as Rogojel suggested. Poisson regression, in contrast to traditional linear regression that is based on the normal distribution, takes into account that the variance is increasing as the mean increases. If that (Poisson reg) does not fit well, another slightly more advanced model is to use the negative binomial distribution (but it is not more difficult to run on the computer).

#### rogojel

##### TS Contributor
Hi,
just for the sake of completenessyou should look at the residuals. If the model is ok you should not see any pattern, just a random scatter of points without any trends.
regards

#### GretaGarbo

##### Human
Why_is_biology_so_hard?

We know almost nothing about these data.

Loins eat gazelles. So the abundance of one specie can influence another. So then they will not be statistically independent. Some animals are territorial. Some comes in herds. Then they are not statistically independent. Some are afraid of being in the canopy_openess because of the presens of predatory animals. Maybe look at population dynamics models. The models must be biologically correctly specified, otherwise the statistical estimates will be meaningless.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
I am trying to remember, but shouldn't they also look at the outcome mean and dispersion to examine for over/equi/under-dispersion? Deviance = 1?

#### GretaGarbo

##### Human
I am trying to remember, but shouldn't they also look at the outcome mean and dispersion to examine for over/equi/under-dispersion? Deviance = 1?
Yes, of course it it good to check that the model fit to the data. It is the dispersion parameter that is taken to be 1 in the Poisson model because it is a property in the Poisson model that the variance is equal to the mean. Maybe these two links can be useful (here and here).

(although I did a poisson GLM is that the same as poisson regression?)
That is the same.

Not much seem to be significant in the above model. Maybe there is some multicolinearity (so that some explanatory variables are correlaed with each other).

But I tried to emphasize above, the importance of writing down a model that makes sense biologically. The model - written in mathematical terms - should reflect the vision of "whyisstatssohard" of how the biology works. It is a biological model and the model building should start from biological knowledge.

(Maybe the original post could explain a little for us what these data are about?)

It would have been easier to read the computer printout if it had been put in code tags ("#")

#### whyisstatssohard

##### New Member
After this test I will be splitting species into predator and prey and performing the same analysis as above but on predator abundance (not diversity) across environmental variables and then prey abundance across environmental variables. Not sure if this will still be poisson or if it will need to be general or generalised yet. I wonder if there is something I can then do to compare predator and prey abundance to see if the prey abundance in an area impacts number of predators?

#### noetsi

##### No cake for spunky
I am not familiar with Poisson regression, but in linear regression (and logistic as well I believe) it does not matter what the distribution of the predictor (or independent to use the old term) variables are at all. Only the distribution of the variable you are trying to predict.