walker

Bayesian Generalized Linear Models with Time-Varying Coefficients

https://github.com/helske/walker

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: wiley.com
  • Committers with academic emails
    1 of 7 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.1%) to scientific vocabulary

Keywords

bayesian generalized-linear-models mcmc r stan time-series

Keywords from Contributors

bayesian-inference multilevel-models bayesian-data-analysis multilevel-mediation-models markov-chain-monte-carlo particle-filter state-space
Last synced: 6 months ago · JSON representation

Repository

Bayesian Generalized Linear Models with Time-Varying Coefficients

Basic Info
  • Host: GitHub
  • Owner: helske
  • License: gpl-3.0
  • Language: HTML
  • Default Branch: master
  • Homepage:
  • Size: 7.75 MB
Statistics
  • Stars: 45
  • Watchers: 6
  • Forks: 11
  • Open Issues: 2
  • Releases: 2
Topics
bayesian generalized-linear-models mcmc r stan time-series
Created over 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

R-CMD-check cran version downloads Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.

walker: Bayesian Generalized Linear Models with Time-Varying Coefficients

The R package walker provides a method for fully Bayesian generalized linear regression where the regression coefficients are allowed to vary over time as a first or second order integrated random walk.

The Markov chain Monte Carlo (MCMC) algorithm uses Hamiltonian Monte Carlo provided by Stan, using a state space representation of the model in order to marginalise over the coefficients for accurate and efficient sampling. For non-Gaussian models the MCMC targets approximate marginal posterior based on Gaussian approximation, which is then corrected using importance sampling as in Vihola, Helske, Franks (2020).

See the corresponding paper in SoftwareX for short introduction, and the package vignette and documentation manual for details and further examples.

You can download the development version of walker from Github using the devtools package:

R devtools::install_github("helske/walker")

NEWS

28.8.2024, version 1.0.10

  • Changed URLs to DOIs.

28.8.2024, version 1.0.9

  • Fixed function links to other packages in documentation.

11.9.2023, version 1.0.8

  • Updated the Stan codes to accomodate the new array syntax. PR by Andrew Johnson.

25.7.2023, version 1.0.7

  • Fixed the initial values in the examples of walker in order to get sampler started.
  • Fully delegated the installation to rstantools via PR by Andrew Johnson.

13.10.2022, version 1.0.6

  • Fixed the LFO computations in case the data contains missing values.

10.7.2022, version 1.0.5

  • Improved documentation of the gamma variables in walker, rw1 and rw2.

3.3.2022, version 1.0.4

  • Added an example of counterfactual predictions to the vignette.
  • Added citation info for the softwareX paper.

24.9.2021, version 1.0.3-1

  • Added a flag for stanc3 compatibility, thanks to Andrew Johnson. Also added an import for RcppParallel.

16.8.2021

  • Internal changes to make walker compatible with upcoming StanHeaders.

6.4.2021

  • Changed the name of the logLik variable to log_lik so it is compatible with loo.

27.1.2021

  • Fixed some issues in the vignette which resulted CRAN warnings.

25.1.2021

  • For linear-Gaussian models the stanfit object now returns partial log-likelihood terms p(yt | y1,...,y_t-1,theta) which can be used for leave-future-out cross-validation (see function lfo).
  • New function lfo for estimating the leave-future-out information criterion.
  • Priors for the standard deviation parameters are now Gamma instead of truncated normal, which helps to avoid (rare) problems where sampler wonders close to degenerate case of having all variances near zero. There are also default prior Gamma(2, 0.0001) for these parameters now.
  • Fixed some issues in the vignette added a reference to the walker paper.

3.11.2020

  • stanfit object of walker output now contains also variable logLik. For non-Gaussian models this is the approximate log-likelihood, the unbiased estimate is then logLik + mean(w), where w are the returned weights.

19.10.2020

  • Predict method now allow predictions on link scale.
  • Added argument for plot_predict for controlling the drawing of past observations.
  • Fix out-of-sample predictions for non-Gaussian models.
  • New function: predict_counterfactual which can be used to predict the past assuming new values for the covariates.

