View source: R/create.bootcount.data.R
create.bootcount.data | R Documentation |
This function creates a new data set where dis.data
is aggregated
for each visit to a segment. For bootstrapped data, the column with the ids
for visits to a segment is segment.id2
which is created
by create.bootstrap.data
using the default for argument rename
.
The sum of the estimated number of individuals for each segment from
dis.data$NHAT
is given in the column NHAT
in the new data.
All other columns from the observation layer should be discarded. This is achieved
by specifying the columns that should be retained using the argument column.numbers
.
Generally, all columns from the segment and higher levels should be kept.
If the default is used, column.numbers=NULL
, the columns distance
, object
,
size
, distbegin
and distend
from the observation level are automatically
discarded. Note that for those columns from the observation layer that are kept, only the
first recorded value will be transferred.
create.bootcount.data(dis.data, column.numbers = NULL)
dis.data |
Data frame containing distance data (one row for each detection). Expects a column |
column.numbers |
Optional argument: vector of integers indicating which columns other than |
This function returns bootstrapped count data that is suited for second stage count modelling of distance sampling
data. The data includes the columns NHAT
and area
which are the response and
the offset required by functions concerned with second stage modelling from this package.
data(dis.data.re)
# bootstrap data without stratification
dis.data.re$survey.id<-paste(dis.data.re$season,dis.data.re$impact,sep="")
result<-ddf(dsmodel=~mcds(key="hn", formula=~1), data=dis.data.re, method="ds",
meta.data=list(width=250))
dis.data.re<-create.NHAT(dis.data.re,result)
bootstrap.data<-create.bootstrap.data(dis.data.re)
bootcount.data<-create.bootcount.data(bootstrap.data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.