Skip to content

Reorder sigma and lam parameter in StudentT distribution  #5602

@ricardoV94

Description

@ricardoV94

It's a bit surprising that lam appears before sigma, when defining a StudentT with positional arguments.

def dist(cls, nu, mu=0, lam=None, sigma=None, sd=None, *args, **kwargs):

The docstrings suggest sigma comes before, and this is actually the case for the HalfStudentT. In the Normal, sigma also shows up before tau. I think we should reverse them so that sigma takes precedence here as well.

This would warrant a user warning about the changed behavior, which would need a dummy new variable like _sigma=None so that we can detect a positional only argument was used.

This emerged recently in discourse: https://discourse.pymc.io/t/pymc3-produces-different-results-than-stan-numpyro/9030/5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions