stan-dev / stan-dev/rstanarm

make default iterations, chains etc configurable

Open
#118 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
401
Forks
136
PR merge metrics
No merged PRs in 30d

Description

Summary:

rstanarm always does generous 4 x 2000 MCMC iterations by default. These defaults cannot be altered.

Description:

A method to change the default does not seem to exist. Users quickly find themselves typing chain = 1, iter = 500 multiple times, when evaluating models.

Reproducible Steps:

None of the two established methods below works:

library(dplyr)
library(rstanarm)
d <- data_frame(x = runif(10, 0, 1), y = rnorm(10, x, .2))

formals(stan_glm)$iter = 300
formals(stan_glm)$chains = 1
m <- stan_glm(y ~ x, data = d)

rstan::rstan_options(iter = 300)
rstan::rstan_options(chains = 1)
m <- stan_glm(y ~ x, data = d)
RStanARM Version:

2.12.1

R Version:

3.3.1

Operating System:

Windows 7/10

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stan_glm entry point and compare its iter and chains defaults with the rstan::rstan_options approach shown in the report. Determine how users can set package-wide defaults, then verify that a model call without explicit values uses those settings while explicit arguments still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.