View source: R/lnorm_vector_boot.r
lnorm_vector_boot | R Documentation |
This function was designed to be used with time series of indices of abundance or removals. Based on code from previous BAM Monte-Carlo Bootstrap code
lnorm_vector_boot(x, cv, bootN = 1, standardize = FALSE, digits = NULL)
x |
observed vector |
cv |
observed cv for x |
bootN |
number of bootstrap replicates. Allows multiple bootstrapped vectors to be calculated without looping |
standardize |
divide resulting vectors by their own mean so that they have a mean of 1 |
digits |
Number of significant digits to round output to. If NULL, output is not rounded. |
Nikolai Klibansky, Kyle Shertzer, Erik Williams
## Not run:
rdat <- rdat_VermilionSnapper
year <- rdat$t.series$year
U <- setNames(rdat$t.series$U.cHL.ob,year)
cv_U <- setNames(rdat$t.series$cv.U.cHL,year)
nsim <- 100
U_boot <- lnorm_vector_boot(U,cv_U,nsim)
dimnames(U_boot) <- list("year"=year,"sim"=sprintf(paste("%0",nchar(nsim),".0f",sep=""),1:nsim))
plot_boot_vec(t(U_boot))
points(as.numeric(year),U,type="o",col="blue")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.