0

I am new to glmm. I require it to fit a model that takes into account bees fed on two pollen treatments, placed in different cages, and their weight recorded on a daily basis. The question I seek to address is whether the weight of the bees varies with diet. The cages, replicates were nested in Replicate. My response variable is weight. My explanatory variables are: Diet, Day and Replicate/Cage/Bee. Two models are required one with mixed effects inclusive of the random variable and the second. The codes I am running shown below:

USING gamlss.mx Package with its function glmmNP

library(gamlss.mx) library(gamlss.dist)

m1<- glmmNP(Weight.g.~ Diet+ (1|Replicate/Cage/Bee), family="weibull", data=beewt)

m1<- glmmNP(Weight.g.~ Diet+ (1|Replicate/Cage/Bee), family="Gamma", data=beewt)

m1<- glmmNP(Weight.g.~ Diet+ (1|Replicate/Cage/Bee), family="Gumbell", data=beewt)

The error message is: could not find function glmmNP#

I have tried other packages like MASS with its function: glmm(PQL) library(MASS) model<- glmmPQL(Weight.g.~ Diet+ (1|Replicate/Cage/Bee), family="Gamma", data=beewt)

The error message is: argument "random" is missing, with no default

Please advise on how I can adjust my codes appropriately.

Community
  • 1
  • 1

1 Answers1

0

How about

bee.pql <- lmer(Weight.g. ~ Diet+Cage+Day+(1|Bee), data=beewt)

this treat weight as a continuous outcome, and the multiple records of one bee are related.

Jason Luo
  • 3
  • 1
  • 5