# \donttest{
data('OVENdata')
ovenPsi <- estTransition(isGL = OVENdata$isGL, #Logical vector:light-level GL(T)
isTelemetry = !OVENdata$isGL,
geoBias = OVENdata$geo.bias, # Light-level GL location bias
geoVCov = OVENdata$geo.vcov, # Location covariance matrix
targetSites = OVENdata$targetSites, # Non-breeding target sites
originSites = OVENdata$originSites, # Breeding origin sites
originPoints = OVENdata$originPoints, # Capture Locations
targetPoints = OVENdata$targetPoints, # Device target locations
verbose = 0, # output options
nSamples = 100, # This is set low for example
resampleProjection = sf::st_crs(OVENdata$targetSites))
ovenEst <- estStrength(targetDist = OVENdata$targetDist, # targetSites distance matrix
originDist = OVENdata$originDist, # originSites distance matrix
originRelAbund = OVENdata$originRelAbund,#Origin relative abund
psi = ovenPsi,
verbose = 1, # output options
nSamples = 1000)
fm <- getCMRexample()
originPos13 <- matrix(c(rep(seq(-99, -81, 2), each = 10),
rep(seq(49, 31, -2), 10)), 100, 2)
targetPos13 <- matrix(c(rep(seq(-79, -61, 2), each = 10),
rep(seq(9, -9, -2), 10)), 100, 2)
originPosCMR <- rowsum(originPos13, c(rep(1:2, 5, each = 5),
rep(3:4, 5, each = 5))) / 25
targetPosCMR <- rowsum(targetPos13, c(rep(1:2, 5, each = 5),
rep(3:4, 5, each = 5))) / 25
originDist <- distFromPos(originPosCMR, 'ellipsoid')
targetDist <- distFromPos(targetPosCMR, 'ellipsoid')
originRelAbundTrue <- rep(0.25, 4)
theorEst <- estStrength(originRelAbund = originRelAbundTrue, psi = fm,
originDist = originDist, targetDist = targetDist,
originSites = 5:8, targetSites = c(3,2,1,4),
nSamples = 1000, verbose = 0,
sampleSize = length(grep("[2-5]", fm$data$data$ch)))
ovenEst
theorEst
diff1 <- diffMC(estimates = list(Ovenbird = ovenEst, Theorybird = theorEst),
nSamples = 10000, returnSamples = TRUE)
# }
Run the code above in your browser using DataLab