Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: define constraints by strings with wild cards #4568

Open
josef-pkt opened this issue Apr 29, 2018 · 0 comments
Open

ENH: define constraints by strings with wild cards #4568

josef-pkt opened this issue Apr 29, 2018 · 0 comments
Projects
Milestone

Comments

@josef-pkt
Copy link
Member

josef-pkt commented Apr 29, 2018

a general idea

see also related, more general issue #4361

we need constraints or contrast matrices in several places,

  • original definition is in t_test and similar.
  • test_wald_terms uses some string matching to construct constraints
  • fit_constrained uses the same pattern, IIRC
  • penalized fit needs restriction matrices to define stochastic constraints

proposal:

  • I think we can create a standalone function following the t_test pattern.
  • It would be convenient to allow for wild cards as in Stata,
    e.g. "region*" for all parameters that encode a categorical variable
  • The latter could by also used with sparse matrices, e.g. as in variance components in mixed models, or variation on sparse OLS and sparse penalized models.

get_constraints(constraints_string, param_names)
or some similar name

possible extension to automatic constraint patterns
e.g. all pairwise #4365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.10
Awaiting triage
Development

No branches or pull requests

1 participant