evmSim: MCMC simulation around an evmOpt fit

View source: R/evmSim.R

evmSimR Documentation

MCMC simulation around an evmOpt fit

Description

MCMC simulation around an evmOpt fit

Usage

evmSim(
  o,
  priorParameters,
  prop.dist,
  jump.const,
  jump.cov,
  iter,
  start,
  thin,
  burn,
  chains,
  export = NULL,
  verbose,
  trace,
  theCall,
  ...
)

Arguments

o

a fit evmOpt object

priorParameters

A list with two components. The first should be a vector of means, the second should be a covariance matrix if the penalty/prior is "gaussian" or "quadratic" and a diagonal precision matrix if the penalty/prior is "lasso", "L1" or "Laplace". If method = "simulate" then these represent the parameters in the Gaussian prior distribution. If method = 'optimize' then these represent the parameters in the penalty function. If not supplied: all default prior means are zero; all default prior variances are 10^4; all covariances are zero.

prop.dist

The proposal distribution to use, either multivariate gaussian or a multivariate Cauchy.

jump.const

Control parameter for the Metropolis algorithm.

jump.cov

Covariance matrix for proposal distribution of Metropolis algorithm. This is scaled by jump.const.

iter

Number of simulations to generate

start

Starting values for the chain; if missing, defaults to the MAP/ML estimates in o.

thin

The degree of thinning of the resulting Markov chains.

burn

The number of initial steps to be discarded.

chains

The number of Markov chains to run. Defaults to 1. If you run more, the function will try to figure out how to do it in parallel using the same number of cores as chains.

export

Character vector of names of variables to export. See the help file for parallel::export. Defaults to export = NULL and most users will never need to use it. Only matters on Windows.

verbose

Whether or not to print progress to screen. Defaults to verbose=TRUE.

trace

How frequently to talk to the user

theCall

(internal use only)

...

ignored

Value

an object of class evmSim:

call

The call to evmSim that produced the object.

threshold

The threshold above which the model was fit.

map

The point estimates found by maximum penalized likelihood and which were used as the starting point for the Markov chain. This is of class evmOpt and methods for this class (such as resid and plot) may be useful.

burn

The number of steps of the Markov chain that are to be treated as the burn-in and not used in inferences.

thin

The degree of thinning used.

chains

The entire Markov chain generated by the Metropolis algorithm.

y

The response data above the threshold for fitting.

seed

The seed used by the random number generator.

param

The remainder of the chain after deleting the burn-in and applying any thinning.

Note

it is not expected that the user should call this directly


texmex documentation built on June 22, 2024, 12:26 p.m.