alex
alex

Reputation: 183

Mixed models using ASReml (binomial distribution)

I am fitting the following model using ASReml:

nmod11 <- asreml(fixed = Cocc_Prevalence ~  Sex + Age + Sample_Period +
                   Sex:Sample_Period,
                 random = ~ Animal_ID + spl(Sample_Period), 
                 na.action = na.method (x = "include", y = "include"),
                 family.asreml = asr_binomial(link = "logit", dispersion=1.0, total=counts),
                 data = data.df)

Where the response variable is binomial (parasite present or absent). Sex and age are factors and sample period is an integer (between 0-12).

When I predict from this model using the following code:

pvp <-  predict(nmod11, classify = "Sex + Sample_Period", 
                   levels = list(Sex = c("F","M"),
                                 Sample_Period = seq(1,12,1)))

Some of the returned predicted values are below 0 - which I dont believe is correct (you can't have minus number of parasites).

Does anyone know why this is happening and how to fix it?

Upvotes: 1

Views: 65

Answers (0)

Related Questions