# plot.density.mcmcSTmodel: Plots for an 'density.mcmcSTmodel' object In SpatioTemporal: Spatio-Temporal Model Estimation

## Description

`plot` method for class `density.mcmcSTmodel`. Plots results from `density.mcmcSTmodel`.

## Usage

 ```1 2 3``` ```## S3 method for class 'density.mcmcSTmodel' plot(x, y = 1, add = FALSE, norm.col = 0, main = NULL, ylim = NULL, ...) ```

## Arguments

 `x` `density.mcmcSTmodel` object to plot. `y` Name/index of parameter for which to plot the density. `add` Add to existing plot using `lines`. `norm.col` Add the Gaussian density using a line with colour `norm.col`, if `norm.col=0` do not add the Gaussian. `main` Parameter passed as `main` to `plot.density`, defaults to the parameter-name if not given. `ylim` Additional parameters passed to `plot.density`. `...` Additional parameters passed to `plot.density` or `lines`.

Nothing

## Author(s)

Johan Lindstrom

Other mcmcSTmodel methods: `MCMC.STmodel`, `density.mcmcSTmodel`, `plot.mcmcSTmodel`, `print.mcmcSTmodel`, `print.summary.mcmcSTmodel`, `summary.mcmcSTmodel`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```##load estimation results data(est.mesa.model) ##and MCMC results instead data(MCMC.mesa.model) ##compute density estimates for the results, and use the Gaussian approximation ##based on Fischer information as reference. dens <- density(MCMC.mesa.model, estSTmodel=est.mesa.model) ##all the estimated densities str(dens,1) ##or results for one paramter dens[[1]] ##plot density functions plot(dens) ##for a different paramter, along with Gaussian approx plot(dens, 3, norm.col="red") ##all covariance parameters par(mfrow=c(3,3),mar=c(4,4,2.5,.5)) for(i in 9:17){ plot(dens, i, norm.col="red") } ```

### Example output

```Loading required package: Matrix
List of 19
\$ gamma.lax.conc.1500            :List of 2
\$ alpha.const.(Intercept)        :List of 2
\$ alpha.const.log10.m.to.a1      :List of 2
\$ alpha.const.s2000.pop.div.10000:List of 2
\$ alpha.const.km.to.coast        :List of 2
\$ alpha.V1.(Intercept)           :List of 2
\$ alpha.V1.km.to.coast           :List of 2
\$ alpha.V2.(Intercept)           :List of 2
\$ alpha.V2.km.to.coast           :List of 2
\$ log.range.const.exp            :List of 2
\$ log.sill.const.exp             :List of 2
\$ log.range.V1.exp               :List of 2
\$ log.sill.V1.exp                :List of 2
\$ log.range.V2.exp               :List of 2
\$ log.sill.V2.exp                :List of 2
\$ nu.log.range.exp               :List of 2
\$ nu.log.sill.exp                :List of 2
\$ nu.log.nugget.(Intercept).exp  :List of 2
\$ nu.log.nugget.typeFIXED.exp    :List of 2
- attr(*, "class")= chr "density.mcmcSTmodel"
\$density

Call:
density.default(x = newX[, i])

Data: newX[, i] (2500 obs.);	Bandwidth 'bw' = 0.0004833

x                   y
Min.   :-0.008585   Min.   :  0.00747
1st Qu.:-0.003368   1st Qu.:  6.48915
Median : 0.001849   Median : 24.59657
Mean   : 0.001849   Mean   : 47.87467
3rd Qu.: 0.007066   3rd Qu.: 85.99468
Max.   : 0.012282   Max.   :156.83253

\$approx.gauss
\$approx.gauss\$mean
[1] 0.0008978266

\$approx.gauss\$sd
[1] 0.002694145
```

SpatioTemporal documentation built on May 2, 2019, 8:49 a.m.