Skip to content

SUG on multi-logit regression is out-of-date #500

Description

@jsocolar

SUG on multi-logit regression
https://mc-stan.org/docs/2_29/stan-users-guide/multi-logit.html

suggests that the user has to loop row-wise since there's not a vectorized categorical logit. This is out-of-date.

See
https://mc-stan.org/docs/2_29/functions-reference/categorical-distribution.html
and
https://mc-stan.org/docs/2_29/functions-reference/categorical-logit-glm.html

Activity

  1. avehtari commented on Aug 12, 2024

    @avehtari
    Member

    Pinging @bob-carpenter who asked to point out doc issues he could work on in the near future

  2. bob-carpenter commented on Aug 12, 2024

    @bob-carpenter
    Member

    Thanks. I'll fix it.

  3. bob-carpenter commented on Aug 12, 2024

    @bob-carpenter
    Member

    categorical_logit is not yet vectorized to allow this. The available signatures are as follows:

    ...
    Available signatures:
    (array[] int, vector) => real
      The second argument must be vector but got matrix
    (int, vector) => real
      The first argument must be int but got array[] int
    

    So we can vectorize the outcomes, but there's no way to give them different predictions as this example requires.

    I am closing this issue. I opened an issue in the math repo to add the appropriate vectorization signatures: stan-dev/math#3102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions