Description Usage Arguments Value See Also Examples
Estimate model parameters for multiple disease progress curves
1 2 3 4 5 6 7 8 |
time_col |
Character name specifying the column for the time. eg: time_col = "days". |
intensity_col |
Character name specifying the column for the disease intensity. |
data |
|
strata_cols |
Character name or vector specifying the columns for stratification. |
starting_par |
Starting value for initial inoculun (y0) and apparent infection rate (r). Please informe in that especific order |
maxiter |
Maximum number of iterations. Only used if is |
nlin |
Logical. If |
estimate_K |
Logical. If |
Returns a data.frame
containing estimated parameters for individual strata levels.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | set.seed(1)
# create stratified dataset
data_A1 = sim_gompertz(N = 30, y0 = 0.01,dt = 5, r = 0.3, alpha = 0.5, n = 4)
data_A1 = dplyr::mutate(data_A1,
fun = "A",
cultivar = "BR1")
set.seed(1)
data_B1 = sim_gompertz(N = 30, y0 = 0.01, dt = 5, r = 0.2, alpha = 0.5, n = 4)
data_B1 = dplyr::mutate(data_B1,
fun = "B",
cultivar = "BR1")
set.seed(1)
data_A2 = sim_gompertz(N = 30, y0 = 0.01,dt = 5, r = 0.1, alpha = 0.5, n = 4)
data_A2 = dplyr::mutate(data_A2,
fun = "A",
cultivar = "BR2")
set.seed(1)
data_B2 = sim_gompertz(N = 30, y0 = 0.01,dt = 5, r = 0.1, alpha = 0.5, n = 4)
data_B2 = dplyr::mutate(data_B2,
fun = "B",
cultivar = "BR2")
data = dplyr::bind_rows(data_A1, data_B1,data_A2, data_B2)
fit_multi(time_col = "time",
intensity_col = "random_y",
data = data,
strata_col = c("fun","cultivar"),
starting_par = list(y0 = 0.01, r = 0.03),
maxiter = 1024,
nlin = FALSE,
estimate_K = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.