Skip to content

Optional formula interface for css() (minor) #92

Description

@gregfaletto

Minor / low-priority. Inspired by reviewing CRAN's stabs, which accepts a formula + data interface in addition to x/y.

What cssr has today

css() (and the wrappers) take X as a numeric matrix or a data.frame (coerced via model.matrix) plus a separate y. There is no formula interface.

Proposed scope

An optional convenience formula interface, e.g. css(y ~ ., data = df, ...), dispatching to the existing matrix path. Purely ergonomic — no change to the method.

Notes

  • Lowest priority of the stabs-inspired ideas; file for completeness.
  • Would need to define sensible behavior for clusters when columns come from a formula (cluster indices currently refer to columns of X).
  • Consider whether an S3 css.formula / css.default split is worth the added surface, or whether documentation of the existing data.frame path is enough.

References

  • stabs: ?stabsel (formula vs matrix interface).
  • cssr: css, checkCssInputs (X coercion).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions