stan-dev / stan-dev/rstanarm

Request: flexible residual covariance structures

Open
#532 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary:

It would be great if rstanarm supported more advanced structures for the covariance matrix of the residuals.

Description:

I use Bayesian longitudinal models for clinical trial data analysis, usually MMRM and GLIMMIX. The norm in the open source world seems to be to express longitudinality through subject-specific random effects, and rstanarm is already capable of this. But for better or worse, all my stats colleagues are opposed to this approach. They believe this is not a true longitudinal model and that random effects would incur overparameterization issues anyway. This stance seems to be widespread in pharma. So I am required to avoid random effects and make the residual covariance block-diagonal, where the (common) block is fully parameterized (i.e. unstructured). Would you be open to allowing these covariances in stan_glm() and stan_glmer()? Currently, rstanarm is limited to $\sigma^2 I$, so I have to use MCMCglmm, which does not have as convenient an interface.

Reproducible Steps:

N/A

RStanARM Version:

2.12.1

R Version:

4.0.2

Operating System:

Mac OS 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 by reading the stan_glm() and stan_glmer() entry points and trace how residual covariance is currently represented. Define the supported flexible covariance structures and their expected behavior for Bayesian longitudinal models; done means both interfaces support the requested residual covariance options with validated behavior.

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
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.