• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    R
  • License
    BSD 3-Clause "New...
  • Created about 11 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Small web apps that illustrate statistical concepts

Interactive apps for building statistical intuition

This is a collection of web apps built using Shiny and Dash that illustrate statistical concepts and help build intuitions about how they manifest. The Shiny apps were originally created while teaching Psych252 at Stanford.

Sampling and standard error

Link to Shiny app

This example demonstrates the relationship between the standard deviation of a population, the standard deviation and standard error of the mean for a sample drawn from that population, and the expected distribution of means that we would obtain if we took many samples (of the same size) from the population. It is meant to emphasize how the standard error of the mean, as calculated from the sample statistics for a single sample, corresponds to the width of the expected distribution of means (under normal assumptions).

Simulating t tests

Link to Shiny app

This example performs 1000 one-sample t tests (with different samples from the same distribution) and plots the resulting histograms of t statistics and p values. It is possible to control both the true effect size (Cohen's D) and the number of observations in a sample to show how these two parameters relate the expected distribution of scores. When the effect size is 0, the simulation shows what happens when the null hypothesis is true.

Simple linear regression

Link to Shiny app

This example demonstrates the key objective of linear regression: finding the coefficients for a linear model that minimize the squared distance from each observation to the prediction made by the model at the same value of x.

Simple logistic regression

Link to Shiny app

Similar to the linear regression example, this app shows how the goal of logistic regression is to find a model (expressed in linear coefficients -- here just the intercept and a slope term) that maximizes the likelihood of the data you are fitting the model to.

Regression uncertainty

Link to Shiny app

This app plots a simple linear regression and allows the user to visualize the distribution of regression estimates from bootstrap resamples of the dataset. The user can also plot a normal density with mean at y-hat and standard deviation equal to the standard error of the regression estimate at that point. The app thus draws a comparison between the bootstrap procedure, the expected sampling characteristics of the regression line, and a common way of visualizing the uncertainty of a regression.

Modeling choices in multiple regression

Link to Shiny app

This app plots a basic multiple regression with two variables: x, a continuous measure, and group, a categorical measure. The app lets the user choose whether to fit a simple regression, an additive multiple regression, or an interactive multiple regression, and it shows the lm() output and a visualization for each choice. The app also lets the user control the true effect size for each component of the data to help build intuition about the visual and statistical consequences of different relationships between variables in a multiple regression.

Multicollinearity in multiple regression

Link to Shiny app

This app shows what happens to multiple regression results when there is considerable covariance between two continuous predictor variables. Although the overall model fit does not change as the covariance is increased (as visualized by the regression of y onto yhat and the R squared in the model summary), the parameter estimates become unstable and the confidence intervals expand, which yields large p values even though the relationship between the predictors and the response variable does not change.

Simple mediation structure

Link to Shiny app

This app is intended to provide some intuition about simple mediation models. It allows you to specify a range of causal structures by changing the strength (and direction) of the relationships between three variables. Once you have constructed a structure, you can observe the effects of manipulating the system. Finally, you can simulate data from a model with the specified structure and observe how changing the strength of the relationships influences the regression parameters and inferential statistics.

More Repositories

1

seaborn

Statistical data visualization in Python
Python
12,229
star
2

seaborn-data

Data repository for seaborn examples
Python
1,586
star
3

lyman

Data pipelines and analysis library for functional MRI
Python
53
star
4

Psych216

A translation of Kendrick's MATLAB statistics class materials into Python
Python
38
star
5

moss

Assorted utilities for neuroimaging and cognitive science
Python
18
star
6

Waskom_CerebCortex_2017

Analysis repository for Waskom et al., (2017) Cerebral Cortex
Jupyter Notebook
16
star
7

optlearner

Bayesian optimal probability learner
Python
13
star
8

Psych252

Statistical Methods for Behavioral and Social Sciences
HTML
12
star
9

nipype_concepts

Tutorial notebooks for Nipype
Makefile
10
star
10

mwaskom.github.io

Personal site
HTML
5
star
11

connexplore

Interactive cortical connectivity explorer
Python
4
star
12

annotmpl

Matplotlib artist annotation
Python
3
star
13

ziegler

fMRI Reporting Webapp
HTML
3
star
14

visigoth

Psychophysics experiment control
Python
3
star
15

cregg

Utilities for running psychology experiments
Python
2
star
16

retinotopy

Experiment code for various retinotopic mapping experiments
Python
2
star
17

cogneuro_categories

Code for stimulus presentation and analysis of Psych202 group project
Python
2
star
18

Fluid_NiPype

NiPype code for gfluid project
Python
2
star
19

PyROI

Functional neuroimaging region of interest extraction and analysis in Python.
Python
2
star
20

Psych254_Project

Code for replication project for Experimental Methods Class
JavaScript
2
star
21

monitor_calibration

Simple script to show a calibration stimulus and fit an exponential function
Python
1
star
22

GAPE_Experiment

PsychoPy experiment code for the GAPE (Grating abstraction perception experiment) project
Python
1
star
23

Psych204A

Human Neuroimaging Methods course materials
1
star
24

context_dots

Stimulus code for the parametric uncertainty experiment
Python
1
star
25

nbci

Scratch repository for setting up NMA notebook CI workflow
Jupyter Notebook
1
star