Reshape a seed germination datasets for time-to-event model fitting.
Reshape a seed germination datasets for time-to-event model fitting.
This function reshapes a datasets organised as necessary for nonlinear regression into the kind of dataset required by the drmte() function in the 'drcte' package. It works with either the counts of germinated seeds at each monitoring time or the cumulative counts at each monitoring time.
counts: Vector listing the counts of germinated seeds in each Petri dish at each assessment time.
treat: Dataframe listing, for each row of data, the corresponding level of experimental factors (one factor per column)
nViable: A vector listing the number of viable seeds, at the beginning of the assay. This number is the same for all observations belonging to the same dish.
moniTimes: Vector of monitoring times.
Dish: Vector of codes for dishes.
cumulative: Logical: True if counts are cumulative, False if they are not.