stan-dev / stan-dev/projpred

Allow dispersion parameter to be observation-specific

Open
#481 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
114
Forks
31
PR merge metrics
No merged PRs in 30d

Description

This is a feature request to allow the dispersion parameter to be observation-specific, as, for example, in models like the following:

library(brms)
set.seed(4734)
data_het <- data.frame(
  y = c(rnorm(50), rnorm(50, 1, 2)),
  x = factor(rep(c("a", "b"), each = 50)),
  se_y = rgamma(100, shape = 1)
)
fit6 <- brm(y | se(se_y, sigma = TRUE) ~ x, data = data_het)
stancode(fit6)
str(standata(fit6))

This came up in https://discourse.mc-stan.org/t/accounting-for-measurement-error-during-variable-selection-with-projpred-possibly-with-rstanarm-or-brms/11789.

Contributor guide

Open the contributing guide

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

The issue names no project files or tests; begin by tracing how brms models using se(se_y, sigma = TRUE) are handled. Use the supplied data_het example with stancode() and standata() to understand the current behavior. Done means observation-specific dispersion is supported for this model pattern and the generated Stan code and data reflect it.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.