simulateEstimates: Simulates capture re-capture estimates

Description Usage Arguments Examples

View source: R/power.R

Description

Simulates capture re-capture estimates

Usage

1
2
simulateEstimates(nsim, N, p, htype = "None", heteroPerc = 1,
  monitorFunc = function(i) { })

Arguments

nsim

number of simulations

N

Population size

p

A vector of capture event probabilities

htype

The type of capture heterogeneity. Either "None" or "Normal"

heteroPerc

The increase in odds of capture for the perc 90th percentile most likely to be captured individuals, compared to the average individual.

monitorFunc

A function called after every iteration. Useful for monitoring simulation progress.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ggplot2)
# Simulate estimates from the Mt model with no population heterogeneity
ests <- simulateEstimates(15,500,c(.1,.1,.1))

# Simulate estimates from the Mth (Normal) model with no population heterogeneity.
ests2 <- simulateEstimates(30,500,c(.1,.1,.1), htype="Normal")

df <- data.frame(est = ests[[1]],type="Mt")
df <- rbind(df, data.frame(est = ests2[[1]],type="Mth (Normal)"))
qplot(x=est, color=type, data=df, geom="density") +
  geom_vline(xintercept=500,color="purple")

fellstat/shinyrecap documentation built on Oct. 6, 2018, 4:40 a.m.