Now, it should be clear that this tutorial is about the use of time-to-event methods in seed germination. It should be clear that we recommend these methods, as they are intrinsically correct and fully respectful of the characteristics of seed germination data. Furthermore, we will make use of the time-to-event platform within the ‘drc’ package, that has proven useful for seed germination and other types of agricultural data.
The very first problem we need to tackle is the appropriate shaping for our dataset. I will show this by using a simple dataset. As usual for this tutorial, we need to have installed and loaded the ‘drcSeedGerm’ package (see at this link)
Seeds of L. ornithopodioides were collected from natural populations, at three different maturation stages, i.e. at 27 Days After Anthesis (DAA), when seeds were still green (Stage A), at 35 DAA, when seeds were brown and soft (Stage B) and at 41 DAA, when seeds were brown and moderately hard (Stage C). Germination assays were performed by placing four replicates of 25 seeds on filter paper (Whatman no. 3) in 9-cm diameter Petri dishes, in the dark and at a constant temperature of 20°C. The filter paper was initially moistened with 5 mL of distilled water and replenished as needed during the assay. Germinated seeds were counted daily over 15 d and removed from the Petri dishes. This dataset is a subset of a bigger dataset, aimed at assessing the time when the hard coat imposes dormancy in seeds of different legume species (Gresta et al., 2011).
Very frequently the ‘field-book’ is compiled in ‘wide’ form, that is we have one Petri dish per row and one inspection time per column. The table below shows the ‘field-book’ for our example, as available in the ‘lotusOr’ dataset in the ‘drcSeedGerm’ package.
Dish | Stage | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | A | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 1 | 1 | 3 | 1 | 1 | 4 | 2 |
2 | A | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 3 | 1 | 1 |
3 | A | 0 | 0 | 0 | 0 | 0 | 3 | 4 | 4 | 3 | 1 | 2 | 1 | 1 | 0 | 1 |
4 | A | 0 | 0 | 0 | 0 | 0 | 1 | 3 | 1 | 2 | 1 | 2 | 1 | 3 | 1 | 1 |
5 | B | 0 | 0 | 0 | 4 | 1 | 2 | 1 | 1 | 0 | 1 | 2 | 2 | 3 | 2 | 1 |
6 | B | 0 | 0 | 0 | 4 | 2 | 2 | 1 | 0 | 1 | 1 | 3 | 4 | 3 | 4 | 0 |
7 | B | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 2 | 1 | 1 | 3 | 3 | 2 | 2 | 0 |
8 | B | 0 | 0 | 0 | 4 | 3 | 2 | 2 | 3 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |
9 | C | 1 | 10 | 1 | 2 | 1 | 2 | 3 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
10 | C | 1 | 10 | 4 | 1 | 4 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
11 | C | 1 | 11 | 5 | 1 | 2 | 2 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
12 | C | 0 | 16 | 1 | 2 | 2 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
That format is not ok for time-to-event methods. The ‘drm()’ function within the ‘drc’ package expects to recive the data in ‘long’ form, that is one inspection time per row and, at least, three columns: (1) the time at which the observation was made (e.g., ‘timeAf’); (2) the time at which the previous observation was made (e.g., ‘timeBef) and (3) the number of seeds that germinated between ’timeBef’ and ‘timeAf’. An extra row needs to be added for the ungerminated seeds at the end of the assay, with ‘timeBef’ equal to the final assessment time and ‘timeAf’ equal to ∞.
Such a reshaping may not be immediate for big datasets. Therefore, we have coded the function ‘makeDrm()’, that reshapes the dataset from the format shown in Table 1 to the correct format for time-to-event methods in ‘drc’. An example is given in the following box.
counts <- lotusOr[,3:length(lotusOr[1,])]
treat <- data.frame(tratt=lotusOr[,1])
nViable <- rep(25,12)
moniTimes <- c(1:15)
dataset <- makeDrm(counts=counts, treat=treat, nViable=nViable, moniTimes)
head(dataset, 16)
## group Dish timeBef timeAf count nCum propCum
## 1 A 1 0 1 0 0 0.00
## 2 A 1 1 2 0 0 0.00
## 3 A 1 2 3 0 0 0.00
## 4 A 1 3 4 0 0 0.00
## 5 A 1 4 5 0 0 0.00
## 6 A 1 5 6 1 1 0.04
## 7 A 1 6 7 2 3 0.12
## 8 A 1 7 8 1 4 0.16
## 9 A 1 8 9 1 5 0.20
## 10 A 1 9 10 1 6 0.24
## 11 A 1 10 11 3 9 0.36
## 12 A 1 11 12 1 10 0.40
## 13 A 1 12 13 1 11 0.44
## 14 A 1 13 14 4 15 0.60
## 15 A 1 14 15 2 17 0.68
## 16 A 1 15 Inf 8 NA NA
The ‘makeDrm()’ function requires the following arguments:
In other instances, we may have prepared our dataset as required by non-linear regression analysis, i.e. listing the cumulative number of germinated seeds for each inspection time. For instance, Table 2 shows an example for the first Petri dish, as available in the ‘lotusCum’ dataframe in the ‘drcSeedGerm’ package.
Stage | Dish | Time | nCum |
---|---|---|---|
A | 1 | 1 | 0 |
A | 1 | 2 | 0 |
A | 1 | 3 | 0 |
A | 1 | 4 | 0 |
A | 1 | 5 | 0 |
A | 1 | 6 | 1 |
A | 1 | 7 | 3 |
A | 1 | 8 | 4 |
A | 1 | 9 | 5 |
A | 1 | 10 | 6 |
A | 1 | 11 | 9 |
A | 1 | 12 | 10 |
A | 1 | 13 | 11 |
A | 1 | 14 | 15 |
A | 1 | 15 | 17 |
In this situation, we need to ‘decumulate’ the counts and add the beginning of each inspection interval (e.g., ‘timeBef’). We can easily do this by using the ‘makeDrm2()’ function in ‘drcSeedGerm’. An example is given in the box below.
moniTime <- lotusCum$Time
count <- lotusCum$nCum
nViable <- rep(25, length(lotusCum[,1]))
Dish <- as.factor(lotusCum$Dish)
treatGroups <- lotusCum[,1]
dataset_sd <- makeDrm2(count, treatGroups, nViable, moniTime, Dish)
head(dataset_sd, 10)
## GroupT Dish timeBef timeAf nViable nSeeds nCum
## 1 A 1 0 1 25 0 0
## 2 A 1 1 2 25 0 0
## 3 A 1 2 3 25 0 0
## 4 A 1 3 4 25 0 0
## 5 A 1 4 5 25 0 0
## 6 A 1 5 6 25 1 1
## 7 A 1 6 7 25 2 3
## 8 A 1 7 8 25 1 4
## 9 A 1 8 9 25 1 5
## 10 A 1 9 10 25 1 6
The ‘makeDrm()’ function requires the following arguments:
These two functions are meant to ease your transition from traditional methods of data analysis to time-to-event methods. I do hope you find the useful!