AdaptiveMultiMRW.Rd 3.4 KB
Newer Older
1
2
3
4
5
6
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcmc.R
\docType{class}
\name{AdaptiveMultiMRW}
\alias{AdaptiveMultiMRW}
\title{AdaptiveMultiMRW}
7
8
\format{
Object of \code{\link{R6Class}} with methods for updating a \link{Node} instance.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
}
\value{
Object of \code{\link{AdaptiveMultiMRW}}
}
\description{
This class implements an Adaptive Multi-site Metropolis random walk
algorithm.
}
\details{
A multivariate Gaussian proposal is used, for which the proposal variance
is a scaled version of the evolving empirical posterior covariance matrix.
See Roberts and Rosenthal (2012) Examples of Adaptive MCMC. \emph{Journal of Computational
and Graphical Statistics}. \bold{18}:349--367.

Please note that no checks are performed as to the suitability of this
algorithm for a particular \link{StochasticNode}.  It is up to the user
to use the correct update algorithm for the appropriate nodes.
}
27
\section{Methods}{
28

29
30
31
32
33
34
35
36
37
38
39
40
41
\describe{
  \item{\code{new(node, tune = rep(0.1, length(node$getData())), burning = 100)}}{constructor takes an instance of a \link{StochasticNode}
  node, initial tuning vector (diagonal of adaptive tuning matrix), and number of burnin calls.}
  \item{\code{update()}}{when called, updates \code{node}}
  \item{\code{acceptance()}}{return the acceptance rate}
}
}

\keyword{DAG}
\keyword{MCMC}
\keyword{node}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
42
43
44
45
46
47
48
49
50
51
52
53
\describe{
\item{\code{cov}}{the current covariance}

\item{\code{burnin}}{the number of updates to burn in}

\item{\code{tune}}{the current tuning matrix}

\item{\code{naccept}}{the number of accepted proposals}

\item{\code{ncalls}}{the number of times \code{update} has been called}

\item{\code{node}}{the node to which the updater is attached}
54
55
56
}
\if{html}{\out{</div>}}
}
57
\section{Methods}{
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{AdaptiveMultiMRW$new()}}
\item \href{#method-update}{\code{AdaptiveMultiMRW$update()}}
\item \href{#method-acceptance}{\code{AdaptiveMultiMRW$acceptance()}}
\item \href{#method-clone}{\code{AdaptiveMultiMRW$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\subsection{Method \code{new()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{AdaptiveMultiMRW$new(
  node,
  tune = rep(0.1, length(node$getData())),
  burnin = 100
)}\if{html}{\out{</div>}}
}
77
78

}
79
80
81
82
83
84
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-update"></a>}}
\if{latex}{\out{\hypertarget{method-update}{}}}
\subsection{Method \code{update()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{AdaptiveMultiMRW$update()}\if{html}{\out{</div>}}
85
}
86

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-acceptance"></a>}}
\if{latex}{\out{\hypertarget{method-acceptance}{}}}
\subsection{Method \code{acceptance()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{AdaptiveMultiMRW$acceptance()}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{AdaptiveMultiMRW$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}