Linear mixed model: fixed-effect model matrix is rank deficient so dropping 480 columns / coefficients

Hello,
I am doing a study on the feeding behaviour of common terns and whether the foraging success of the bird depends on the fish stocks.
I have data for five years. The feeding behaviour of the birds was measured several times a day per hour over several weeks. For the fish data, I only have one value per year. Furthermore, I have control variables, such as temperature, which were also measured per hour and data on what kind of fish the birds ate (in percent) and what kind of fish were available (also in percent).

## This is my data frame:
 year temperature  success herring_eaten shrimp_eaten fish_available herring_available shrimp_availabe
2016    10           10        0.56         0.44         455            0.55               0.45
2016    13           13.6      0.07         0.93         455            0.55               0.45
2016    14           24        0.96         0.04         455            0.55               0.45
2017    20           5.4       0.67         0.33         1967           0.78               0.22
...

## I am not sure if I use the lmer() right
model <- lmer(log_foraging_success ~  herring_eaten*shrimp_eaten + temperature + year +
                 herring_eaten * herring_available + shrimp_eaten*shrimp_available +
                 (fish_available),
               data=df)

## I get this outcome:
fixed-effect model matrix is rank deficient so dropping 480 columns / coefficients

Maybe someone can help me and tell me if I need to use lmer() differently and why I get this warning. Furthermore, I would like to have the p value also for fish availability to be able to say whether it has a significant effect. But it is not in the model when I use summ().

Many thanks in advance :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.