Code Monkey home page Code Monkey logo

drcte's Introduction

drcte

Overview

This package contains several service functions to be used in support to the package 'drc', to analyse datasets obtained from time-to-event and other types of censored data in agriculture

Installation

# You can install 'drcte' from GitHub
# install.packages("devtools")
# devtools::install_github("onofriAndreaPG/drcte")

drcte's People

Contributors

olivroy avatar onofriandreapg avatar

Watchers

 avatar  avatar

drcte's Issues

Thermal Time-to-Event İssue

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

Censored data (end=NA) is not running

Please help me with the following problem with "drcte". I would be very grateful for any help in this regard. Regards

  1. data: trat24C180, germination of 50 seeds in 10 capsules, stored for 180 days at 8°C,.
  2. on average 9% of the seeds in the 10 capsules germinated.
  3. The number of germinated seeds at each of 6 time intervals was recorded.
  4. "NA" was placed at the right end of the last interval.
  5. The number of seeds not germinated in that last interval was recorded.
    image

Problem 1: The last interval ending in "NA" gives an error.

mod24C180 <- drmte(counts ~ start + end,
curveid = trat, fct = KDE(),data = trat24C180)
Error in matrix(0, n, k, dimnames = list(1:n, intname)) :
length of 'dimnames' [1] not equal to array extent

Problem2: Leaving the value of the last interval empty, when importing the file in R, "NA" appears automatically. So the script runs, but in the graph, the germination reaches the value probability = 1, when the real germination rate is 0.09.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.