stan-dev / rstanarm

rstanarm R package for Bayesian applied regression modeling
https://mc-stan.org/rstanarm
GNU General Public License v3.0
388 stars 133 forks source link

include 'subset' info in print output #523

Closed jgabry closed 2 years ago

jgabry commented 3 years ago

fixes #411

If subset is specified the print and summary output now include it. A few examples:

> stan_glm(mpg ~ wt + cyl, data = mtcars, subset = rep(TRUE, 32))

stan_glm
 family:       gaussian [identity]
 formula:      mpg ~ wt + cyl
 observations: 32
 predictors:   3
 subset:       rep(TRUE, 32)
...
> stan_glm(mpg ~ wt + am, data = mtcars, subset = cyl == 4)

stan_glm
 family:       gaussian [identity]
 formula:      mpg ~ wt + am
 observations: 11
 predictors:   3
 subset:       cyl == 4
...