Object

smfsb

Mcmc

Related Doc: package smfsb

Permalink

object Mcmc

Functions for constucting generic Metropolis-Hastings MCMC algorithms, and associated utilities. Can be used in conjunction with an unbiased estimate of marginal model likelihood for constructing pseudo-marginal MCMC algorithms, such as PMMH pMCMC.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Mcmc
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def mhStream[P](init: P, logLik: (P) ⇒ LogLik, rprop: (P) ⇒ P, dprop: (P, P) ⇒ LogLik, dprior: (P) ⇒ LogLik, verb: Boolean = false): Stream[P]

    Permalink

    Function to construct a generic Metropolis-Hastings MCMC algorithm for Bayesian inference.

    Function to construct a generic Metropolis-Hastings MCMC algorithm for Bayesian inference. Note that this algorithm avoids re-computation of the log-likelihood associated with the current state, and is therefore suitable for use with the log of an unbiased estimate of likelihood for the constuction of pseudo-marginal "exact approximate" MCMC algorithms.

    init

    The initial state of the MCMC algorithm

    logLik

    The log-likelihood of the model

    rprop

    A function to sample from a proposal distribution

    dprop

    A function to evaluate the log-likelihood of the proposal transition kernel

    dprior

    A function to evaluate the log of the prior density

    verb

    Should the function print diagnostic information to the console at each iteration?

    returns

    An infinite Stream corresponding to the MCMC chain. Note that this can be processed with typical Scala combinators such as drop (for burn-in) and take (for run-length). If Types are imported, there is also a thin method (which can be used for thinning the chain).

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def nextValue[P](logLik: (P) ⇒ LogLik, rprop: (P) ⇒ P, dprop: (P, P) ⇒ LogLik, dprior: (P) ⇒ LogLik, verb: Boolean = false)(current: (P, LogLik)): (P, LogLik)

    Permalink

    Function for executing one step of a MH algorithm.

    Function for executing one step of a MH algorithm. Called by mhStream.

  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. def summary[P](s: Stream[P], plot: Boolean)(implicit arg0: CsvRow[P]): Unit

    Permalink

    Wrapper around the other summary function which takes a Stream

    Wrapper around the other summary function which takes a Stream

    s

    A *finite* stream of MCMC iterations.

    plot

    Generate plots?

  18. def summary(m: DenseMatrix[Double], plt: Boolean = true): Unit

    Permalink

    Generate some basic diagnostics associated with an MCMC run.

    Generate some basic diagnostics associated with an MCMC run. Called purely for the side-effect of generating output on the console.

    m

    A matrix, such as generated by toDMD containing MCMC output

    plt

    Generate plots?

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toDMD[P](s: GenSeq[P])(implicit arg0: CsvRow[P]): DenseMatrix[Double]

    Permalink

    Utility function to convert a *finite* Stream (or other collection) to a Breeze DenseMatrix[Double].

    Utility function to convert a *finite* Stream (or other collection) to a Breeze DenseMatrix[Double].

    s

    Input stream/collection, which must be *finite*.

    returns

    A matrix with rows corresponding to iterations and columns corresponding to variables.

  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped