Description Usage Arguments Details Value Note Author(s)
This function constructs a ‘contact’ object, encoding a partially-observed process model together with a spatio-temporal date. As such, it is central to all the package's functionality. One implements the contact type model by specifying some or all of its basic components. These comprise:
which indicate the kenel to sample from;
the simulator of the unobserved Markov state process;
the evaluator of the probability density function for transitions of the unobserved Markov state process;
the simulator of the observed process, conditional on the unobserved state;
the evaluator of the measurement model probability density function;
which samples from a prior probability distribution on the parameters;
which evaluates the prior probability density function;
which performs parameter transformations.
1 2 3 4 | contact(data, rast, initializer, times, t0, ..., grid.lines, pop.grid,
params, grid.size, age.level, nkernls, age.dist, t.max, t.intervention,
kernelmodel, obsnames, statenames, paramnames, covarnames, zeronames,
rmodel, r.model, PACKAGE, d.model)
|
data |
either a data frame holding the time series data, or an object of class ‘contact’, i.e., the output of another contact calculation. |
rast |
an object of class rasterlayer containing the landscape informationn. |
initializer |
the initial state contaning
|
times |
the times at which observations are made.
|
t0 |
The zero-time, i.e., the time of the initial state.
This must be no later than the time of the first observation, i.e., |
... |
additional arguments supply new or modify existing model characteristics or components.
See When named arguments not recognized by |
grid.lines |
A 6 columns data frame with columns names as coor_x_1, coor_y_1, coor_x_2, coor_y_2, orient_line.
|
pop.grid |
Population density of the grid a case resides. This is filled from bottom to top, then left to right. |
params |
optional; named numeric vector of parameters.
This will be coerced internally to storage mode |
age.level, age.dist |
Vectors of age level and the propportion of each age group respectively. See details. |
obsnames |
optional character vector;
names of the observables.
It is not usually necessary to specify |
statenames |
optional character vector;
names of the latent state variables.
It is typically only necessary to supply |
paramnames |
optional character vector;
names of model parameters.
It is typically only necessary to supply |
covarnames |
optional character vector;
names of the covariates.
It is not usually necessary to specify |
t_intervention |
Start of the intervention if any. |
EI_model |
Take integer values to specify the type of model used for the latent period. See |
kern. |
model Take integer values to specify the type of dispersal kernel used. See |
r.process |
simulator of the latent state process.
Setting |
d.process |
optional;
specification of the probability density evaluation function of the unobserved state process.
Setting |
r.measure |
simulator of the measurement model, specified either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library.
Setting |
d.measure |
evaluator of the measurement model density, specified either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library.
Setting |
r.prior |
optional; prior distribution sampler, specified either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library.
Setting |
d.prior |
optional; prior distribution density evaluator, specified either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library.
Setting |
partrans |
optional parameter transformations, constructed using. If a covariate table is supplied, then the value of each of the covariates is interpolated as needed.
The resulting interpolated values are made available to the appropriate basic components.
See the documentation for |
verbose |
logical; if |
Each basic component is supplied via an argument of the same name.
These can be given in the call to contact
, or to many of the package's other functions.
In any case, the effect is the same: to add, remove, or modify the basic component.
Each basic component can be furnished using C snippets, R functions, or pre-compiled native routine available in user-provided dynamically loaded libraries.
The contact
constructor function returns an object, call it C
, of class ‘contact’.
C
contains, in addition to the data, any elements of the model that have been specified as arguments to the contact
constructor function.
One can add or modify elements of C
by means of further calls to contact
, using C
as the first argument in such calls.
One can pass C
to most of the contact package methods via their data
argument.
It is not typically necessary (or indeed often feasible) to define all of the basic components for any given purpose. Each contact algorithm makes use of only a subset of these components. Any algorithm requiring a component that is not present will generate an error letting you know that you have not provided a needed component. FIXME
Hola K. Adrakey
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.