lnccbrown / lnccbrown/HSSM

add function for Savage Dickey Ratio test

Open
#1,045 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
124
Forks
24
Avg merge
19h 32m
Merged PRs (30d)
60

Description

model selection using eg. WAIC can sometimes be biased. Sometimes the best way to assess whether a model is a better fit is to use the Savage Dickey Ratio test, which gives you the bayes factor as to whether the fit is better for a more complex model with an added parameter (eg ANGLE) compared to the simpler (DDM) model. In this case one just looks at the density of the posterior evaluated at the null value (theta=0 in this case) relative to the density of the prior (say uniform from 0 to 1). The ratio of these densities gives the bayes factor in favor of the null.

A simple Savage Dickey function that takes in the prior and reads out the posterior for a given parameter at a specified value (in this case 0) would be useful.

see e.g.,
https://statproofbook.github.io/P/bf-sddr.html

Contributor guide

Open the contributing guide

Research direction

No file or test entry point is named. Start by tracing how HSSM represents priors and posterior draws for model parameters, then use the linked Savage-Dickey reference to define the function inputs and output. Done means a function can evaluate the posterior and prior densities at a specified null value and return their ratio, with coverage for the stated ANGLE-versus-DDM use case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.