neuropsychology / Psycho.jl

The Julia Toolbox for Psychological Science
https://neuropsychology.github.io/Psycho.jl/latest/
MIT License
8 stars 2 forks source link

psycho logo julia package

The Julia Toolbox for Psychological Science

Psycho.jl

Build Status Build status codecov HitCount

Goal

"From Julia to Manuscript"

Psycho's primary goal is to fill the gap between Julia's output and the formatted result description of your manuscript, with the automated use of best practices guidelines, ensuring standardization and quality of results reporting. It also provides useful tools and functions for psychologists, neuropsychologists and neuroscientists for their everyday data analyses.

Contribute

Psycho.jl is a young package in need of affection. You can easily hop aboard the developpment of this open-source software and improve psychological science by doing the following:

Don't be shy, try to code and submit a pull request (See the contributing guide). Even if unperfect, we will help you make it great! All contributors will be very graciously rewarded someday :smirk:.

Installation

pkg> add https://github.com/neuropsychology/Psycho.jl.git

Documentation

Examples

Report all the things

Data

using Psycho

# Simulate some data
data = simulate_data_correlation([[0.3], [0.1]])

# Standardize the results
standardize!(data)

# Describe the data
report(data)
The data contains 200 observations of the following variables:
  - y (Mean = 0 ± 1.0 [-2.92, 3.07])
  - Var1 (Mean = 0 ± 1.0 [-2.35, 3.25])
  - Group (1FD, 50.0%; 2HA, 50.0%)

Linear Models (GLM)

using GLM

# Fit a Linear Model
model = lm(@formula(y ~ Var1 * Group), data)

# Report the results
results = report(model)
We fitted a linear regression to predict y with Var1 and Group (Formula: y ~ 1 + Var1 + Group + Var1 & Group). 
The model's explanatory power (R²) is of 0.05 (adj. R² = 0.04). The model's intercept is at 0.0. Within this model:
  - Var1 is significant (Coef = 0.3, t(196) = 3.05, 95% CI [0.11; 0.49], p < .01) and can be considered as small (Std. Coef = 0.3).
  - Group: 2HA is not significant (Coef = 0, t(196) = 0, 95% CI [-0.27; 0.27], p > .1) and can be considered as very small (Std. Coef = 0).
  - Var1 & Group: 2HA is not significant (Coef = -0.2, t(196) = -1.44, 95% CI [-0.47; 0.07], p > .1) and can be considered as very small (Std. Coef = -0.2).

Signal Detection Theory (SDT)

sdt_indices(hit=6, fa=7, miss=8, cr=9)
Dict{String,Float64} with 10 entries:
  "hit_rate"   => 0.428571
  "fa_rate"    => 0.4375
  "dprime"     => -0.0235319
  "beta"       => 0.995497
  "c"          => 0.191778
  "c_relative" => -8.14973
  "Xc"         => 0.180012
  "aprime"     => 0.490992
  "bpp"        => 0.263158
  "pr"         => -0.00892857
  "br"         => 0.433628
  "dprime_glm" => -0.0227017
  "Xc_glm"     => 0.157311