bistablehistory

bistablehistory: an R package for history-dependent analysis of perceptual time series - Published in JOSS (2022)

https://github.com/alexander-pastukhov/bistablehistory

Science Score: 95.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
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

A package to compute a cumulative history for time-series of perceptual dominance in bistable displays.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 3
Created over 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License

README.md

Cumulative History Analysis For Bistable Perception Time Series

DOI CRAN status <!-- badges: end -->

A package to compute a cumulative history for time-series of perceptual dominance in bistable displays.

Estimates cumulative history, an estimate of accumulating adaptation/prediction error for the dominant percept, 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 of time and perceptually dominant state. Supports Gamma, log normal, and normal distribution families.

If you use the toolbox in your work, please cite Pastukhov, A., (2022). bistablehistory: an R package for history-dependent analysis of perceptual time series. Journal of Open Source Software, 7(70), 3901, https://doi.org/10.21105/joss.03901

Installation

For current stable version use

r install.packages("bistablehistory")

The master branch is the development version. To install it please use

r library("devtools") install_github("alexander-pastukhov/bistablehistory", dependencies = TRUE)

Note

This package uses Stan, a "state-of-the-art platform for statistical modeling and high-performance statistical computation". Therefore, it depends on the package rstantools, which in turn depends on the rstan package, which uses the V8 JavaScript library, through the V8 R package.

Therefore, you will need to install the V8 JavaScript library on your system, and it is recommended that you also install the V8 R package beforehand. For detailed instructions, please see https://github.com/jeroen/v8.

You will also need the R package curl, which depends on libcurl-* in various operating systems. Please see the documentation at https://cran.r-project.org/package=curl.

Usage

The main function is fit_cumhist that takes a data frame with time-series as the first argument. Minimally, you need to specify state --- string with the column name that encodes perceptually dominant state --- and either duration (column name with duration of individual dominance phases) or onset (column name with onset times of individual dominance phases). Thus, for a simplest case of a single subject and single run/block measurement with all defaults (gamma distribution, fitted cumulative history time constant but fixed mixed state value and history mixing proportion) the call would be

r library(bistablehistory) data(br_singleblock) gamma_fit <- fit_cumhist(br_singleblock, state = "State", duration = "Duration")

or, equivalently

r library(bistablehistory) data(br_singleblock) gamma_fit <- fit_cumhist(br_singleblock, state = "State", onset = "Time")

Now you can look at the fitted value for history time constant via

r history_tau(gamma_fit)

and main effect of history for both parameters of gamma distribution

r coef(gamma_fit)

For further details please see vignettes on package usage (Usage examples and Cumulative history) and on an example of writing Stan code directly (Writing Stan code).

Owner

  • Name: Alexander (Sasha) Pastukhov
  • Login: alexander-pastukhov
  • Kind: user
  • Location: Bamberg, Germany
  • Company: Otto-Friedrich-Universität Bamberg

JOSS Publication

bistablehistory: an R package for history-dependent analysis of perceptual time series
Published
February 17, 2022
Volume 7, Issue 70, Page 3901
Authors
Alexander Pastukhov ORCID
Department of General Psychology and Methodology, University of Bamberg, Bamberg, Bavaria, Germany., Forschungsgruppe EPÆG (Ergonomics, Psychological Æsthetics, Gestalt), Bamberg, Bavaria, Germany.
Editor
Mikkel Meyer Andersen ORCID
Tags
R vision time series binocular riavlry

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 268
  • Total Committers: 3
  • Avg Commits per committer: 89.333
  • Development Distribution Score (DDS): 0.022
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Alexander (Sasha) Pastukhov a****v@u****e 262
Fernando Mayer f****r@g****m 5
Andrew Johnson a****n@a****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 3
  • Average time to close issues: about 14 hours
  • Average time to close pull requests: 1 day
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 2.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 3
  • 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
  • fartist (1)
  • fernandomayer (1)
Pull Request Authors
  • andrjohns (1)
  • danielskatz (1)
  • fernandomayer (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 285 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: bistablehistory

Cumulative History Analysis for Bistable Perception Time Series

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 285 Last month
Rankings
Forks count: 21.9%
Dependent packages count: 29.8%
Average: 34.8%
Stargazers count: 35.2%
Dependent repos count: 35.5%
Downloads: 51.5%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • loo * depends
  • rlang * depends
  • rstantools >= 2.1.1 depends
  • Rcpp >= 0.12.0 imports
  • RcppParallel >= 5.0.1 imports
  • boot * imports
  • dplyr * imports
  • future * imports
  • glue * imports
  • magrittr * imports
  • methods * imports
  • purrr * imports
  • rstan >= 2.18.1 imports
  • tibble * imports
  • tidyr * imports
  • ggplot2 * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests