Skip to content

Commit

Permalink
use t-distribution as proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
scheidan committed Jan 5, 2018
1 parent 586a683 commit 7c27788
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion adaptMCMC/NAMESPACE
Expand Up @@ -3,5 +3,5 @@ import(Matrix)
import(parallel)
import(coda)

importFrom("stats", "rnorm", "runif")
importFrom("stats", "rnorm", "runif", "rt")
importFrom("utils", "setTxtProgressBar", "txtProgressBar")
2 changes: 1 addition & 1 deletion adaptMCMC/R/Adaptive_MCMC.R
Expand Up @@ -88,7 +88,7 @@ MCMC <- function(p, n, init, scale=rep(1, length(init)),
}

## proposal value
U <- rnorm(d)
U <- rt(d, df=d)
X.prop <- c( X[i-1,] + S %*% U )
names(X.prop) <- names(init)

Expand Down
4 changes: 2 additions & 2 deletions adaptMCMC/man/MCMC.Rd
Expand Up @@ -98,14 +98,14 @@ Statistics and Computing, 22(5), 997-1008. doi:10.1007/s11222-011-9269-5.
\author{Andreas Scheidegger, \email{andreas.scheidegger@eawag.ch} or
\email{scheidegger.a@gmail.com}.

Thanks to David Pleydell and Venelin for spotting errors and providing
Thanks to David Pleydell, Venelin, and Umberto Picchini for spotting errors and providing
improvements.
}

\note{Due to numerical errors it may happen that the computed
covariance matrix is not positive definite. In such a case the nearest positive
definite matrix is calculated with \code{nearPD()}
of the package \pkg{Matrix}.
from the package \pkg{Matrix}.
}

\seealso{
Expand Down

0 comments on commit 7c27788

Please sign in to comment.