13.8.2020

  • Proper export of pp_check for bayesplot, fixed some minor technical issues.

19.5.2020

  • Added default values for row.names and optional for as.data.frame function.

12.5.2020

  • Added as.data.frame function for walker and walker_glm output.
  • Added a summary method.
  • The print method now correctly warns about approximate results in case of non-Gaussian model.
  • Changed arguments *_prior to more concise versions (e.g. sigma_prior is now just sigma).
  • Changed the name of the slope terms to nu as in vignette formulas.
  • Updated to rstantools 2.0.0 package structure and removed dependency on soft-depracated functions of dplyr.

23.1.2020

  • Removed check for missing values in function walker which threw an error even though missing values in responses have been in principle supported since 2018...

20.9.2019

  • Switched from GPL2+ to GPL3 in order to be compatible with future Stan versions.

04.03.2019

  • Added methods fitted and coef for extracting the posterior means and and regression coefficents from the walker_fit object.
  • Fixed issue with Makevars and clang4 per request by CRAN.
  • Added option to predict on mean-scale, e.g, probabilities instead of 0/1 in Bernoulli case.
  • Fixed a bug in the Gaussian predictions, last time point was missing the observational level noise.

25.02.2019

  • Issue with upcoming staged installation in CRAN fixed by Tomas Kalibera.

14.02.2019

  • Dimension bug in GLM case fixed.

8.11.2018

  • Fixed StanHeaders search in Makevars.

22.10.2018

  • Pull request by Ben Goodrich for fixing the issue with clang4. New version on it's way to CRAN.

15.10.2018

  • Missing values in response variable are now supported.
  • Added gamma variables to models which can be used to damp the variance of the random walks.
  • Tidied some Stan codes in order to reduce deep copying.
  • Moved stan codes under src.
  • Increased the iteration counts in examples in order to pass CRAN tests. <

Owner

  • Name: Jouni Helske
  • Login: helske
  • Kind: user
  • Location: Finland
  • Company: University of Jyväskylä

Bayesian statistics, time series, causal inference, state space models, hidden Markov models, visualization.

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 209
  • Total Committers: 7
  • Avg Commits per committer: 29.857
  • Development Distribution Score (DDS): 0.067
Past Year
  • Commits: 5
  • Committers: 1
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
helske j****e@i****i 195
Andrew Johnson a****n@a****m 7
Ben Goodrich g****n@g****m 2
Jouni Helske j****e@l****e 2
Jouni Helske j****1@l****e 1
Helske j****e@j****i 1
Andrew Johnson a****n@p****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 15
  • Total pull requests: 5
  • Average time to close issues: 9 months
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 6
  • Total pull request authors: 2
  • Average comments per issue: 2.07
  • Average comments per pull request: 1.8
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • helske (6)
  • spinkney (3)
  • wpetry (2)
  • bgoodri (2)
  • breckbaldwin (1)
  • sean-horvath (1)
Pull Request Authors
  • andrjohns (4)
  • bgoodri (1)
Top Labels
Issue Labels
enhancement (5) help wanted (3) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 558 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 24
  • Total maintainers: 1
cran.r-project.org: walker

Bayesian Generalized Linear Models with Time-Varying Coefficients

  • Versions: 24
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 558 Last month
Rankings
Forks count: 6.5%
Stargazers count: 8.1%
Average: 21.0%
Downloads: 25.3%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.4.0 depends
  • Rcpp >= 0.12.9 depends
  • bayesplot * depends
  • rstan >= 2.18.1 depends
  • Hmisc * imports
  • KFAS * imports
  • RcppParallel * imports
  • coda * imports
  • dplyr * imports
  • ggplot2 * imports
  • loo * imports
  • methods * imports
  • rlang * imports
  • rstantools >= 2.0.0 imports
  • diagis * suggests
  • gridExtra * suggests
  • knitr >= 1.11 suggests
  • rmarkdown >= 0.8.1 suggests
  • testthat * suggests