From 3ee476f6ef9a9628ceeeeadc4d40f2a3a38a49a1 Mon Sep 17 00:00:00 2001 From: thierrychambert <thierry.chambert@gmail.com> Date: Wed, 11 Aug 2021 14:27:26 +0200 Subject: [PATCH] corrected typo in run_analysis --- run_analysis.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/run_analysis.R b/run_analysis.R index c9f40c8..ee7136d 100644 --- a/run_analysis.R +++ b/run_analysis.R @@ -26,7 +26,7 @@ coeff_var_environ = 0.10 fatal_constant = "M" pop_size_type = "Npair" -cumuated_impacts = TRUE +cumulated_impacts = TRUE onset_year = c(2010, 2013, 2016) onset_time = onset_year - min(onset_year) + 1 @@ -68,7 +68,7 @@ build_Leslie(s = s_calibrated, f = f_calibrated) %>% lambda ##============================================================================== ## Analyses (simulations) == ##============================================================================== -run0 <- run_simul(nsim, cumuated_impacts, +run0 <- run_simul(nsim, cumulated_impacts, fatalities_mean, fatalities_se, onset_time, pop_size_mean, pop_size_se, pop_size_type, pop_growth_mean, pop_growth_se, @@ -80,7 +80,7 @@ run0 <- run_simul(nsim, cumuated_impacts, - +names(run0) N <- run0$N ; dim(N) plot_traj(N, xlab = "Annee", ylab = "Taille de population (totale)") abline(h = K) @@ -89,6 +89,11 @@ colSums(N[,,,]) %>% max plot_impact(N, onset_year = onset_year , xlab = "Annee", ylab = "Impact relatif") + +N <- run0$N +output <- get_metrics(N, cumuated_impacts = cumulated_impacts) +output$scenario$Pext + #plot_impact(N = N, xlab = "year", ylab = "pop size") #source("draws_histog.R") #draws_histog(draws = run0$lambdas, mu = pop_growth_mean, se = pop_growth_se) -- GitLab