Type: | Package |
Title: | Wildlife Sightability Modeling |
Version: | 1.5.5 |
Date: | 2023-08-19 |
Description: | Uses logistic regression to model the probability of detection as a function of covariates. This model is then used with observational survey data to estimate population size, while accounting for uncertain detection. See Steinhorst and Samuel (1989). |
URL: | https://github.com/jfieberg/SightabilityModel |
Imports: | formula.tools, Matrix, msm, plyr, mvtnorm, stats, survey, utils |
License: | GPL-2 |
LazyLoad: | yes |
RoxygenNote: | 7.2.3 |
Encoding: | UTF-8 |
Suggests: | car, data.table, GGally, ggplot2, kableExtra, knitr, readxl, reshape2, rmarkdown, tidyr, R.rsp |
VignetteBuilder: | R.rsp, knitr, rmarkdown |
NeedsCompilation: | no |
Packaged: | 2023-08-19 21:45:51 UTC; cschwarz |
Author: | Fieberg John [aut], Schwarz Carl James [aut, cre] |
Maintainer: | Schwarz Carl James <cschwarz.stat.sfu.ca@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-08-19 22:02:31 UTC |
Wildlife Sightability Modeling
Description
Uses logistic regression to model the probability of detection as a function of covariates. This model is then used with observational survey data to estimate population size, while accounting for uncertain detection. See Steinhorst and Samuel (1989).
Author(s)
John Fieberg
Maintainer: John Fieberg <jfieberg@umn.edu>, Carl James Schwarz <cschwarz.stat.sfu.ca@gmail.com>
References
Fieberg, J. 2012. Estimating Population Abundance Using Sightability Models: R SightabilityModel Package. Journal of Statistical Software, 51(9), 1-20. URL https://doi.org/10.18637/jss.v051.i09
Steinhorst, Kirk R. and Samuel, Michael D. 1989. Sightability Adjustment Methods for Aerial Surveys of Wildlife Populations. Biometrics 45:415–425.
R function that gives the same functionality as the MoosePop program.
Description
A stratified random sample of blocks in a survey area is conducted. In each block, groups of moose are observed (usually through an aerial survey). For each group of moose, the number of moose is recorded along with attributes such as sex or age. MoosePopR() assumes that sightability is 100%. Use the SightabilityPopR() function to adjust for sightability < 100%.
Usage
MoosePopR(
survey.data,
survey.block.area,
stratum.data,
density = NULL,
abundance = NULL,
numerator = NULL,
denominator = NULL,
block.id.var = "Block.ID",
block.area.var = "Block.Area",
stratum.var = "Stratum",
stratum.blocks.var = "Stratum.Blocks",
stratum.area.var = "Stratum.Area",
conf.level = 0.9,
survey.lonely.psu = "fail"
)
Arguments
survey.data |
A data frame containing counts of moose in each group along with a variable identifying the stratum (see stratum.var) and block (see block.id.var) |
survey.block.area |
A data frame containing for each block, the block id (see block.id.var), the area of the block (see block.area.var). The data frame can contain information for other blocks that were not surveyed (e.g. for the entire population of blocks) and information from these additional blocks will be ignored. |
stratum.data |
A data frame containing for each stratum, the stratum id (see stratum.var), the total number of blocks in the stratum (see stratum.blocks.var) and the total area of the stratum (see stratum.area.var) |
density , abundance , numerator , denominator |
Right-handed formula identifying the variable(s) in the survey.data data frame for which the density, abundance, or ratio (numerator/denominator) are to be estimated. |
block.id.var |
Name of the variable in the data frames that identifies the block.id (the sampling unit) |
block.area.var |
Name of the variable in data frames that contains the area of the blocks (area of sampling unit) |
stratum.var |
Name of the variable in the data frames that identifies the classical stratum |
stratum.blocks.var |
Name of the variable in the stratum.data data frame that contains the total number of blocks in the stratum. |
stratum.area.var |
Name of the variable in the stratum.data data.frame that contains the total stratum area. |
conf.level |
Confidence level used to create confidence intervals. |
survey.lonely.psu |
How to deal with lonely PSU within strata. See |
Value
A data frame containing for each stratum and for all strata (identified as stratum id .OVERALL
), the density,
or abundance or ratio estimate along with its estimated standard error and large-sample normal-based confidence interval.
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
References
To Be Added.
Examples
##---- See the vignettes for examples on how to run this analysis.
Classical and Domain Stratification using MoosePopR()
Description
This function allows for classical or domain stratification when using MoosePopR(). Caution **SE are NOT adjusted for measurements on multiple domains on the same sampling unit. Bootstrapping may be required**. Consult the vignette for more details.
MoosePopR_DomStrat() assumes that sightability is 100%. Use the SightabilityPopR_DomStrat() function to adjust for sightability < 100%.
Usage
MoosePopR_DomStrat(
stratum.data,
selected.unit.data,
waypoint.data,
density = NULL,
abundance = NULL,
numerator = NULL,
denominator = NULL,
stratum.var = "Stratum",
domain.var = "Domain",
stratum.total.blocks.var = "Total.Blocks",
stratum.total.area.var = "Total.Area",
block.id.var = "Block.ID",
block.area.var = "Block.Area",
conf.level = 0.9,
survey.lonely.psu = "fail"
)
Arguments
stratum.data |
A data frame containing for each combination of stratum and domain, the stratum id (see stratum.var), the domain id (see domain.var), the total number of blocks in the stratum (see stratum.total.blocks.var) and the total area of the stratum (see stratum.total.area.var) |
selected.unit.data |
A data frame containing information on the selected survey units. Required variables are the stratum (see stratum.var), domain (see domain.var), block.id (see block.id.var), and the area of the block (see block.area.var). |
waypoint.data |
A data frame containing counts of moose in each group along with a variable identifying the stratum (see stratum.var), domain (see domain.var) and block (see block.id.var). Additional variables can be included such as covariates for the sightability function (not currently used in MoosePopR) |
density , abundance , numerator , denominator |
Right-handed formula identifying the variable(s) in the waypoint data frame for which the density, abundance, or ratio (numerator/denominator) are to be estimated. |
stratum.var |
Name of the variable in the data frames that identifies the classical stratum |
domain.var |
Name of the variable in the data frames that identifies the domain. |
stratum.total.blocks.var |
Name of the variable in the stratum.data data frame that contains the total number of blocks in the stratum. |
stratum.total.area.var |
Name of the variable in the stratum.data data.frame that contains the total stratum area. |
block.id.var |
Name of the variable in the data frames that identifies the block.id (the sampling unit) |
block.area.var |
Name of the variable in data frames that contains the area of the blocks (area of sampling unit) |
conf.level |
Confidence level used to create confidence intervals. |
survey.lonely.psu |
How to deal with lonely PSU within strata. See |
Value
A data frame containing for each stratum and for all combinations of strata and domains
(identified as stratum id .OVERALL
), the density,
or abundance or ratio estimate along with its estimated standard error and large-sample normal-based confidence interval.
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
References
To Be Added.
Examples
##---- See the vignettes for examples on how to run this analysis.
Generate a bootstrap replicate of data for call to MoosePopR_DomStrat()
Description
This function takes the data from a classical/domain stratification and generates a bootstrap replicate suitable for analysis using MoosePopR_DomStrat(). A sightability model is allowed which "adjusts" the input data for sightability. This can also be used for SightabilityPopR() models by forcing block areas to 1 and the total block area in stratum to the number of blocks to mimic a mean-per-unit estimator. See the vignette for examples of usage.
Usage
MoosePopR_DomStrat_bootrep(
stratum.data,
selected.unit.data,
waypoint.data,
density = NULL,
abundance = NULL,
numerator = NULL,
denominator = NULL,
sight.model = NULL,
sight.beta = NULL,
sight.beta.cov = NULL,
stratum.var = "Stratum",
domain.var = "Domain",
stratum.total.blocks.var = "Total.Blocks",
stratum.total.area.var = "Total.Area",
block.id.var = "Block.ID",
block.area.var = "Block.Area",
conf.level = 0.9,
survey.lonely.psu = "fail",
check.args = TRUE
)
Arguments
stratum.data |
A data frame containing for each combination of stratum and domain, the stratum id (see stratum.var), the domain id (see domain.var), the total number of blocks in the stratum (see stratum.total.blocks.var) and the total area of the stratum (see stratum.total.area.var) |
selected.unit.data |
A data frame containing information on the selected survey units. Required variables are the stratum (see stratum.var), domain (see domain.var), block.id (see block.id.var), and the area of the block (see block.area.var). |
waypoint.data |
A data frame containing counts of moose in each group along with a variable identifying the stratum (see stratum.var), domain (see domain.var) and block (see block.id.var). Additional variables can be included such as covariates for the sightability function (not currently used in MoosePopR) |
density , abundance , numerator , denominator |
Right-handed formula identifying the variable(s) in the waypoint data frame for which the density, abundance, or ratio (numerator/denominator) are to be estimated. |
sight.model |
A formula that identifies the model used
to estimate sightability. For example |
sight.beta |
The vector of estimated coefficients for the logistic regression sightability model. |
sight.beta.cov |
The covariance matrix of |
stratum.var |
Name of the variable in the data frames that identifies the classical stratum |
domain.var |
Name of the variable in the data frames that identifies the domain. |
stratum.total.blocks.var |
Name of the variable in the stratum.data data frame that contains the total number of blocks in the stratum. |
stratum.total.area.var |
Name of the variable in the stratum.data data.frame that contains the total stratum area. |
block.id.var |
Name of the variable in the data frames that identifies the block.id (the sampling unit) |
block.area.var |
Name of the variable in data frames that contains the area of the blocks (area of sampling unit) |
conf.level |
Confidence level used to create confidence intervals. |
survey.lonely.psu |
How to deal with lonely PSU within strata. See |
check.args |
Should arguments be checked. Turn off for extensive bootstrapping to save time. |
Value
A list containing the input data (input.data
),
the bootstrap replicate (boot.data
), and a data frame (boot.res
) with the estimated density,
or abundance or ratio along with its estimated standard error and large-sample normal-based confidence interval.
The density/abundance/ratio over all strata is also given on the last line of the data.frame.
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
References
To Be Added.
Examples
##---- See the vignettes for examples on how to use this function
Sightability estimate with variance components estimator from Steinhorst and Samuel (1989) and Samuel et al. (1992).
Description
Estimates population size, with variance estimated using Steinhorst and Samuel (1989) and Samuel et al.'s (1992) estimator. Usually, this function will be called by Sight.Est
Usage
SS.est(
total,
srates,
nh,
Nh,
stratum,
subunit,
covars,
beta,
varbeta,
smat = NULL
)
Arguments
total |
Number of animals in each independently sighted group |
srates |
Plot-level sampling probability |
nh |
Number of sample plots in each stratum |
Nh |
Number of population plots in each stratum |
stratum |
Stratum identifiers (associated with the independently observed animal groups) |
subunit |
Plot ID (associated with the independently observed animal groups) |
covars |
Matrix of sightability covariates (associated with the independently observed animal groups) |
beta |
Logistic regression parameter estimates (from fitted sightability model) |
varbeta |
Estimated variance-covariance matrix for the logistic regression parameter estimates (from fitted sightability model) |
smat |
Estimated variance-covariance matrix for the inflation factors (1/probability of detection). This is an n.animal x n.animal matrix, and is usually calculated within the SS.est function. Non-null values can be passed to the function (e.g., if a bootstrap is used to estimate uncertainty due to the estimated detection parameters). |
Value
tau.hat |
Sightability estimate of population size, tau^ |
VarTot |
Estimated variance of tau^ |
VarSamp |
Estimated variance component due to sampling aerial units |
VarSight |
Estimated variance component due to sighting process (i.e., series of binomial rv for each animal group) |
VarMod |
Estimated variance component due to estimating detection probabilities using test trial data |
Author(s)
John Fieberg
References
Steinhorst, R. K., and M.D. Samuel. 1989. Sightability adjustment methods for aerial surveys of wildlife populations. Biometrics 45:415-425.
Wong, C. 1996. Population size estimation using the modified Horvitz-Thompson estimator with estimated sighting probabilities. Dissertation, Colorado State University, Fort Collins, USA.
See Also
Sightability estimate or ratio with variance components estimator from Steinhorst and Samuel (1989) and Samuel et al. (1992). This is merely a stub and has not been implemented.
Description
Estimates ratio, with variance estimated using Steinhorst and Samuel (1989) and Samuel et al.'s (1992) estimator. Usually, this function will be called by Sight.Est.Ratio()
Usage
SS.est.Ratio(
numerator,
denominator,
srates,
nh,
Nh,
stratum,
subunit,
covars,
beta,
varbeta,
smat = NULL
)
Arguments
numerator , denominator |
Number of animals for the numerator and denominator of the ratio in each independently sighted group |
srates |
Plot-level sampling probability |
nh |
Number of sample plots in each stratum |
Nh |
Number of population plots in each stratum |
stratum |
Stratum identifiers (associated with the independently observed animal groups) |
subunit |
Plot ID (associated with the independently observed animal groups) |
covars |
Matrix of sightability covariates (associated with the independently observed animal groups) |
beta |
Logistic regression parameter estimates (from fitted sightability model) |
varbeta |
Estimated variance-covariance matrix for the logistic regression parameter estimates (from fitted sightability model) |
smat |
Estimated variance-covariance matrix for the inflation factors (1/probability of detection). This is an n.animal x n.animal matrix, and is usually calculated within the SS.est.Ratio function. Non-null values can be passed to the function (e.g., if a bootstrap is used to estimate uncertainty due to the estimated detection parameters). |
Value
ratio.hat |
Sightability estimate of ratio, ratio^ |
VarRatio |
Estimated variance of ratio^ |
VarSamp , VarSight , VarMod |
Estimated variance component due to sampling, sightability and model set to NA |
Author(s)
Carl James Schwarz, cschwarz.stat.sfu.ca@gmail.com
References
Steinhorst, R. K., and M.D. Samuel. 1989. Sightability adjustment methods for aerial surveys of wildlife populations. Biometrics 45:415-425.
Wong, C. 1996. Population size estimation using the modified Horvitz-Thompson estimator with estimated sighting probabilities. Dissertation, Colorado State University, Fort Collins, USA.
See Also
Sightability Model Estimator
Description
Estimates population abundance by 1) fitting a sightability (logistic regression) model to "test trial" data; 2) applying the fitted model to independent (operational) survey data to correct for detection rates < 1.
Usage
Sight.Est(
form,
sdat = NULL,
odat,
sampinfo,
method = "Wong",
logCI = TRUE,
alpha = 0.05,
Vm.boot = FALSE,
nboot = 1000,
bet = NULL,
varbet = NULL
)
Arguments
form |
a symbolic description of the sightability model to be fit (e.g., "y ~ x1 + x2 + ..."), where y is a binary response variable (= 1 if the animal is seen and 0 otherwise) and x1, x2, ... are a set of predictor variables thought to influence detection |
sdat |
'sightability' data frame. Each row represents an independent sightability trial, and columns contain the response (a binary random variable = 1 if the animal was observed and 0 otherwise) and the covariates used to model detection probabilities. |
odat |
'observational survey' data frame containing the following variable names (stratum, subunit, total) along with the same covariates used to model detection probabilities (each record corresponds to an independently sighted group of animals). stratum = stratum identifier (will take on a single value for non-stratified surveys); subunit = numeric plot unit identifier; total = total number of observed animals (for each independently sighted group of animals). |
sampinfo |
data frame containing sampling information pertaining to the observational survey. Must include the following variables (stratum, nh, Nh). stratum = stratum identifier (must take on the same values as stratum variable in observational data set), nh = number of sampled units in stratum h, Nh = number of population units in stratum h; note (this dataset will contain a single record for non-stratified designs). |
method |
method for estimating variance of the abundance estimator. Should be one of ("Wong", "SS"). See details for more information. |
logCI |
Boolean variable, default (= TRUE), indicates the confidence interval should be constructed under the assumption that (tau^ - T) has a lognormal distribution, where T is the total number of animals observed (see details) |
alpha |
type I error rate for confidence interval construction |
Vm.boot |
Boolean variable, when = TRUE indicates a bootstrap should be used to estimate cov(theta[i,j],theta[i',j']), var/cov matrix of the expansion factors (1/detection prob) |
nboot |
number of bootstrap replicates to use if Vm.boot = TRUE |
bet |
regression parameters (if the sightability model is not to be fit by Sight.Est). Make sure the order is consistent with the specification in the "form" argument. |
varbet |
variance-covariance matrix for beta^ (if the sightability model is not to be fit by Sight.Est). Make sure the order is consistent with the specification in the "form" argument. |
Details
Variance estimation methods: method = Wong implements the variance estimator from Wong (1996) and is the recommended approach. Method = SS implements the variance estimator of Steinhorst and Samuel (1989), with a modification detailed in the Appendix of Samuel et al. (1992).
Estimates of the variance may be biased low when the number of test trials used to estimate model parameters is small (see Wong 1996, Fieberg and Giudice 2008). A bootstrap can be used to aid the estimation process by specifying Vm.boot = TRUE [note: this method is experimental, and can be time intensive].
Confidence interval construction: often the sampling distribution of tau^ is skewed right. If logCI = TRUE, the confidence interval for tau^ will be constructed under an assumption that (tau^ - T) has a lognormal distribution, where T is the total number of animals seen. In this case, the upper and lower limits are constructed as follows [see Wong(1996, p. 64-67)]:
LCL = T + [(tau^-T)/C]*sqrt(1+cv^2), UCL = T+[(tau^-T)*C]*sqrt(1+cv^2), where cv^2 = var(tau^)/(tau^-T)^2 and C = exp[z[alpha/2]*sqrt(ln(1+cv^2))].
Value
An object of class sightest
, a list that includes the
following elements:
sight.model |
the fitted sightability model |
est |
abundance estimate [tau.hat] and its estimate of uncertainty [Vartot] as well as variance components due to sampling [Varsamp], detection [VarSight], and model uncertainty [VarMod] |
The list also includes the original test trial and operational survey data, sampling information, and information needed to construct a confidence interval for the population estimate.
Author(s)
John Fieberg, Wildlife Biometrician, Minnesota Department of Natural Resources
References
Fieberg, J. 2012. Estimating Population Abundance Using Sightability Models: R SightabilityModel Package. Journal of Statistical Software, 51(9), 1-20. URL https://doi.org/10.18637/jss.v051.i09.
Fieberg, John and Giudice, John. 2008 Variance of Stratified Survey Estimators With Probability of Detection Adjustments. Journal of Wildlife Management 72:837-844.
Samuel, Michael D. and Steinhorst, R. Kirk and Garton, Edward O. and Unsworth, James W. 1992. Estimation of Wildlife Population Ratios Incorporating Survey Design and Visibility Bias. Journal of Wildlife Management 56:718-725.
Steinhorst, R. K., and M.D. Samuel. 1989. Sightability adjustment methods for aerial surveys of wildlife populations. Biometrics 45:415-425.
Wong, C. 1996. Population size estimation using the modified Horvitz-Thompson estimator with estimated sighting probabilities. Dissertation, Colorado State University, Fort Collins, USA.
Examples
# Load data frames
data(obs.m) # observational survey data frame
data(exp.m) # experimental survey data frame
data(sampinfo.m) # information on sampling rates (contained in a data frame)
# Estimate population size in 2007 only
sampinfo <- sampinfo.m[sampinfo.m$year == 2007,]
Sight.Est(observed ~ voc, odat = obs.m[obs.m$year == 2007,],
sdat = exp.m, sampinfo, method = "Wong",
logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
# BELOW CODE IS SOMEWHAT TIME INTENSIVE (fits models using 2 variance estimators to 3 years of data)
# Estimate population size for 2004-2007
# Compare Wong's and Steinhorst and Samuel variance estimators
tau.Wong <- tau.SS <- matrix(NA,4,3)
count <- 1
for(i in 2004:2007){
sampinfo <- sampinfo.m[sampinfo.m$year == i,]
# Wong's variance estimator
temp <- Sight.Est(observed ~ voc, odat = obs.m[obs.m$year == i,],
sdat = exp.m, sampinfo, method = "Wong",
logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
tau.Wong[count, ] <- unlist(summary(temp))
# Steinhorst and Samuel (with Samuel et al. 1992 modification)
temp <- Sight.Est(observed ~ voc, odat = obs.m[obs.m$year == i,],
sdat = exp.m, sampinfo, method = "SS")
tau.SS[count, ] <- unlist(summary(temp))
count<-count+1
}
rownames(tau.Wong) <- rownames(tau.SS) <- 2004:2007
colnames(tau.Wong) <- colnames(tau.SS) <- c("tau.hat","LCL","UCL")
(tau.Wong <- apply(tau.Wong, 1:2,
FUN=function(x){as.numeric(gsub(",", "", x, fixed = TRUE))}))
(tau.SS <- (tau.Wong <- apply(tau.Wong, 1:2,
FUN = function(x){as.numeric(gsub(",", "", x, fixed = TRUE))})))
## Not run:
require(gplots)
par(mfrow = c(1,1))
plotCI(2004:2007-.1, tau.Wong[,1], ui = tau.Wong[,3],
li = tau.Wong[,2], type = "l", xlab = "",
ylab = "Population estimate", xaxt = "n",
xlim=c(2003.8, 2007.2))
plotCI(2004:2007+.1, tau.SS[,1], ui = tau.SS[,3], li = tau.SS[,2],
type = "b", lty = 2, add = TRUE)
axis(side = 1, at = 2004:2007, labels = 2004:2007)
## End(Not run)
Sightability Model Estimator - Ratio of variables
Description
Estimates population ratios by 1) fitting a sightability (logistic regression) model to "test trial" data; 2) applying the fitted model to independent (operational) survey data to correct for detection rates < 1.
Usage
Sight.Est.Ratio(
form,
sdat = NULL,
odat,
sampinfo,
method = "Wong",
logCI = TRUE,
alpha = 0.05,
Vm.boot = FALSE,
nboot = 1000,
bet = NULL,
varbet = NULL
)
Arguments
form |
a symbolic description of the sightability model to be fit (e.g., "y ~ x1 + x2 + ..."), where y is a binary response variable (= 1 if the animal is seen and 0 otherwise) and x1, x2, ... are a set of predictor variables thought to influence detection |
sdat |
'sightability' data frame. Each row represents an independent sightability trial, and columns contain the response (a binary random variable = 1 if the animal was observed and 0 otherwise) and the covariates used to model detection probabilities. |
odat |
'observational survey' data frame containing the following variable names (stratum, subunit, numerator, denominator) along with the same covariates used to model detection probabilities (each record corresponds to an independently sighted group of animals). stratum = stratum identifier (will take on a single value for non-stratified surveys); subunit = numeric plot unit identifier; numerator = total number of observed animals (for each independently sighted group of animals for numerator of ratio); denominator = total number of observed animals (for each independently sighted group of animals for denominator of ratio). |
sampinfo |
data frame containing sampling information pertaining to the observational survey. Must include the following variables (stratum, nh, Nh). stratum = stratum identifier (must take on the same values as stratum variable in observational data set), nh = number of sampled units in stratum h, Nh = number of population units in stratum h; note (this dataset will contain a single record for non-stratified designs). |
method |
method for estimating variance of the abundance estimator. Should be one of ("Wong", "SS"). See details for more information. |
logCI |
Boolean variable, default (= TRUE), indicates the confidence interval should be constructed under the assumption that (tau^ - T) has a lognormal distribution, where T is the total number of animals observed (see details) |
alpha |
type I error rate for confidence interval construction |
Vm.boot |
Boolean variable, when = TRUE indicates a bootstrap should be used to estimate cov(theta[i,j],theta[i',j']), var/cov matrix of the expansion factors (1/detection prob) |
nboot |
number of bootstrap replicates to use if Vm.boot = TRUE |
bet |
regression parameters (if the sightability model is not to be fit by Sight.Est). Make sure the order is consistent with the specification in the "form" argument. |
varbet |
variance-covariance matrix for beta^ (if the sightability model is not to be fit by Sight.Est). Make sure the order is consistent with the specification in the "form" argument. |
Details
Variance estimation methods: method = Wong implements the variance estimator from Wong (1996) and is the recommended approach. Method = SS implements the variance estimator of Steinhorst and Samuel (1989), with a modification detailed in the Appendix of Samuel et al. (1992).
Estimates of the variance may be biased low when the number of test trials used to estimate model parameters is small (see Wong 1996, Fieberg and Giudice 2008). A bootstrap can be used to aid the estimation process by specifying Vm.boot = TRUE [note: this method is experimental, and can be time intensive].
Confidence interval construction: often the sampling distribution of tau^ is skewed right. If logCI = TRUE, the confidence interval for tau^ will be constructed under an assumption that (tau^ - T) has a lognormal distribution, where T is the total number of animals seen. In this case, the upper and lower limits are constructed as follows [see Wong(1996, p. 64-67)]:
LCL = T + [(tau^-T)/C]*sqrt(1+cv^2), UCL = T+[(tau^-T)*C]*sqrt(1+cv^2), where cv^2 = var(tau^)/(tau^-T)^2 and C = exp[z[alpha/2]*sqrt(ln(1+cv^2))].
Value
An object of class sightest_ratio
, a list that includes the
following elements:
sight.model |
the fitted sightability model |
est |
ratio estimate, ratio.hat,abundance estimate [tau.hat] and its estimate of uncertainty [Varratio] as well as variance components due to sampling [Varsamp], detection [VarSight], and model uncertainty [VarMod] |
The list also includes the estimates for the numerator and denominator total, the original test trial and operational survey data, sampling information, and information needed to construct a confidence interval for the population estimate.
Author(s)
Carl James Schwarz, StatMathComp Consulting by Schwarz, cschwarz.stat.sfu.ca@gmail.com
References
Fieberg, J. 2012. Estimating Population Abundance Using Sightability Models: R SightabilityModel Package. Journal of Statistical Software, 51(9), 1-20. URL https://doi.org/10.18637/jss.v051.i09.
Fieberg, John and Giudice, John. 2008 Variance of Stratified Survey Estimators With Probability of Detection Adjustments. Journal of Wildlife Management 72:837-844.
Samuel, Michael D. and Steinhorst, R. Kirk and Garton, Edward O. and Unsworth, James W. 1992. Estimation of Wildlife Population Ratios Incorporating Survey Design and Visibility Bias. Journal of Wildlife Management 56:718-725.
Steinhorst, R. K., and M.D. Samuel. 1989. Sightability adjustment methods for aerial surveys of wildlife populations. Biometrics 45:415-425.
Wong, C. 1996. Population size estimation using the modified Horvitz-Thompson estimator with estimated sighting probabilities. Dissertation, Colorado State University, Fort Collins, USA.
Examples
# Load data frames
data(obs.m) # observational survey data frame
data(exp.m) # experimental survey data frame
data(sampinfo.m) # information on sampling rates (contained in a data frame)
# Estimate ratio of bulls to cows in 2007 only
sampinfo <- sampinfo.m[sampinfo.m$year == 2007,]
obs.m$numerator <- obs.m$bulls
obs.m$denominator <- obs.m$cows
Sight.Est.Ratio(observed ~ voc, odat = obs.m[obs.m$year == 2007,],
sdat = exp.m, sampinfo, method = "Wong",
logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
R function that interfaces with the SightabilityModel package and gives similar functionality as the AerialSurvey program
Description
A stratified random sample of blocks in a survey area is conducted. In each block, groups of moose are observed (usually through an aerial survey). For each group of moose, the number of moose is recorded along with attributes such as sex or age.
The SightabilityPopR() function adjusts for sightability < 100%.
Usage
SightabilityPopR(
survey.data,
survey.block.area,
stratum.data,
density = NULL,
abundance = NULL,
numerator = NULL,
denominator = NULL,
sight.formula = observed ~ 1,
sight.beta = 10,
sight.beta.cov = matrix(0, nrow = 1, ncol = 1),
sight.logCI = TRUE,
sight.var.method = c("Wong", "SS")[1],
block.id.var = "Block.ID",
block.area.var = "Block.Area",
stratum.var = "Stratum",
stratum.blocks.var = "Stratum.Blocks",
stratum.area.var = "Stratum.Area",
conf.level = 0.9
)
Arguments
survey.data |
A data frame containing counts of moose in each group along with a variable identifying the stratum (see stratum.var) and block (see block.id.var) |
survey.block.area |
A data frame containing for each block, the block id (see block.id.var), the area of the block (see block.area.var). The data frame can contain information for other blocks that were not surveyed (e.g. for the entire population of blocks) and information from these additional blocks will be ignored. |
stratum.data |
A data frame containing for each stratum, the stratum id (see stratum.var), the total number of blocks in the stratum (see stratum.blocks.var) and the total area of the stratum (see stratum.area.var) |
density , abundance , numerator , denominator |
Right-handed formula identifying the variable(s) in the survey.data data frame for which the density, abundance, or ratio (numerator/denominator) are to be estimated. |
sight.formula |
A formula that identifies the model used
to estimate sightability. For example |
sight.beta |
The vector of estimated coefficients for the logistic regression sightability model. |
sight.beta.cov |
The covariance matrix of |
sight.logCI |
Should confidence intervals for the sightability adjusted estimates be computed
using a normal-based confidence interval on |
sight.var.method |
What method should be used to estimate the variances after adjusting for sightability. |
block.id.var |
Name of the variable in the data frames that identifies the block.id (the sampling unit) |
block.area.var |
Name of the variable in data frames that contains the area of the blocks (area of sampling unit) |
stratum.var |
Name of the variable in the data frames that identifies the classical stratum |
stratum.blocks.var |
Name of the variable in the stratum.data data frame that contains the total number of blocks in the stratum. |
stratum.area.var |
Name of the variable in the stratum.data data.frame that contains the total stratum area. |
conf.level |
Confidence level used to create confidence intervals. |
Value
A data frame containing for each stratum and for all strata (identified as stratum id .OVERALL
), the density,
or abundance or ratio estimate along with its estimated standard error and large-sample normal-based confidence interval.
Additional information on the components of variance is also reported.
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
References
To Be Added.
Examples
##---- See the vignettes for examples on how to run this analysis.
Classical and Domain Stratification using SightabilityPopR()
Description
This function allows for classical or domain stratification when using SightabilityPopR(). Caution **SE are NOT adjusted for measurements on multiple domains on the same sampling unit. Bootstrapping may be required**. Consult the vignette for more details.
SightabilityPopR_DomStrat() adjusts for sightability < 100%.
Usage
SightabilityPopR_DomStrat(
stratum.data,
selected.unit.data,
waypoint.data,
density = NULL,
abundance = NULL,
numerator = NULL,
denominator = NULL,
sight.formula = ~1,
sight.beta = 10,
sight.beta.cov = matrix(0, nrow = 1, ncol = 1),
sight.logCI = TRUE,
sight.var.method = c("Wong", "SS")[1],
stratum.var = "Stratum",
domain.var = "Domain",
stratum.total.blocks.var = "Total.Blocks",
stratum.total.area.var = "Total.Area",
block.id.var = "Block.ID",
block.area.var = "Block.Area",
conf.level = 0.9
)
Arguments
stratum.data |
A data frame containing for each combination of stratum and domain, the stratum id (see stratum.var), the domain id (see domain.var), the total number of blocks in the stratum (see stratum.total.blocks.var) and the total area of the stratum (see stratum.total.area.var) |
selected.unit.data |
A data frame containing information on the selected survey units. Required variables are the stratum (see stratum.var), domain (see domain.var), block.id (see block.id.var), and the area of the block (see block.area.var). |
waypoint.data |
A data frame containing counts of moose in each group along with a variable identifying the stratum (see stratum.var), domain (see domain.var) and block (see block.id.var). Additional variables can be included such as covariates for the sightability function (not currently used in MoosePopR) |
density , abundance , numerator , denominator |
Right-handed formula identifying the variable(s) in the waypoint data frame for which the density, abundance, or ratio (numerator/denominator) are to be estimated. |
sight.formula |
A formula that identifies the model used
to estimate sightability. For example |
sight.beta |
The vector of estimated coefficients for the logistic regression sightability model. |
sight.beta.cov |
The covariance matrix of |
sight.logCI |
Should confidence intervals for the sightability adjusted estimates be computed
using a normal-based confidence interval on |
sight.var.method |
What method should be used to estimate the variances after adjusting for sightability. |
stratum.var |
Name of the variable in the data frames that identifies the classical stratum |
domain.var |
Name of the variable in the data frames that identifies the domain. |
stratum.total.blocks.var |
Name of the variable in the stratum.data data frame that contains the total number of blocks in the stratum. |
stratum.total.area.var |
Name of the variable in the stratum.data data.frame that contains the total stratum area. |
block.id.var |
Name of the variable in the data frames that identifies the block.id (the sampling unit) |
block.area.var |
Name of the variable in data frames that contains the area of the blocks (area of sampling unit) |
conf.level |
Confidence level used to create confidence intervals. |
Value
A data frame containing for each stratum and for all combinations of strata and domains
(identified as stratum id .OVERALL
), the density,
or abundance or ratio estimate along with its estimated standard error and large-sample normal-based confidence interval.
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
References
To Be Added.
Examples
##---- See the vignettes for examples on how to run this analysis.
Sightability estimate with variance components estimator from Wong (1996)
Description
Estimates population size, with variance estimated using Wong's (1996) estimator. This function will usually be called by Sight.Est function (but see details).
Usage
Wong.est(
total,
srates,
nh,
Nh,
stratum,
subunit,
covars,
beta,
varbeta,
smat = NULL
)
Arguments
total |
Number of animals in each independently sighted group |
srates |
Vector of plot-level sampling probabilities (same dimension as
|
nh |
Number of sample plots in each stratum |
Nh |
Number of population plots in each stratum |
stratum |
Stratum identifiers (associated with the independently observed animal groups) |
subunit |
Plot ID (associated with the independently observed animal groups) |
covars |
Matrix of sightability covariates (associated with the independently observed animal groups) |
beta |
Logistic regression parameter estimates (from fitted sightability model) |
varbeta |
Estimated variance-covariance matrix for the logistic regression parameter estimates (from fitted sightability model) |
smat |
Estimated variance-covariance matrix for the inflation factors (1/probability of detection). This is an n.animal x n.animal matrix, and is usually calculated within the Wong.est function. Non-null values can be passed to the function (e.g., if a bootstrap is used to estimate uncertainty due to the estimated detection parameters). |
Details
This function is called by Sight.Est, but may also be called directly by the user (e.g., in cases where the original sightability [test trial] data are not available, but the parameters and var/cov matrix from the logistic regression model is available in the literature).
Value
tau.hat |
Sightability estimate of population size, tau^ |
VarTot |
Estimated variance of tau^ |
VarSamp |
Estimated variance component due to sampling aerial units |
VarSight |
Estimated variance component due to sighting process (i.e., series of binomial rv for each animal group) |
VarMod |
Estimated variance component due to estimating detection probabilities using test trial data |
Author(s)
John Fieberg
References
Rice CG, Jenkins KJ, Chang WY (2009). Sightability Model for Mountain Goats." The Journal of Wildlife Management, 73(3), 468- 478.
Steinhorst, R. K., and M.D. Samuel. (1989). Sightability adjustment methods for aerial surveys of wildlife populations. Biometrics 45:415-425.
Wong, C. (1996). Population size estimation using the modified Horvitz-Thompson estimator with estimated sighting probabilities. Dissertation, Colorado State University, Fort Collins, USA.
See Also
Sightability estimate of ratio with variance components estimator from Wong (1996)
Description
Estimates population ratio, with variance estimated using Wong's (1996) estimator. This function will usually be called by Sight.Est,Ratio() function (but see details).
Usage
Wong.est.Ratio(
numerator,
denominator,
srates,
nh,
Nh,
stratum,
subunit,
covars,
beta,
varbeta,
smat = NULL
)
Arguments
numerator , denominator |
Number of animals in numerator and denominator of each independently sighted group |
srates |
Vector of plot-level sampling probabilities (same dimension as
|
nh |
Number of sample plots in each stratum |
Nh |
Number of population plots in each stratum |
stratum |
Stratum identifiers (associated with the independently observed animal groups) |
subunit |
Plot ID (associated with the independently observed animal groups) |
covars |
Matrix of sightability covariates (associated with the independently observed animal groups) |
beta |
Logistic regression parameter estimates (from fitted sightability model) |
varbeta |
Estimated variance-covariance matrix for the logistic regression parameter estimates (from fitted sightability model) |
smat |
Estimated variance-covariance matrix for the inflation factors (1/probability of detection). This is an n.animal x n.animal matrix, and is usually calculated within the Wong.est function. Non-null values can be passed to the function (e.g., if a bootstrap is used to estimate uncertainty due to the estimated detection parameters). |
Details
This function is called by Sight.Est.Ratio, but may also be called directly by the user (e.g., in cases where the original sightability [test trial] data are not available, but the parameters and var/cov matrix from the logistic regression model is available in the literature).
Value
ratio.hat |
Sightability estimate of ratio, ratio^ |
Vartot |
Estimated variance of ratio^ |
VarSamp , VarSight , VarMod |
Estimated variance component due to sampling, sightability, model are set to NA |
Author(s)
Carl James Schwarz cschwarz.stat.sfu.ca@gmail.com
References
Rice CG, Jenkins KJ, Chang WY (2009). Sightability Model for Mountain Goats." The Journal of Wildlife Management, 73(3), 468- 478.
Steinhorst, R. K., and M.D. Samuel. (1989). Sightability adjustment methods for aerial surveys of wildlife populations. Biometrics 45:415-425.
Wong, C. (1996). Population size estimation using the modified Horvitz-Thompson estimator with estimated sighting probabilities. Dissertation, Colorado State University, Fort Collins, USA.
See Also
Check the sightability model arguments for consistency
Description
Check the sightability model arguments for consistency
Usage
check.sightability.model.args(data, sight.model, sight.beta, sight.beta.cov)
Arguments
data |
Data.frame containing covariates for sightability model |
sight.model |
Formula with sightability model |
sight.beta |
Parameter estimates (from fitted sightability model |
sight.beta.cov |
Estimated variance-covariance matrix for parameter estimates from fitted sightability model. |
Value
Error condition or invisible
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
Examples
sightability.table <- data.frame(VegCoverClass=1:5)
sight.beta <- c(4.2138, -1.5847)
sight.beta.cov <- matrix(c(0.7821634, -0.2820000,-0.2820000, 0.1114892), nrow=2)
check.sightability.model.args( sightability.table,
~VegCoverClass,
sight.beta,
sight.beta.cov)
## Not run:
check.sightability.model.args( sightability.table,
~VegCoverClass2,
sight.beta,
sight.beta.cov)
check.sightability.model.args( sightability.table,
~VegCoverClass,
sight.beta[1],
sight.beta.cov)
## End(Not run)
Compute the sightability correction factor given a sightability and covariates
Description
Compute the sightability correction factor given a sightability and covariates
Usage
compute.SCF(
data,
sight.model,
sight.beta,
sight.beta.cov,
check.args = FALSE,
adjust = TRUE
)
Arguments
data |
Data.frame containing covariates for sightability model |
sight.model |
Formula with sightability model |
sight.beta |
Parameter estimates (from fitted sightability model |
sight.beta.cov |
Estimated variance-covariance matrix for parameter estimates from fitted sightability model. |
check.args |
Should the sightability model arguments be checked for consistency/ |
adjust |
Should the sightability value be adjusted for the sight.beta.cov. |
Value
Vector of sightability factors (SCF)
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
See Also
Examples
sightability.table <- data.frame(VegCoverClass=1:5)
sight.beta <- c(4.2138, -1.5847)
sight.beta.cov <- matrix(c(0.7821634, -0.2820000,-0.2820000, 0.1114892), nrow=2)
sightability.table$detect.prob <- compute.detect.prob( sightability.table,
~VegCoverClass,
sight.beta,
sight.beta.cov)
sightability.table$SCF <- compute.SCF ( sightability.table,
~VegCoverClass,
sight.beta,
sight.beta.cov)
sightability.table
#"Note that the SCF != 1/detect.prob because of correction terms for covariance of beta.terms"
Compute the detection probability given a sightability model
Description
Compute the detection probability given a sightability model
Usage
compute.detect.prob(
data,
sight.model,
sight.beta,
sight.beta.cov,
check.args = FALSE
)
Arguments
data |
Data.frame containing covariates for sightability model |
sight.model |
Formula with sightability model |
sight.beta |
Parameter estimates (from fitted sightability model |
sight.beta.cov |
Estimated variance-covariance matrix for parameter estimates from fitted sightability model. |
check.args |
Should the sightability model arguments be checked for consistency/ |
Value
Vector of detection probabilities
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
See Also
Examples
sightability.table <- data.frame(VegCoverClass=1:5)
sight.beta <- c(4.2138, -1.5847)
sight.beta.cov <- matrix(c(0.7821634, -0.2820000,-0.2820000, 0.1114892), nrow=2)
sightability.table$detect.prob <- compute.detect.prob( sightability.table,
~VegCoverClass,
sight.beta,
sight.beta.cov)
sightability.table$SCF <- compute.SCF ( sightability.table,
~VegCoverClass,
sight.beta,
sight.beta.cov)
sightability.table
#"Note that the SCF != 1/detect.prob because of correction terms for covariance of beta.terms"
Estimates var/cov matrix of inflation factors (1/prob detection) using a non-parametric bootstrap.
Description
Estimates var/cov matrix of inflation factors (1/prob detection) using a non-parametric bootstrap. Called by function Sight.Est if Vm.boot = TRUE.
Usage
covtheta(total, srates, stratum, subunit, covars, betas, varbetas, nboots)
Arguments
total |
Number of animals in each independently sighted group |
srates |
Plot sampling probability (associated with the independently observed animal groups) |
stratum |
Stratum identifiers (associated with the independently observed animal groups) |
subunit |
Plot ID (associated with the independently observed animal groups) |
covars |
Matrix of sightability covariates (associated with the independently observed animal groups) |
betas |
Logistic regression parameter estimates (from fitted sightability model) |
varbetas |
Estimated variance-covariance matrix for the logistic regression parameter estimates (from fitted sightability model) |
nboots |
Number of bootstrap resamples. |
Value
smat |
Estimated variance-covariance matrix for the inflation factors theta = (1/probability of detection). This is an n.animal x n.animal matrix. |
Author(s)
John Fieberg
See Also
Experimental (test trials) data set used to estimate detection probabilities for moose in MN
Description
Experimental (test trials) data set used to estimate detection probabilities for moose in MN
Format
A data frame with 124 observations on the following 4 variables.
- year
year of the experimental survey (test trial)
- observed
Boolean variable (=1 if moose was observed and 0 otherwise)
- voc
measurement of visual obstruction
- grpsize
group size (number of observed moose in each independently sighted group)
References
Giudice, J H. and Fieberg, J. and Lenarz, M. S. 2012. Spending Degrees of Freedom in a Poor Economy: A Case Study of Building a Sightability Model for Moose in Northeastern Minnesota. Journal of Wildlife Management 76(1):75-87.
Examples
data(exp.m)
exp.m[1:5,]
Mountain Goat Sightability Model Information
Description
Model averaged regression parameters and unconditional variance-covariance matrix for mountain goat sightability model (Rice et al. 2009)
Format
The format is: beta.g = list of regression parameters (intercept and parameters associated with GroupSize, Terrain, and X.VegCover) varbeta.g = variance-covariance matrix (associated with beta.g)
References
Rice C.G., Jenkins K.J., Chang W.Y. (2009). A Sightability Model for Mountain Goats. The Journal of Wildlife Management, 73(3), 468-478.
Examples
data(g.fit)
Mountain Goat Survey Data from Olympic National park
Description
Mountain Goat Survey Data from Olympic National park collected in 2004
Format
A data frame with 113 observations on the following 9 variables.
- GroupSize
number of animals observed in each independently sighted group [cluster size]
- Terrain
measure of terrain obstruction
- pct.VegCover
measure of vegetative obstruction
- stratum
stratum identifier
- total
number of animals observed in each independently sighted group [same as GroupSize]
- subunit
a numeric vector, Plot ID
Source
Patti Happe (Patti_Happe@nps.gov)
References
Jenkins, K. J., Happe, P.J., Beirne, K.F, Hoffman, R.A., Griffin, P.C., Baccus, W. T., and J. Fieberg. In press. Recent population trends in mountain goats in the Olympic mountains. Northwest Science.
Examples
data(gdat)
MN moose survey data
Description
Operational survey data for moose in MN (during years 2004-2007). Each record corresponds to an independently sighted group of moose, with variables that capture individual covariates (used in the detection model) as well as plot-level information (stratum identifier, sampling probability, etc).
Format
A data frame with 805 observations on the following 11 variables.
- year
year of survey
- stratum
stratum identifier
- subunit
sample plot ID
- total
number of moose observed
- cows
number of cows observed
- calves
number of calves observed
- bulls
number of bulls observed
- unclass
number of unclassified animals observed (could not identify sex/age class)
- voc
measurement of visual obstruction
- grpsize
group size (cluster size)
References
Giudice, J H. and Fieberg, J. and Lenarz, M. S. 2012. Spending Degrees of Freedom in a Poor Economy: A Case Study of Building a Sightability Model for Moose in Northeastern Minnesota. Journal of Wildlife Management 76(1):75-87.
Examples
data(obs.m)
obs.m[1:5, ]
Print method for sightability estimators
Description
Prints fitted sightability model, sampling information, and sightability estimate (with confidence interval)
Usage
## S3 method for class 'sightest'
print(x, ...)
Arguments
x |
Sightability object, output from call to Sight.Est() or Sight.Est.Ratio() functions. |
... |
arguments to be passed to or from other methods |
Author(s)
John Fieberg and Carl James Schwarz
See Also
Sight.Est
, Sight.Est.Ratio
,
summary.sightest
, summary.sightest_ratio
Data set containing sampling information for observation survey of moose in MN
Description
Data set containing sampling information from a survey of moose in MN (during years 2004-2007)
Format
A data frame with 12 observations on the following 5 variables.
- year
year of survey
- stratum
stratum identifier
- Nh
number of population units in stratum h
- nh
number of sample units in stratum h
References
Giudice, J H. and Fieberg, J. and Lenarz, M. S. 2012. Spending Degrees of Freedom in a Poor Economy: A Case Study of Building a Sightability Model for Moose in Northeastern Minnesota. Journal of Wildlife Management 76(1):75-87.
Examples
data(sampinfo.m)
sampinfo.m
Summarize sightability estimator
Description
Calculates confidence interval (based on asymptotic [normal or log-normal assumption])
Usage
## S3 method for class 'sightest'
summary(object, ...)
Arguments
object |
Sightability object, output from call to Sight.Est function. |
... |
arguments to be passed to or from other methods |
Value
Nhat or Ratiohat |
Sightability population estimate |
lcl |
Lower confidence limit |
ucl |
Upper confidence limit |
Author(s)
John Fieberg and Carl James Schwarz
See Also
Function to estimate the variance of the difference between two population estimates
Description
Function to estimate the variance of the difference between two population estimates formed using the same sightability model (to correct for detection).
Usage
vardiff(sight1, sight2)
Arguments
sight1 |
Sightability model object for the first population estimate (formed by calling Sight.Est function) |
sight2 |
Sightability model object for the second population estimate (formed by calling Sight.Est function) |
Details
Population estimates constructed using the same sightability model will NOT be independent (they will typically exhibit positive covariance). This function estimates the covariance due to using the same sightability model and subtracts it from the summed variance.
Value
vardiff |
numeric = var(tau^[1])+var(tau^[2])-2*cov(tau^[1],tau^[2]) |
Author(s)
John Fieberg
Examples
# Example using moose survey data
data(obs.m) # observational moose survey data
data(exp.m) # experimental moose survey data
data(sampinfo.m) # information on sampling rates
# Estimate population size in 2006 and 2007
sampinfo <- sampinfo.m[sampinfo.m$year == 2007, ]
tau.2007 <- Sight.Est(observed ~ voc, odat = obs.m[obs.m$year == 2007, ],
sdat = exp.m, sampinfo.m[sampinfo.m$year == 2007, ],
method = "Wong", logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
tau.2006 <- Sight.Est(observed ~ voc, odat = obs.m[obs.m$year == 2006, ],
sdat = exp.m, sampinfo.m[sampinfo.m$year == 2006, ],
method = "Wong", logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
# naive variance
tau.2007$est[2]+tau.2006$est[2]
# variance after subtracting positvie covariance
vardiff(tau.2007, tau.2006)
Calculates the variance of the log rate of change between 2 population estimates that rely on the same sightability model.
Description
Calculates the variance of the log rate of change between 2 population estimates that rely on the same sightability model.
Usage
varlog.lam(sight1, sight2)
Arguments
sight1 |
Sightability model object for the first population estimate (formed by calling Sight.Est function) |
sight2 |
Sightability model object for the second population estimate (formed by calling Sight.Est function) |
Details
This function uses the delta method to calculate an approximate variance for the log rate of change, log(tau^[t+1])-log(tau^[t]), while accounting for the positive covariance between the two estimates (as a result of using the same sightability model to correct for detection).
Value
loglambda |
log rate of change = log(tau^[t+1]/tau^[t]) |
varloglamda |
approximate variance of loglambda |
Author(s)
John Fieberg
See Also
Examples
# Example using moose survey data
data(obs.m) # observational moose survey data
data(exp.m) # experimental moose survey data
data(sampinfo.m) # information on sampling rates
# Estimate population size in 2006 and 2007
sampinfo <- sampinfo.m[sampinfo.m$year==2007, ]
tau.2007 <- Sight.Est(observed ~ voc, odat = obs.m[obs.m$year==2007, ],
sdat = exp.m, sampinfo.m[sampinfo.m$year == 2007, ],
method = "Wong", logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
tau.2006 <- Sight.Est(observed ~ voc, odat = obs.m[obs.m$year==2006, ],
sdat = exp.m, sampinfo.m[sampinfo.m$year == 2006, ],
method = "Wong", logCI = TRUE, alpha = 0.05, Vm.boot = FALSE)
# Log rate of change
varlog.lam(tau.2006, tau.2007)