Package: SequenceSpikeSlab 1.0.1

SequenceSpikeSlab: Exact Bayesian Model Selection Methods for the Sparse Normal Sequence Model

Contains fast functions to calculate the exact Bayes posterior for the Sparse Normal Sequence Model, implementing the algorithms described in Van Erven and Szabo (2021, <doi:10.1214/20-BA1227>). For general hierarchical priors, sample sizes up to 10,000 are feasible within half an hour on a standard laptop. For beta-binomial spike-and-slab priors, a faster algorithm is provided, which can handle sample sizes of 100,000 in half an hour. In the implementation, special care has been taken to assure numerical stability of the methods even for such large sample sizes.

Authors:Steven de Rooij [aut], Tim van Erven [cre, aut], Botond Szabo [aut]

SequenceSpikeSlab_1.0.1.tar.gz
SequenceSpikeSlab_1.0.1.zip(r-4.5)SequenceSpikeSlab_1.0.1.zip(r-4.4)SequenceSpikeSlab_1.0.1.zip(r-4.3)
SequenceSpikeSlab_1.0.1.tgz(r-4.4-x86_64)SequenceSpikeSlab_1.0.1.tgz(r-4.4-arm64)SequenceSpikeSlab_1.0.1.tgz(r-4.3-x86_64)SequenceSpikeSlab_1.0.1.tgz(r-4.3-arm64)
SequenceSpikeSlab_1.0.1.tar.gz(r-4.5-noble)SequenceSpikeSlab_1.0.1.tar.gz(r-4.4-noble)
SequenceSpikeSlab_1.0.1.tgz(r-4.4-emscripten)SequenceSpikeSlab_1.0.1.tgz(r-4.3-emscripten)
SequenceSpikeSlab.pdf |SequenceSpikeSlab.html
SequenceSpikeSlab/json (API)
NEWS

# Install 'SequenceSpikeSlab' in R:
install.packages('SequenceSpikeSlab', repos = c('https://tverven.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.00 score 4 scripts 235 downloads 12 exports 18 dependencies

Last updated 1 years agofrom:d6a341f86b. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 09 2024
R-4.5-win-x86_64OKNov 09 2024
R-4.5-linux-x86_64OKNov 09 2024
R-4.4-win-x86_64OKNov 09 2024
R-4.4-mac-x86_64OKNov 09 2024
R-4.4-mac-aarch64OKNov 09 2024
R-4.3-win-x86_64OKNov 09 2024
R-4.3-mac-x86_64OKNov 09 2024
R-4.3-mac-aarch64OKNov 09 2024

Exports:fast_spike_slab_betageneral_sequence_modelSSS_discrete_spike_slabSSS_discretize_LambdaSSS_discretize_Lambda_betaSSS_hierarchical_priorSSS_hierarchical_prior_binomialSSS_log_phi_psi_CauchySSS_log_phi_psi_LaplaceSSS_make_beta_gridSSS_postmean_CauchySSS_postmean_Laplace

Dependencies:adaptMCMCcodacodetoolsforeachglmnetintervalsiteratorslatticeMASSMatrixramcmcRcppRcppArmadilloRcppEigenRcppProgressselectiveInferenceshapesurvival

SequenceSpikeSlab-vignette

Rendered fromSequenceSpikeSlab-vignette.Rmdusingknitr::rmarkdownon Nov 09 2024.

Last update: 2022-01-23
Started: 2019-12-13

Readme and manuals

Help Manual

Help pageTopics
Compute marginal posterior estimates for beta-spike-and-slab priorfast_spike_slab_beta
Compute marginal posterior estimatesgeneral_sequence_model
Compute marginal posterior probabilities (slab probabilities) that data points have non-zero mean for the discretized spike-and-slab prior.SSS_discrete_spike_slab
Given a prior Lambda on the alpha-parameter in the spike-and-slab model, make a discretized version of Lambda that is only supported on a grid of approximately m * sqrt(n) discrete values of alpha. This discretized version of Lambda is required as input for 'SSS_discrete_spike_slab'. NB Lambda needs to satisfy a technical condition from the paper that guarantees its density does not vary too rapidly. For Lambda=Beta(kappa,lambda) use 'SSS_discretize_Lambda_beta' instead.SSS_discretize_Lambda
Given prior Lambda=Beta(kappa,lambda) on the alpha-parameter in the spike-and-slab model, make a discretized version of Lambda that is only supported on a grid of approximately m * sqrt(n) discrete values of alpha. This discretized version of Lambda is required as input for SSS_discrete_spike_slab.SSS_discretize_Lambda_beta
Compute marginal posterior probabilities (slab probabilities) that data points have non-zero mean for the hierarchical prior.SSS_hierarchical_prior
Compute marginal posterior probabilities (slab probabilities) that data points have non-zero mean using the general hierarchical prior algorithm, but specialized to the Beta[kappa,lambda]-binomial prior. This function is equivalent to calling 'SSS_hierarchical_prior' with logprior = lbeta(kappa+(0:n),lambda+n-(0:n)) - lbeta(kappa,lambda) + lchoose(n,0:n), but more convenient when using the Beta[kappa,lambda]-binomial prior and with a minor interior optimization that avoids calculating the choose explicitly.SSS_hierarchical_prior_binomial
Calculate log of phi and psi marginal densities for Cauchy(gamma) slabSSS_log_phi_psi_Cauchy
Calculate log of phi and psi marginal densities for Laplace(lambda) slabSSS_log_phi_psi_Laplace
Creates a vector of uniformly spaced grid points in the beta parametrization Ensures the number of generated grid points is >= mingridpoints (which does not have to be integer), and that their number is always odd so there is always a grid point at pi/4.SSS_make_beta_grid
Compute posterior means of data points for the Cauchy(gamma) slabSSS_postmean_Cauchy
Compute posterior means of data points for the Laplace(lambda) slabSSS_postmean_Laplace