OnofriAndreaPG / drcte

Time-to-event methods for agriculture
0 stars 0 forks source link

Thermal Time-to-Event İssue #2

Closed toreality closed 1 year ago

toreality commented 1 year ago

Hello,

I have been trying to implement the thermal time-to-event data on a dataset following your tutorials and appendices attached to your paper. The model doesn't converge and the following error is returned, after I call the summary method on the model object.

Error in solve.default(object$fit$hessian) : Lapack routine dgesv: system is exactly singular: U[1,1] = 0

As I have observed the start parameters of the function are exactly the same as returned fit values, and the hessian matrix is obviously singular.

I only have 3 unique temperatures in the input matrix, as there is no germination in two other temperatures assayed.

My call of the model is as follows and I also have pasted first 25 lines of my dataset. Could you please inform me if I am missing something obvious or if my dataset is just insufficient for the implementation?

modTTEM <- drmte(count ~ timeBef + timeAf + Temperature, fct = drcSeedGerm::TTEM(), data = to_event)

head(to_event,25) Population Replicate Temperature Timepoint Total.Seeds Units timeBef timeAf count nCum propCum 1 1 1 15 12 40 1 0 2 0 0 0.000 2 1 1 15 12 40 1 2 4 6 6 0.150 3 1 1 15 12 40 1 4 7 9 15 0.375 4 1 1 15 12 40 1 7 9 0 15 0.375 5 1 1 15 12 40 1 9 11 0 15 0.375 6 1 1 15 12 40 1 11 14 0 15 0.375 7 1 1 15 12 40 1 14 16 1 16 0.400 8 1 1 15 12 40 1 16 18 0 16 0.400 9 1 1 15 12 40 1 18 21 0 16 0.400 10 1 1 15 12 40 1 21 23 0 16 0.400 11 1 1 15 12 40 1 23 25 0 16 0.400 12 1 1 15 12 40 1 25 28 0 16 0.400 13 1 1 15 12 40 1 28 Inf 24 NA NA 14 2 1 15 12 40 2 0 2 0 0 0.000 15 2 1 15 12 40 2 2 4 8 8 0.200 16 2 1 15 12 40 2 4 7 1 9 0.225 17 2 1 15 12 40 2 7 9 0 9 0.225 18 2 1 15 12 40 2 9 11 0 9 0.225 19 2 1 15 12 40 2 11 14 0 9 0.225 20 2 1 15 12 40 2 14 16 0 9 0.225 21 2 1 15 12 40 2 16 18 0 9 0.225 22 2 1 15 12 40 2 18 21 0 9 0.225 23 2 1 15 12 40 2 21 23 0 9 0.225 24 2 1 15 12 40 2 23 25 0 9 0.225 25 2 1 15 12 40 2 25 28 0 9 0.225

toreality commented 1 year ago

I guess I have found my mistake, already recorded some improvement regarding errors and some parameters can be estimated now. I needed to re-write submodels, since I am in the sub-optimal range only.