true_DR | R Documentation |
true_DR
returns the true density ratio for the current timestep,
updating the Density_ratio array.
true_DR( t, cr, fdr, Abundance, Inside = 3, Outside = c(1, 2, 4, 5), Density_ratio, BM = FALSE, Years_sampled = 1, Areas_sampled = "all", Ind_sampled = "all", A = 5 )
t |
temporary numeric value, the current time step. |
cr |
temporary numeric value, the current control rule. |
fdr |
temporary numeric value, the current final target density ratio. |
Abundance |
numeric array, the total number of individuals in each area, at each timestep, under all control rules, with all estimates of natural mortality. |
Inside |
numeric vector, the area(s) inside the marine reserve. Default value is 3. |
Outside |
numeric vector, the area(s) outside the marine reserve. Default value is c(1, 2, 4, 5). |
Density_ratio |
numeric array, the true density ratios at each timestep, under each control rule, and for each estimate of natural mortality. |
BM |
logical value, are the control rules from Babcock and MacCall 2011? Default value is FALSE. |
Years_sampled |
numeric value, the number of years of sampling upon which to base the estimate of density ratio. Default value is 1. |
Areas_sampled |
character value, the areas to be sampled to calculate density ratio. Values can be: 'all' - sample all areas. 'far' - sample only the first and last areas (assuming the reserve is somewhere in the middle. Default value is 'all'. |
Ind_sampled |
character value, the individuals to be sampled to calculate density ratio. Values can be: 'all' - sample all individuals. 'mature' - sample only mature individuals. Default value is 'all'. |
A |
numeric value, the number of total areas in the model. Default value is 5. |
a numeric array that updates the true density ratios for the most current timestep and control rule.
A = 5; TimeT = 70; CR = 6; FDR = 4; Time2 = 20 Abundance <- array(rep(3400, A*TimeT*CR*FDR*1), c(A, TimeT, CR, FDR, 1)) Density_ratio <- array(rep(0, TimeT*CR*FDR), c(TimeT, CR, FDR)) true_DR(t = 51, cr = 1, fdr = 1, Abundance, Inside = 3, Outside = c(1, 2, 4, 5), Density_ratio, BM = FALSE, Years_sampled = 1, Areas_sampled = 'all', Ind_sampled = 'all', A = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.