Package: bistablehistory 1.1.1

bistablehistory: Cumulative History Analysis for Bistable Perception Time Series

Estimates cumulative history for time-series for continuously viewed bistable perceptual rivalry displays. Computes cumulative history via a homogeneous first order differential process. I.e., it assumes exponential growth/decay of the history as a function time and perceptually dominant state, Pastukhov & Braun (2011) <doi:10.1167/11.10.12>. Supports Gamma, log normal, and normal distribution families. Provides a method to compute history directly and example of using the computation on a custom Stan code.

Authors:Alexander Pastukhov [aut, cre]

bistablehistory_1.1.1.tar.gz
bistablehistory_1.1.1.zip(r-4.5)bistablehistory_1.1.1.zip(r-4.4)bistablehistory_1.1.1.zip(r-4.3)
bistablehistory_1.1.1.tgz(r-4.4-x86_64)bistablehistory_1.1.1.tgz(r-4.4-arm64)bistablehistory_1.1.1.tgz(r-4.3-x86_64)bistablehistory_1.1.1.tgz(r-4.3-arm64)
bistablehistory_1.1.1.tar.gz(r-4.5-noble)bistablehistory_1.1.1.tar.gz(r-4.4-noble)
bistablehistory.pdf |bistablehistory.html
bistablehistory/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/alexander-pastukhov/bistablehistory/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • br - Binocular rivalry data
  • br_contrast - Binocular rivalry, variable contrast
  • br_single_subject - Single experimental session for binocular rivalry stimulus
  • br_singleblock - Single run for binocular rivalry stimulus
  • kde - Kinetic-depth effect data
  • kde_two_observers - Multirun data for two participants, kinetic-depth effect display
  • nc - Necker cube data

On CRAN:

4.48 score 8 scripts 217 downloads 21 exports 67 dependencies

Last updated 1 years agofrom:844da568f1. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 26 2024
R-4.5-win-x86_64NOTEOct 26 2024
R-4.5-linux-x86_64NOTEOct 26 2024
R-4.4-win-x86_64NOTEOct 26 2024
R-4.4-mac-x86_64NOTEOct 26 2024
R-4.4-mac-aarch64NOTEOct 26 2024
R-4.3-win-x86_64NOTEOct 26 2024
R-4.3-mac-x86_64NOTEOct 26 2024
R-4.3-mac-aarch64NOTEOct 26 2024

Exports:bayes_R2check_fixed_history_parametercheck_normal_priorcompute_historyevaluate_history_initevaluate_history_optionextract_historyextract_history_parameterextract_replicate_term_to_matrixextract_term_to_matrixfast_history_computefit_cumhistfixefhistory_mixed_statehistory_parameterhistory_tauhistoryefloopredict_historypredict_samplespreprocess_data

Dependencies:abindbackportsBHbootcallrcheckmateclicodetoolscolorspacecpp11descdigestdistributionaldplyrfansifarverfuturegenericsggplot2globalsgluegridExtragtableinlineisobandlabelinglatticelifecyclelistenvloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivparallellypillarpkgbuildpkgconfigposteriorprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsscalesStanHeadersstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr

Cumulative History

Rendered fromcumulative-history.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2022-02-16
Started: 2021-07-25

Usage examples

Rendered fromusage-examples.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2022-03-22
Started: 2021-09-23

Writing Stan code

Rendered fromwriting-stan-code.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2022-01-07
Started: 2021-09-23

Readme and manuals

Help Manual

Help pageTopics
Cumulative History Analysis for Bistable Perception Time Seriesbistablehistory-package bistablehistory
Computes R-squared using Bayesian R-squared approach.bayes_R2 bayes_R2.cumhist
Binocular rivalry databr
Binocular rivalry, variable contrastbr_contrast
Single experimental session for binocular rivalry stimulusbr_single_subject
Single run for binocular rivalry stimulusbr_singleblock
Extract Model Coefficientscoef.cumhist
Computes cumulative history for the time-seriescompute_history
Class 'cumhist'.cumhist cumhist-class
Computes history for a fitted modelextract_history
Extracts a history parameter as a matrixextract_history_parameter
Extract a term and replicates it randomN times for each linear modelextract_replicate_term_to_matrix
Extracts a term with one column per fixed or random-level into a matrixextract_term_to_matrix
Computes cumulative historyfast_history_compute
Fits cumulative history for bistable perceptual rivalry displays.fit_cumhist
Extract the fixed-effects estimatesfixef
Extract values of used or fitted history parameter mixed_statehistory_mixed_state
Extract values of used or fitted history parameterhistory_parameter
Extract values of used or fitted history parameter tauhistory_tau
Extract the history-effects estimateshistoryef
Kinetic-depth effect datakde
Multirun data for two participants, kinetic-depth effect displaykde_two_observers
Computes an efficient approximate leave-one-out cross-validation via loo library. It can be used for a model comparison via loo::loo_compare() function.loo.cumhist
Necker cube datanc
Computes predicted cumulative history using posterior predictive distribution.predict_history
Computes prediction for a each sample.predict_samples
Computes predicted dominance phase durations using posterior predictive distribution.predict.cumhist
Preprocesses time-series data for fittingpreprocess_data
Prints out cumhist objectprint.cumhist
Summary for a cumhist objectsummary.cumhist
Computes widely applicable information criterion (WAIC).waic.cumhist