0

I am trying to run a glmer model but got an error message saying that a starting value is missing. I tried to find a solution but did not understood most of the tips. Would anyone please be explain what is a starting value and what the solution would be in an easy understandable way?

Study Description

I measured aggression (count data) between animals that had different amount of space = treatment. The idea is to use treatment as continuous variable. I measured aggression three times, where at the first age all pens had the same amount of space (covar) and in then the treatments were applied (age). Aggression was measured at two positions within each pen (position).

Sample Data

agg <- structure(list(age = c(21L, 21L, 39L, 39L), pen = c(1L, 1L, 1L, 1L), treatment = c(4L, 4L, 4L, 4L), position = structure(c(1L, 2L, 1L, 2L), .Label = c("AKB", "BG"), class = "factor"), jost_feed = c(NA, NA, NA, 3L), ovar_jostF_19 = c(1L, 1L, 1L, 1L), aggression = c(NA, NA, NA, 13L), covar_aggr_19 = c(12L, 15L, 12L, 15L)), .Names = c("age", "pen", "treatment", "position", "jost_feed", "covar_jostF_19", "aggression", "covar_aggr_19"), row.names = c(NA, 4L), class = "data.frame") 
#

Attempted Code

After the initial exploration of the data I decided to run a gaussian family and use a log link:

agg1<- glmer (y~ treatment + age 
            +treatment:age
            + (1|pen/covar)+(1|pen/position), 
            data= agg, 
            family = gaussian(link = "log"),
            na.action=na.omit)
summary(agg1)
coip
  • 1,312
  • 16
  • 30
  • 1
    The solution is not very simple for most of us. Solving this is impossible without a [reproducible example](http://stackoverflow.com/a/5963610/1412059). However, the issue might be in your choices regarding statistics and less a programming issue. Usually, you should use a Poisson distribution for count data. I also don't understand your random effects, but that might be due to my insufficient understanding of the experimental design. – Roland Jan 22 '16 at 09:01
  • R studio Version 0.99.473 was used on Windows 7 and the code is up. age pen treatment position aggression covar_aggr_age19 21 18 10 AKB 1 17 21 18 10 BG 15 8 39 18 10 AKB NA 17 39 18 10 BG NA 8 I hope this is what you need. covar_aggr_age 19 is by baseline when all pens had the same space. – Janja S. Jan 26 '16 at 06:26
  • structure(list(age = c(21L, 21L, 39L, 39L), pen = c(1L, 1L, 1L, 1L), treatment = c(4L, 4L, 4L, 4L), position = structure(c(1L, 2L, 1L, 2L), .Label = c("AKB", "BG"), class = "factor"), jost_feed = c(NA, NA, NA, 3L), covar_jostF_19 = c(1L, 1L, 1L, 1L), aggression = c(NA, NA, NA, 13L), covar_aggr_19 = c(12L, 15L, 12L, 15L)), .Names = c("age", "pen", "treatment", "position", "jost_feed", "covar_jostF_19", "aggression", "covar_aggr_19"), row.names = c(NA, 4L), class = "data.frame") I think this is what is needed. – Janja S. Jan 26 '16 at 06:39

0 Answers0