0

Currently, I am trying to run the multinomial model Age = Gender to investigate the effect of Gender on the probability that my study animal belongs to a particular age class. I am not necessarily interested in the model parameters, but more in the model fit estimates. More precise I am interested in whether:

  1. Estimates significantly differ from 0.25 (no bias towards a particular age class)
  2. Estimates significantly differ between males and females.

Until now, I tried to answer these questions by running the model, calculating the emmeans and using the contrast function to see if there are differences between both genders.

My main question is: Is this a statistically correct way (I know it from "normal" linear modelling , but as I use multinomial models, I don't know whether this is a good way )

What I tried

So far, I used the following code:

a <- multinom(`Age class` ~ Sex , data = goodyears_hunting) 
emmeans = emmeans(a,~ `Age class`  | Sex, mode = "prob") 
x = as.data.frame(emmeans) 
gt(x, rownames_to_stub = TRUE) 
z =contrast(emmeans, "pairwise",  simple = "each", combine = TRUE, adjust = "mvt")
z = as.data.frame(z) 
gt(z, rownames_to_stub = TRUE)

This resulted for the Emmeans in the following table:

Emmeans output


Age class   Sex prob    SE  df  lower.CL    upper.CL
0   female  0.2198662   0.01383598  6   0.1860108   0.2537216
1   female  0.3169641   0.01554436  6   0.2789284   0.3549998
2   female  0.1439735   0.01172819  6   0.1152757   0.1726714
3+  female  0.3191962   0.01557349  6   0.2810892   0.3573031
0   male    0.2067437   0.01206316  6   0.1772262   0.2362612
1   male    0.2954747   0.01359085  6   0.2622191   0.3287303
2   male    0.2413486   0.01274622  6   0.2101597   0.2725375
3+  male    0.2564329   0.01300724  6   0.2246054   0.2882605

For example: May I conclude that 2y female's are underrepresented in the population as 0.25 is not part from the confidence interval?

In case for the contrasts I get the following results (selected only the relevant part)

Contrast output

Age class   contrast    estimate    SE  df  t.ratio p.value
0   female - male   0.013122464 0.01835631  6   0.71487502  0.982821954
1   female - male   0.021489382 0.02064796  6   1.04075092  0.911929460
2   female - male   -0.097375074    0.01732099  6   -5.62179680 0.010827774**
3+  female - male   0.062763228 0.02029093  6   3.09316739  0.140517335

Is it correct to conclude that the ratio of 2y old indivduals is signficant different between males and females?

I am mainly confused as I have little experience with discrete data and have not used these types of models much. Hopefully some of you can approve my way of thinking, or help me on the right way :D

PS: What is the best way to include tables in a question?

  • 1
    This seems to be more of a statistics question (rather than a coding-related one). I think you might get better response by posting this over on https://stats.stackexchange.com/ – Where's my towel Mar 10 '23 at 09:34

0 Answers0