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.
- Alphabetic
- By Inheritance
- Mcmc
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mhStream[P](init: P, logLik: (P) ⇒ LogLik, rprop: (P) ⇒ P, dprop: (P, P) ⇒ LogLik, dprior: (P) ⇒ LogLik, verb: Boolean = false): Stream[P]
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
Streamcorresponding to the MCMC chain. Note that this can be processed with typical Scala combinators such asdrop(for burn-in) andtake(for run-length). IfTypesare imported, there is also athinmethod (which can be used for thinning the chain).
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nextValue[P](logLik: (P) ⇒ LogLik, rprop: (P) ⇒ P, dprop: (P, P) ⇒ LogLik, dprior: (P) ⇒ LogLik, verb: Boolean = false)(current: (P, LogLik)): (P, LogLik)
Function for executing one step of a MH algorithm.
Function for executing one step of a MH algorithm. Called by
mhStream. -
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
summary[P](s: Stream[P], plot: Boolean)(implicit arg0: CsvRow[P]): Unit
Wrapper around the other
summaryfunction which takes aStreamWrapper around the other
summaryfunction which takes aStream- s
A *finite* stream of MCMC iterations.
- plot
Generate plots?
-
def
summary(m: DenseMatrix[Double], plt: Boolean = true): Unit
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
toDMDcontaining MCMC output- plt
Generate plots?
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toDMD[P](s: Stream[P])(implicit arg0: CsvRow[P]): DenseMatrix[Double]
Utility function to convert a *finite*
Streamto a BreezeDenseMatrix[Double].Utility function to convert a *finite*
Streamto a BreezeDenseMatrix[Double].- s
Input stream, which must be *finite*.
- returns
A matrix with rows corresponding to iterations and columns corresponding to variables.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )