data(cypdata)
cyp_lesl_data <- verticalize3(data = cypdata, noyears = 6, firstyear = 2004,
patchidcol = "patch", individcol = "plantid", blocksize = 4,
sizeacol = "Inf2.04", sizebcol = "Inf.04", sizeccol = "Veg.04",
repstracol = "Inf.04", repstrbcol = "Inf2.04", fecacol = "Pod.04",
stagesize = "sizeadded", NAas0 = TRUE, age_offset = 2)
cyp_lesl_vital <- modelsearch(cyp_lesl_data, historical = FALSE,
approach = "mixed", suite = "cons", bestfit = "AICc&k", age = "obsage",
vitalrates = c("surv", "fec"), fecdist = "poisson", indiv = "individ",
year = "year2", year.as.random = TRUE, patch.as.random = TRUE,
show.model.tables = TRUE, fec.zero = TRUE, global.only = TRUE,
test.age = TRUE, quiet = "partial")
germination <- 0.08
protocorm_to_seedling <- 0.10
seeding_to_adult <- 0.20
seeds_per_fruit <- 8000
cyp_lesl_supp <- supplemental(historical = FALSE, stagebased = FALSE,
agebased = TRUE, age2 = c(1, 2), type = c(1, 1),
givenrate = c(protocorm_to_seedling, seeding_to_adult))
cyp_lesl_fb_mpm <- fleslie(data = cyp_lesl_data,
modelsuite = cyp_lesl_vital, last_age = 7, fecage_min = 3,
fecmod = (germination * seeds_per_fruit), supplement = cyp_lesl_supp)
altered1 <- add_stage(cyp_lesl_fb_mpm, add_before = 1, stage_name = "DS")
Run the code above in your browser using DataLab