Description Usage Arguments Value Author(s) References See Also Examples
View source: R/datagrid2jags.R
datagrid2jags
prepares the grid cell search dataset for model fit
and fitModelGrid
fits the model.
1 2 3 4 5 6 7 | datagrid2jags(searchData, experiment)
## S3 method for class 'caperpyGridData'
print(x, ...)
fitModelGrid(dataList, registeredModel = c("modelULPresence"),
parameters, inits, n.chains = 4, n.iter = 5e+05, thin = 500)
|
searchData |
A data.frame containing the results of grid cell
searches carried out between 2010 and 2019, with the same format as
the dataset |
experiment |
A data.frame containing the results of the
experiment carried out to assess the probability of detection of an
unknown lek in a grid cell with the search protocol, with the same
format as the dataset |
dataList |
object of class |
registeredModel |
character string containing the name of a registered count model
(today, "modelULPresence" is the only available model, see
|
parameters |
vector of character string containing name of parameters to monitor during MCMC iterations. Can be left unspecified. |
inits |
The starting values for the MCMC. Can be left unspecified. |
n.chains |
The number of MCMC chain to perform. |
n.iter |
The number of MCMC iterations to monitor. |
thin |
thinning intervals for monitors. |
x |
an object of class |
... |
additional arguments to be passed from and to other functions. |
datagrid2jags
returns an object of class "caperpyGridData"
fitModelGrid
returns an object of class "mcmc.list"
,
returned by rjags
.
Clement Calenge clement.calenge@ofb.gouv.fr
Calenge C., Menoni E., Milhau B., Foulche K, Chiffard J., Marchandeau S. (in prep.). The participatory monitoring of the capercaillie in the French Pyrenees.
modelULPresence
for a description of the registered models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## We work on the gridSearch dataset...
head(gridSearch)
## ...and on the experiment dataset:
head(DetectionExpe)
## We prepare the dataset to fit the model with JAGS
dataListQ <- datagrid2jags(gridSearch, DetectionExpe)
## We then fit the model. WARNING!!! THIS COMMAND IS VERY SLOW AND
## CAN TAKE SEVERAL HOURS
## Not run:
coefModelULPresence <- fitModelGrid(dataListQ, "modelULPresence")
## End(Not run)
## To save time for the user, we have stored the result of this
## command in the dataset coefModelULPresence.
str(coefModelULPresence)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.