Skip to content

ENH: OLS/WLS based on summary statistic, (cov_data) #3901

Open

Description

@josef-pkt

(I don't find an issue, but the idea is old.)

This is similar to #3570 but for the specific case of adding a model class for linear regression based on summary statistics like the covariance matrix of the data. As variation of this the summary statistic can be a matrix decomposition of exog.

This can include multivariate OLS.

One usecase is to use this with non-standard covariance matrix, e.g. a robust #3230 or penalized #3197 cov_data estimate.
For a sparse model it is not clear whether or when we need sparsified covariance or sparsified inverse covariance.

similar other multivariate methods can be based on "modified" covariance estimate.

Activity

  1. sunilk747 commented on Sep 25, 2017

    @sunilk747

    Hello, I am new to this repo. I would like to work on this issue if nobody is working on this.

  2. josef-pkt commented on Sep 25, 2017

    @josef-pkt
    MemberAuthor

    Hi, AFAIK nobody is working on this

    just a warning: this requires being familiar with the statsmodels models and results class structure.

    The rough idea is to create a new model class that only takes the cross-product matrix of column_stacked (x, y), where x needs to have the constant as first column. as argument, and then replicate as much as possible of the RegressionResults class but only using the cross-product information.

  3. josef-pkt commented on Dec 7, 2018

    @josef-pkt
    MemberAuthor

    bump for 0.11
    maybe something quick like OLSVectorized in special linear model #5382

    Even having just minimal model and results classes would already be helpful for quick experimentation.
    (and leave extension to using other linalg decomposition of the moment matrices for later.)

  4. added this to the 0.11 milestone on Dec 7, 2018
  5. modified the milestones: 0.11, josef on Oct 5, 2019
  6. modified the milestones: josef, 0.15 on Jan 27, 2024
  7. josef-pkt commented on Jan 27, 2024

    @josef-pkt
    MemberAuthor

    bump again

    after #8129 we can have outlier robust OLS based on cov

    two possible interfaces

    • moment matrices z.T z where z is column_stacked [exog, endog]
    • centered moment cov(z) plus mean(z), cov(z) could be scatter/shape matrix for ols params

    question is how do we compute cov_params, especially robust scale (residual variance), and possibly sandwiches?

    One possibility for that would be to use only params for outlier-influence checks that check for more than a single outlier as the current outlier-influence diagnostic, i.e. allow higher breakdown point for outlier and influential point identification.
    (I will open a separate issue)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions