Description Usage Arguments Value Examples
Crate Shape object for a parameter estimated in a LopodModel
1 | lopodShape(LopodModel, param, extrapolate = T, metric = NULL, quant = 0.5)
|
LopodModel |
A LopodModel object |
param |
Unit-level model parameter to be mapped. Values "psi_Sampled" can be mapped for models without CAR analyses, "psi_i" for LopodModels with CAR analysis and "pp","cellpres_i", "pCorr","sim_y","sim_true_y","sim_false_y" for both. |
extrapolate |
Boolean. If True, parameters are mapped for cells that have not been sampled, this can only be done in LopodModels with CAR analysis. Only plotted for "psi_i", "pp" and, "cellpres_i". |
metric |
"mean" or "sd". Plots the mean or standard deviation of the posterior distribution. If NULL, the value in quant is used. |
quant |
Returns the raster for a given quantile of the Posterior Distribution. Default is 0.5 (the median of the posterior distribution). Not used if metric is other than NULL |
A Raster object.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
data("Andropogon_shape", package = "bayesLopod")
ld_Shape = shapeLopodData(Shapefile = Andropogon_shape, fieldN = "sampEffort",
fieldY = "detections", Adjacency = TRUE, keepFields = FALSE)
mLopodShape = modelLopod(LopodData = ld_Shape, varP = TRUE, q = NULL,
pmin = 0, CAR = TRUE, nChains = 4,warmup = 500,sampling = 100,nCores =4)
psiShape_95 = lopodShape(mLopodShape, "psi_i", extrapolate = FALSE, quant = 0.95)
psiShape_05 = lopodShape(mLopodShape, "psi_i", extrapolate = TRUE, quant = 0.05)
#Visualize results
sp::spplot(psiShape_05, zcol = "psi_i")
sp::spplot(psiShape_95, zcol = "psi_i")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.