stan-dev / stan-dev/projpred

Conditional logit (clogit) models

Open
#527 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, projpred does not work with models estimated via stan_clogit; e.g.

example(stan_clogit, package = "rstanarm") # creates post
projpred::get_refmodel(post) # fails

But I wanted to make sure I am clear as to what would need to happen for clogit models to become supported by the projpred package, so that @jgabry and I can help. At help(clogit, package = "survival"), it is pointed out that the likelihood for a clogit model is a special case of that for a Cox model, if that makes things easier. The best documentation of a clogit model is actually in Stata. I would guess that the form of the likelihood is sufficiently nice that projpred should work eventually, but the model (and its submodels) lack an intercept because it is not identified under the likelihood alone, so that is different from what projpred is accustomed to. Also, the prediction task is essentially leave-one-stratum-out rather than leaving one individual out of some stratum.

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

Reproduce the failure with example(stan_clogit, package = "rstanarm") and projpred::get_refmodel(post). Read help(clogit, package = "survival") and the linked Stata documentation to understand the likelihood and prediction setup; done means projpred supports stan_clogit models, including their no-intercept and leave-one-stratum-out prediction behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
machine-learning
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.