0
$\begingroup$

So far I fitted a glmer.nb Model for count data and would like to report the results. In some papers I have seen the F-Statistics as an option - but here I am not sure about the degrees of freedom because usually the F-Statistics is reported like F (regression df, Residual df) = F-Value, p) but for this purpose people seem to report only one value for the degrees of freedom. Does anyone knows which how to interpret this value and where to obtain it for a glmer.nb() model since my Anova table for the model gives the fixed effect A, B, C and looks like this:

    Analysis of Variance Table
         npar Sum Sq Mean Sq F value
A        2 12.690   6.345  6.3448
B        1 94.272  94.272 94.2717
C        1 10.821  10.821 10.8212

I would like to report the F-Value and P-Value for A

$\endgroup$
0
$\begingroup$

You have 2 degrees of freedom for your variable A, because (you should know) it is a categorical variable with 2 levels. So if you report the F value for this, it is basically the variance explained for all the levels under A. It depends on what A means, for example, if A is a category "region" with two possible values, then it is normally to report the F value for "region" with 2 degrees of freedom.

Some made-up data, where A is categorical with 2 levels, it gives you npar=2.

set.seed(111)
df = data.frame(A=factor(sample(0:2,100,replace=TRUE)),
B=rnbinom(100,1,0.5),C=rnbinom(100,1,0.5),
y=rnbinom(100,mu=10,size=1),
rand=factor(rbinom(100,1,0.5)))

df$y[df$rand==1] = df$y[df$rand==1]+3

fit = glmer.nb(y ~ A+B+C + (1|rand),data=df)
anova(fit)

Analysis of Variance Table
  npar  Sum Sq Mean Sq F value
A    2 2.82093 1.41047  1.4105
B    1 0.05069 0.05069  0.0507
C    1 0.87359 0.87359  0.8736

Next, since you fitted a linear mixed model, so the anova function doesn't provide a p-value (for a good reason) because it is not clear in a model with random effects, whether this provides a reliable p-value, quoting from FAQ section for glmm :

it is not in general clear that the null distribution of the computed ratio of sums of squares is really an F distribution, for any choice of denominator degrees of freedom.

You can also check this post or the help page for other possible alternatives, but I think you need to be careful about doing this. If you really need a p-value for some purpose, it might be better to revert to a fixed effect only model.

In your case, this post would be relevant as well, and if you provide more context on what you are testing, maybe other users can also suggest a more appropriate way of reporting your results

$\endgroup$
1
  • $\begingroup$ Thank you a lot for your answer. At least I think my model is fine so far. It contains the main effect (factorial, three levels) as well as other fixed effectts and random effects. $\endgroup$
    – J_Biology
    Oct 21 '20 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.