Learn R Programming

SpatioTemporal (version 1.1.7)

plot.density.mcmcSTmodel: Plots for an density.mcmcSTmodel object

Description

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

Usage

# S3 method for 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.

Value

Nothing

See Also

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

Examples

Run this code
# NOT RUN {
##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")
}
# }

Run the code above in your browser using DataLab