dsdive.obs.sample.offsets: Sample t0 and tf offsets from full conditional posteriors

Description Usage Arguments

View source: R/dsdive.obs.sample.offsets.R

Description

Sampler uses a piecewise quadratic polynomial approximation to the log of the full conditional posterior. Note that this sampler will only sample one offset at a time.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
dsdive.obs.sample.offsets(
  dsobs.aligned,
  dsobs.unaligned,
  offset,
  offset.tf,
  t.stages,
  P.raw,
  depth.bins,
  tstep,
  max.width,
  prior.params,
  sample.start,
  debug = FALSE,
  lpapprox = NULL,
  output.lpapprox = FALSE
)

Arguments

dsobs.aligned

dsobs object that has been adjusted to account for the t0 and tf offsets. Note that this should be based on the current value of the offsets, and that this function will update these parameters.

dsobs.unaligned

dsobs object with the raw observations of a dive object

offset

value of current t0 offset

offset.tf

value of current tf offset

t.stages

stage transition times for the dive

P.raw

list of continuous time probability transition matrices, and components.

depth.bins

n x 2 Matrix that defines the depth bins. The first column defines the depth at the center of each depth bin, and the second column defines the half-width of each bin.

tstep

Time between observations in dsobs.unaligned

max.width

The t0 and tf offsets are updated with a piecewise proposal distribution. This parameter controls the maximum width of the intervals for the proposal distribution. This is a tuning parameter that controls the numerical stability of the proposal distribution, which is sampled via inverse CDF techniques.

prior.params

shape1 and shape2 parameters for the scaled and shifted Beta prior distribution for the offset being sampled.

sample.start

TRUE to sample t0 offset; FALSE to sample tf offset.

debug

TRUE to return debugging objects, such as the proposal density and log posterior

lpapprox

(Optional) Object containing the piecewise-quadratic approximation to the log-posterior used to propose model parameters. If NULL, then an approximation will be computed.

output.lpapprox

TRUE to return the approximation used to propose model parameters.

# @example examples/dsdive.obs.sample.offsets.R


jmhewitt/dsdive documentation built on May 29, 2020, 5:18 p.m.