README.md

SampleR

The goal of SampleR is to provide tools to understand human performance from the perspective of sampling, both looking at how people generate samples and how people use the samples they have generated. A longer overview and other resources can be found at sampling.warwick.ac.uk

Installation

You can install the released version of SampleR from Github with:

devtools::install_github("lucas-castillo/SampleR")

Example

SampleR provides tools to generate samples following particular algorithms

library(SampleR)
set.seed(0118999)
distribution <- distr::Norm()
chain <- sampler_mcmc(pdf = make_distr_pdf(distribution), start = 0, sigma_prop = .5)
print(chain[[1]][1:20])
#>  [1]  0.000000000  0.000000000 -0.448151222  0.236142502 -0.557230135
#>  [6]  0.228023206 -0.588730526 -0.177076073 -0.177076073 -0.177076073
#> [11] -0.129790837  0.225568367  0.225568367  0.225568367 -0.005134386
#> [16] -0.005134386 -0.006932274 -0.006932274  0.019792978 -0.033472995

As well as tools to diagnose the patterns both from samplers and participants:

plot_qqplot(chain[[1]], change = TRUE)

plot_series(chain[[1]])



lucas-castillo/SampleR documentation built on Jan. 1, 2021, 8:25 a.m.