Description Usage Arguments Value Examples
View source: R/runFieldModel.R
Run a model and estimate underlying latent and probability field from point and polygon data using TMB.
1 2 3 4 |
field |
field object which simulated underlying data |
pointDF |
data simulated from samplePoints |
polyDF |
data simulated from samplePolygns |
moption |
int, intger indicating how polygon data should be estimated 0 is by mixed model approximation, 1 is by redistribution, 2 is by Utazi approach, 3 is by riemman approximation, 4 is ignoring polygon data, 5 is if all data was known. |
verbose |
logical, print model fitting information |
symbolic |
logical, use metas reordering in model fitting |
control |
list, control list passed to nlminb |
rWidth |
int, only used in moption 2 to build besag prior |
priors |
logical, default FALSE Should priors be evaluated for top level parameters. |
mcmc |
logical, default FALSE Should model be fit with MCMC. Not compatible with moption 2. |
AprojPoly |
sparseMatrix, sparse matrix with population weight information for polygons. |
shape3 |
shape to build the adjaceny matrix for when moption == 2 |
start |
starting points of parameters. |
... |
Further arguments to pass to tmbstan |
List of fitted model objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
unitSim <- simField(
N = 500, rangeE = .7,
offset = c(0.1, 0.2),
max.edge = c(0.1,0.2),
beta0 = -2,
betaList = list(
list(type="random", value=2),
list(type="spatial", value=-.5),
list(type="cluster", value=-2)
))
pointDF <- samplePoints(unitSim, 500, 100)
runFieldModel(unitSim, pointDF)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.