0

I have mean germination data (3 replicates of n=50 seeds each) that I am re-arranging to fit the event-time model in R package DRC (Ritz et al. 2013). Some of my counts become negative which I think is why when I try to use the drm function I get an error. Why are counts negative, and is this the problem behind my drm error?

It seems to work fine using the chickweed dataset.

library(drc)

# Data
time<-c(6, 19, 33, 47, 62, 75, 89)
count<-c(0, 1.66, 3.33, 1.33, 0, 0, 0)
data<-data.frame(time, count)

#From Ritz (2013)
germ <- data.frame(start = c(0, data$time), end = c(data$time, Inf)) 
germ$count <- c(0, diff(data$count), 50 - tail(data$count, 1))
head(germ)
tail(germ)

## Fitting the event-time model (by specifying the argument type explicitly)
germ.m1 <- drm(count~start+end, data = germ, fct = LL.3(), type = "event")
summary(germ.m1)

I expected all counts to be positive, but several are negative. Any assistance is much appreciated!

Dustin
  • 183
  • 7

1 Answers1

0

I do not know the problem, but I did find a simple (yet perhaps kludgy) solution.

# Same as in question
germ <- data.frame(start = c(0, data$time), end = c(data$time, Inf))

# Substitute for germ$count from question
cnt <- c(data$count) # cnt = count
rem<-50-sum(data$count) # 50 = number of seeds sown; 
                        # rem = remainder(# of seeds that did not germinate)
germ$count<-c(cnt, rem)

With this work around, the count comes out all positive and the model is fitted!!!

Dustin
  • 183
  • 7