Learn R Programming

DSsim (version 1.1.4)

make.ddf.analysis.list: Creates a list of DDF.Analysis objects

Description

This method creates a list of DDF.Analysis objects each of which describes a model to fit to the distance data. The simulation will fit each of these models to the data generated in the simulation and select the model with the minimum criteria value.

Usage

make.ddf.analysis.list(dsmodel = list(~cds(key = "hn", formula = ~1)),
  mrmodel = NULL, method = "ds", criteria = "AIC",
  analysis.strata = data.frame(), truncation = 50,
  binned.data = FALSE, cutpoints = numeric(0))

Arguments

dsmodel

list of distance sampling model formula specifying the detection function (see ?ddf for further details)

mrmodel

not yet implemented

method

character only "ds" normal distance sampling currently implemented

criteria

character model selection criteria (AIC, AICc, BIC) - only AIC implemented at present.

analysis.strata

Dataframe with two columns ("design.id" and "analysis.id"). The former gives the strata names as defined in the design (i.e. the region object) the second specifies how they should be grouped (into less strata) for the analyses

truncation

numeric truncation distance for analyses

binned.data

logical whether the data should be analsed in bins

cutpoints

gives the cutpoints of the binned data

Value

list of objects of class DDF.Analysis

Details

By default this function creates a half-normal detection function model dsmodel = list(~cds(key = "hn", formula = ~1)) with a truncation distance of 75.

See Also

ddf in library(mrds)

Examples

Run this code
# NOT RUN {
# A simple half-normal "ds" model can be created using the default values
ddf.analyses <- make.ddf.analysis.list()

# To incorporate model selection between a 'hn' and 'hr' model:
ddf.analyses <- make.ddf.analysis.list(dsmodel = list(~cds(key = "hn",
 formula = ~1),~cds(key = "hr", formula = ~1)), method = "ds", 
 criteria = "AIC")

# }

Run the code above in your browser using DataLab