stan_thin: thin n post-warumps samples from a stanfit object

Description Usage Arguments Value See Also Examples

Description

This is a wrapper around stan_slice() to make it easy to thin samples from each parameter in a stanfit object.

Usage

1
2
3
stan_thin_n(object, size, inc_warmup = TRUE)

stan_thin_frac(object, size, inc_warmup = TRUE)

Arguments

object

stanfit object

size

numeric, for stan_thin_n size of thin, for stan_thin_frac fraction of samples to sample.

inc_warmup

logical, include warmup in output, Default: TRUE

Value

stanfit

See Also

Other filtering: stan_filter(), stan_slice()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
rats <- rats_example(nCores = 1)

rats%>%
  stan_select(mu_alpha)%>%
  stan_thin_n(30)
  
rats%>%
  stan_select(mu_alpha)%>%
  stan_thin_frac(0.5)

rats%>%
  stan_select(mu_alpha)%>%
  stan_thin_n(30,inc_warmup = FALSE)

metrumresearchgroup/shredder documentation built on Sept. 1, 2020, 5:36 p.m.