kfsst {kfsst} | R Documentation |
After the track has been read in and the SST-field has been constructed
(see the road.map
function for advice) this function does the
actual optimization of the model and reconstruction of the track.
Basically this function only needs the raw track and the SST file, but it has a lot of options to modify the model, which are presented here. Quite often it is necessary to simplify the model to get a converging fit - especially for short tracks.
kfsst(data, sst.file = "sst.dat", fix.first = TRUE, fix.last = TRUE, theta.active = c(u.active, v.active, D.active, bx.active, by.active, bsst.active, sx.active, sy.active, ssst.active, a0.active, b0.active), theta.init = c(u.init, v.init, D.init, bx.init, by.init, bsst.init, sx.init, sy.init, ssst.init, a0.init, b0.init), u.active = TRUE, v.active = TRUE, D.active = TRUE, bx.active = TRUE, by.active = TRUE, bsst.active = TRUE, sx.active = TRUE, sy.active = TRUE, ssst.active = TRUE, a0.active = TRUE, b0.active = TRUE, u.init = 0, v.init = 0, D.init = 100, bx.init = 0, by.init = 0, bsst.init = 0, sx.init = 0.1, sy.init = 1, ssst.init = 0.1, a0.init = 0.001, b0.init = 0, var.struct = "solstice", dev.pen = 0, save.dir = NULL, admb.string = "")
data |
A data.frame consisting of six columns. The first three columns should contain
day , month and year corresponding to valid dates. The dates
must be sorted in ascending order. Column four and five should contain the
longitude and latitude in degrees. The final column should contain
the SST measurement derived from the tag on the fish. |
sst.file |
A string containing the filename (including path) to a file returned from
the function write.sst.field . |
fix.first |
TRUE (default) if the first position in the data set is the true
release position (known without error), FALSE otherwise.
|
fix.last |
TRUE (default) if the last position in the data set is the true
recapture/popoff position (known without error), FALSE otherwise.
|
theta.active |
A logical vector of eleven elements, each corresponding to a model
parameter. If an element is set to TRUE the value of corresponding
parameter is optimized, otherwise it is kept at its initial value.
The default value is TRUE for all parameters. The values
1/0 can be used instead of TRUE/FALSE . The order of the
elements in this vector is c(u.active, v.active, D.active,
bx.active, by.active, bsst.active, sx.active, sy.active, ssst.active,
a0.active, b0.active) , hence a value of c(0,0,1,1,1,1,1,1,1,1,1)
would result in a model where u and v were fixed at there
initial values.
|
theta.init |
A numeric vector of eleven elements, each corresponding to a model
parameter. The order of the elements in this vector is
c(u.init, v.init, D.init, bx.init, by.init, bsst.init, sx.init,
sy.init, ssst.init, a0.init, b0.init)
and the default value is c(0, 0, 100, 0, 0, 0, 0.1, 1.0, 0.1,
0.001, 0) . It is unwise to initialize elements D.init ,
sx.init , sy.init , and ssst.init below zero,
as they correspond to standard deviations.
|
u.active |
TRUE (default) if u should be optimized, FALSE if
it should be fixed at its initial value. |
v.active |
TRUE (default) if v should be optimized, FALSE if
it should be fixed at its initial value. |
D.active |
TRUE (default) if D should be optimized, FALSE if
it should be fixed at its initial value. |
bx.active |
TRUE (default) if b[x] should be optimized, FALSE
if it should be fixed at its initial value. |
by.active |
TRUE (default) if b[y] should be optimized, FALSE
if it should be fixed at its initial value. |
bsst.active |
TRUE (default) if b[sst] should be optimized,
FALSE if it should be fixed at its initial value. |
sx.active |
TRUE (default) if sigma[x] should be optimized,
FALSE if it should be fixed at its initial value. |
sy.active |
TRUE (default) if sigma[y] should be optimized,
FALSE if it should be fixed at its initial value. |
ssst.active |
TRUE (default) if sigma[sst] should be
optimized, FALSE if it should be fixed at its initial value. |
a0.active |
If the variance structure var.struct="solstice" is chosen this
flag should be set to TRUE (default) if a[0] should be
optimized, FALSE if it should be fixed at its initial value. If a
different variance structure is selected this flag is ignored. |
b0.active |
If the variance structure var.struct="solstice" is chosen this
flag should be set to TRUE (default) if b[0] should be
optimized, FALSE if it should be fixed at its initial value.
If a different variance structure is selected this flag is ignored. |
u.init |
The initial value of u. Default is 0. |
v.init |
The initial value of v. Default is 0. |
D.init |
The initial value of D. Default is 100. |
bx.init |
The initial value of b[x]. Default is 0. |
by.init |
The initial value of b[y]. Default is 0. |
bsst.init |
The initial value of b[sst]. Default is 0. |
sx.init |
The initial value of sigma[x]. Default is 0.1. |
sy.init |
The initial value of sigma[y]. Default is 1.0. |
ssst.init |
The initial value of sigma[sst]. Default is 0.1. |
a0.init |
If the variance structure var.struct="solstice" is chosen this sets
the initial value of a[0]. Default is 0.001. If a different
variance structure is selected this is ignored. |
b0.init |
If the variance structure var.struct="solstice" is chosen this sets
the initial value of b[0]. Default is 0. If a different variance
structure is selected this is ignored.
|
var.struct |
Three options are available: "uniform" , "solstice" (default),
and "daily" . |
dev.pen |
If var.struct="daily" is set, this parameter sets the derivative
penalty. |
save.dir |
NULL (default) if the estimation should be done in a temporary
directory, otherwise the quoted name of the directory where the estimation
should be saved. |
admb.string |
Additional command line arguments to the underlying AD Model Builder program can be passed as a string. For instance "-est". The available command line arguments can be found in the AD Model Builder documentation (see http://otter-rsch.com) |
Here should the model briefly be described, but for now read all about it in the reference given below.
An object of class kftrack
is returned. This object contains
information about the fit and estimated tracks.
Anders Nielsen anielsen@dina.kvl.dk, John Sibert sibert@hawaii.edu
http://www.tracking.nielsensweb.org
road.map
, link{blue.shark}
# No example supplied here, but check out the example # in the blue.shark dataset documentation