Description Usage Arguments Details Value Author References Examples
This function fits the distance sampling model provided by the Distance program using its MCDS engine.
1 2 3 4 5 6 7 | strip.wrap(dataset, path, pathMCDS, SMP_LABEL = "SMP_LABEL",
SMP_EFFORT = "SMP_EFFORT", SIZE = "SIZE", STR_LABEL = "STR_LABEL",
STR_AREA = "STR_AREA", Type = NULL, units = list(Distance = "Perp",
Length_units = "Kilometer", Distance_units = "Meter", Area_units =
"Square kilometer"), breaks = c(0, 300), lsub = NULL,
stratum = NULL, split = TRUE, period = NULL, detection = "All",
multiplier = 2, empty = NULL, verbose = FALSE)
|
dataset |
A |
path |
The path where to store the input and output files of the MCDS engine. |
pathMCDS |
The path where the MCDS engine is located. |
SMP_LABEL |
Name of the column to use for the transect/watch label. |
SMP_EFFORT |
Length in km of the transect or the transect/watch unit. |
SIZE |
Number of individuals in the observation. |
STR_LABEL |
Name of the column to use as a stratum label. |
STR_AREA |
Name of the column to use for the stratum area. |
Type |
Name of the type of transects (Line, Point, or Cue) |
units |
list of th units used for the analysis. Contains the Distance engine to use (Perp or Radial), the Length units, the Distance units, and the Area_units.For the possible units of distance and area see Distance 6.2 documentation. |
breaks |
Interval in meters to be used in the analysis. |
lsub |
A named list giving the subsets to be used in the analysis. The names of the list are the names of columns used to subset the dataset.
Each element of the list is a vector giving the values to keep in the analysis for a given column. When a vector is |
stratum |
When |
split |
When |
period |
A vector of characters of length 2 containing the extreme dates for which the analysis should be restricted. Dates have to be in the "yyyy-mm-dd" format. |
detection |
Currently, set to |
multiplier |
Value by which the estimates of density or abundance are multiplied. Default value |
empty |
Determine how empty transects are to be selected in the analysis. When |
verbose |
When set to |
Uses the MCDS engine from program Distance. The function produces an input file and submits it to the MCDS engine
through the system
function. The results are then extracted from the output files and returned as a
list object.
An object of class "distanceFit"
, when split = FALSE
. When split = TRUE
and lsub != NULL
,
a named list with the different models of class "distanceFit"
.
Each object of class "distanceFit"
is a named list with components model_fitting
, parameter_estimates
,
chi_square_test
, density_estimate
, detection
and path
. Elements
of the list are accessible through the $
operator. For each component
except detection
and path
, a list
of length 2 is given with
component "Global
" and "Stratum
". Depending on the analysis chosen,
one of these component will be empty (NULL
).
Francois Rousseu, Christian Roy, Francois Bolduc
Thomas, L., S.T. Buckland, E.A. Rexstad, J. L. Laake, S. Strindberg, S. L. Hedley, J. R.B. Bishop, T. A. Marques, and K. P. Burnham. 2010. Distance software: design and analysis of distance sampling surveys for estimating population size. Journal of Applied Ecology 47: 5-14. DOI: 10.1111/j.1365-2664.2009.01737.x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ########################################
### Simple models without stratification
### Import and filter data
data(alcidae)
alcids <- distance.filter(alcidae, transect.id = "WatchID", distance.field = "Distance", distance.labels = c("A", "B", "C", "D"),
distance.midpoints = c(25, 75, 150, 250), effort.field = "WatchLenKm", lat.field = "LatStart",
long.field = "LongStart", sp.field = "Alpha", date.field = "Date")
### Run analysis with the MCDS engine. Here, the WatchID is used as the sample.
strip.out1 <-distance.wrap(alcids, SMP_EFFORT="WatchLenKm",SIZE="Count", breaks=c(0,300),Type="Line",
units=list(Distance="Perp",Length_units="Kilometers",
Distance_units="Meters",Area_units="Square kilometers"),
STR_LABEL="STR_LABEL", STR_AREA="STR_AREA",SMP_LABEL="WatchID",
path="c:/temp/distance",
pathMCDS="C:/Program Files (x86)/Distance 6")
summary(strip.out1)
#END
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.