Description Usage Arguments Details Value See Also Examples
Constructs an age-bias table interactively. This age-bias table can then be used to convert the true ages of a sample of fish to ‘biased’ ages.
1 2 3 | simAgeBias(max.age = 10, show.props = TRUE, scale = TRUE)
simApplyAgeBias(ages, bias.table = NULL, agree.table = NULL)
|
max.age |
A numeric indicating the maximum age to be modelled in the age bias table. |
show.props |
A logical indicating whether proportions of fish at x-axis age or numbers of fish should be shown on the interactive plot ( |
scale |
A logical indicating whether the plotted value of the proportions or numbers should be scaled in relation to their numeric value ( |
ages |
A vector containg the ‘true’ ages of individual fish. |
bias.table |
A table that contains, as columns, the proportion of fish of a certain ‘true’ age in various ‘biased’ ages – i.e., a column-proportions table constructed from an age agreement table where the ‘true’ ages correspond to columns. |
agree.table |
A table that contains the age-agreement table where the ‘true’ ages correspond to columns. |
NEED DETAIL HERE.
If simApplyAgeBias
is used then a vector of ‘biased’ ages is returned. If simAgeBias
is used then a list with the following two items is returned:
agree a table containing the age agreement table resulting from the interactive process.
bias a table containing the bias table resulting from the interactive process.
See simAges
for related functionality and ageBias
and agePrecision
in FSA for analyzing this type of data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## set seed for repeatability
set.seed(5234734)
## Simulated individual ages (random)
# see simAges functions
bg.ages <- simAges(N0=500,A=0.35)
summary(bg.ages)
## Simulated ages given the above 'true' ages and age biases from interactive choices
# NOT RUN because of interactive choices
## Not run:
bg.ab <- simAgeBias(max.age=max(bg.ages))
bg.ages2 <- simApplyAgeBias(bg.ages,bg.ab$bias)
summary(bg.ages2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.