sample.lt.to.ddf: Conversion of line transect samples for analysis by MRDS

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Convert a Wisp object of type 'sample.lt' into format acceptable to ddf

Usage

1
sample.lt.to.ddf(the.sample)

Arguments

the.sample

Object of class 'sample.lt' to be converted for analysis by ddf

Details

More sophisticated models for line transect data can be constructed using algorithms available in the MRDS library, written by Jeff Laake. In particular, models incorporating multiple covariates can be analyzed. This routine transforms line transect samples generated by Wisp into a format compatible with MRDS, more specifically the model-fitting component of MRDS, namely ddf.

The external function ddf can handle data from double platform designs, but not point transect surveys. sample.lt.to.ddf will reject any samples from point transect data, because these data cannot be analyzed by ddf. ddf is also presently limited in its ability to cope with adjustment terms.

Value

A data frame consisting of:

object

Sequential number of objects detected during the survey

observer

Observer who made the detection (presently always 1)

detected

Whether the object was detected by the specified observer, presently always 1

distance

Distance of object from transect line

size

Group size of the detected cluster

sex

Gender of detected cluster (species exhibits sexual segregation, hence travel in single-sex groups)

exposure

Detectability factor of the detected group

Author(s)

Eric Rexstad, RUWPA ericr@mcs.st-and.ac.uk

References

Laake, J.L. and D.L. Borchers. 2004. Methods for incomplete detection at distance zero. In: Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. Oxford University Press.

Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection function. In: Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. Oxford University Press.

See Also

generate.population, generate.sample.lt, also consult documentation for the MRDS library, specifically ddf, plot.ddf, and ddf.gof

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#		Generate population
lt.reg <- generate.region(x.length = 100, y.width = 50)
lt.dens <- generate.density(lt.reg)
#heterogeneous population
lt.poppars<-setpars.population(density.pop = lt.dens, number.groups = 1000,
                              size.method = "poisson", size.min = 1, size.max = 30,
                              size.mean = 10, exposure.method = "beta", exposure.min = 0,
                              exposure.max = 1, exposure.mean = 0.4, exposure.shape = 0.5,
                              type.values=c("Male","Female"), type.prob=c(0.48,0.52))
lt.pop<-generate.population(lt.poppars)
#   10 transects, with visual range of 4 units on each side will cover 80 of available
#           100 units of width of the study area
lt.despars<-setpars.design.lt(lt.reg, n.transects=10, n.units=10, 
                              visual.range=4, percent.on.effort=1)
lt.des<-generate.design.lt(lt.despars, seed=3)
lt.survpars<-setpars.survey.lt(lt.pop, lt.des, disthalf.min=2, disthalf.max=4)
#   Produce line transect sample of this population
lt.samp<-generate.sample.lt(lt.survpars)
#   Use this function to convert Wisp object to something usable by ddf
transect.for.ddf <- sample.lt.to.ddf(lt.samp)
library(mrds)
#   Fit distance-only model using ddf
dist.only <- ddf(dsmodel=~mcds(key="hn",formula=~1), 
                  data=transect.for.ddf, method="ds", meta.data=list(width=4))
#  Exposure as covariate
dist.exposure <- ddf(dsmodel=~mcds(key="hn",formula=~exposure), data=transect.for.ddf, 
                      method="ds", meta.data=list(width=4))
#		Exposure and sex as covariates (note, sex is not influential in detectability)
dist.exposure.sex <- ddf(dsmodel=~mcds(key="hn",formula=~exposure+as.factor(sex)), 
                          data=transect.for.ddf, method="ds", meta.data=list(width=4))
summary(dist.only, se=FALSE, N=FALSE)
summary(dist.exposure, se=FALSE, N=FALSE)
summary(dist.exposure.sex, se=FALSE, N=FALSE)
ddf.gof(dist.exposure.sex, main="QQ GOF plot \nfor model dist.exposure.sex")
plot(dist.exposure.sex, main="dist.exposure.sex model \n (showing effect of exposure covariate)",
      showpoints=FALSE)
plot(dist.exposure.sex, newplot=FALSE, 
      subset=dist.exposure.sex$data$exposure<0.33, pch=15, lwd=2, col='red')
plot(dist.exposure.sex, newplot=FALSE, 
      subset=dist.exposure.sex$data$exposure>0.66, pch=17, lwd=2, col='green')
plot(dist.exposure.sex, newplot=FALSE, 
      subset=dist.exposure.sex$data$exposure<0.66 & dist.exposure.sex$data$exposure>0.33, 
      pch=19, lwd=2, col='blue')
legend(2.8,1,legend=c("exp<0.33","exp>0.66","0.33<exp<0.66"), col=c("red","green","blue"), lwd=2)
#   AIC opts for most complex model, but only barely
summary(dist.exposure.sex)
#   This survey covered 80% of study area, so abundance estimate for region is N_c / 0.8
#     Note true number of groups in simulated population is 1000
dist.exposure.sex$Nhat / 0.8

dill/wisp documentation built on May 15, 2019, 8:31 a.m.