Skip to content

Commit

Permalink
version 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Zens authored and cran-robot committed Jul 2, 2024
1 parent c7c7367 commit 0f36cc5
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 77 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: LatentBMA
Type: Package
Title: Bayesian Model Averaging for Univariate Link Latent Gaussian
Models
Version: 0.1.0
Version: 0.1.1
Authors@R: c(person("Gregor","Zens",role=c("aut","cre"),email="zens@iiasa.ac.at"),
person("Mark F.J.","Steel", role="aut"))
Author: Gregor Zens [aut, cre],
Expand All @@ -17,6 +17,6 @@ Imports: ggplot2 (>= 3.5.1), knitr (>= 1.47), mnormt (>= 2.1.1),
Suggests: rmarkdown
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2024-06-26 14:03:10 UTC; Gregor
Packaged: 2024-07-01 14:06:50 UTC; Gregor
Repository: CRAN
Date/Publication: 2024-06-27 14:40:26 UTC
Date/Publication: 2024-07-01 19:00:08 UTC
6 changes: 3 additions & 3 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
3cb18539bc0150660651615d2a4df78d *DESCRIPTION
3ec1247d0bc639483e2ba37576bba4f5 *DESCRIPTION
46fba0702ec46659f44900b43c4803cb *LICENSE
8f09d6d177add4689c76504175a96018 *NAMESPACE
74591e724f7ecb60de9e78b896197232 *R/gradients.R
019afda4a5c176b9015825b782e5b6ee *R/likelihoods.R
3843c9ef189d0e7524baad986f50aba6 *R/mcmc.R
a033d490b3fc1f7b682894497b815b28 *R/mcmc.R
d686785c77d9110360b990818ca0e260 *R/priors.R
2d639ca768bebdb3eaa29b9cf07a7f8f *R/utils.R
2ff22cd160f0ac7da94bb15f8a968c6d *R/wrapper.R
aa19cb5b0fbed7d1078fc98a3bc10f4a *build/vignette.rds
d6be19f04fea7a6d59fa7002398ac548 *inst/CITATION
171adb67bc108d3a629347767a35b6b2 *inst/doc/LatentBMA_Vignette.R
38e77a83af3e6ea488c39210fb2f2496 *inst/doc/LatentBMA_Vignette.Rmd
490b83b90ea82e33ba3395b403d09424 *inst/doc/LatentBMA_Vignette.html
f5d1e0d4c4002fd96a2e5188c7e7be2f *inst/doc/LatentBMA_Vignette.html
f03d3abb65e03880982a153a13a58aa2 *man/ULLGM_BMA.Rd
50f5fcdf1dd43ec71b822194d8142168 *man/plotBeta.Rd
6c4a0c2066e78db687d20f3a1e5d0355 *man/plotModelSize.Rd
Expand Down
6 changes: 2 additions & 4 deletions R/mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ULLGM_BMA_MCMC = function(X,
# beta binomial model size prior: P/2 by default
m = ifelse(is.null(m), P/2, m)

# if g prior not fixed, trigger updating of g
# if g prior not fixed, trigger updating of g (initialize at g=N)
if(is.function(gprior)){randomg=TRUE; g = N} else{randomg=FALSE}


Expand All @@ -135,7 +135,6 @@ ULLGM_BMA_MCMC = function(X,
theta[c(F, gamma==0)] = 0
fit.mean = cbind(1, X.curr) %*% beta


# for adaptive barker proposal
tau = matrix(0.1, N)
accept = matrix(0, N)
Expand All @@ -149,7 +148,6 @@ ULLGM_BMA_MCMC = function(X,
sig2.store = array(NA, c(nsave, 1))
g.store = array(NA, c(nsave, 1))


# some useful precomputations
ones = rep(1, N)
zeros = rep(0, N)
Expand Down Expand Up @@ -186,7 +184,7 @@ ULLGM_BMA_MCMC = function(X,
# compute gradient of log posterior at proposal value
Zpmu = z.prop - fit.mean
eZp = exp(z.prop)
GradProp = LogLikGradient(y, z, Ni) - Zmu/sig2
GradProp = LogLikGradient(y, z.prop, Ni) - Zpmu/sig2

# barker proposal correction term
CorrTerm = CorrTermBarker(z, z.prop, GradCurr, GradProp, zeros)
Expand Down
Loading

0 comments on commit 0f36cc5

Please sign in to comment.