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

Saving LinearModel without data #333

Open
hendri54 opened this issue Sep 25, 2019 · 5 comments
Open

Saving LinearModel without data #333

hendri54 opened this issue Sep 25, 2019 · 5 comments

Comments

@hendri54
Copy link

I would find it useful to implement the analogue to Matlab's CompactLinearModel. This is essentially a LinearModel without data.

I envision the following (common?) workflow:

  • Run a large number of regressions.
  • Store the results (without storing the potentially large data many times).
  • When all results are in, decide how to present selected regressions in tables.

One could, of course, extract selected information from each LinearModel and store it in a different format. The drawback would be that packages such as PrettyTables expect LinearModels as inputs.

@nalimilan
Copy link
Member

I guess such objects would have to store a few statistics that cannot be computed without the data, or they wouldn't be very useful: that includes deviance, log-likelihood, p-values...

There could be an AbstractLinearModel type that PrettyTables would use instead of LinearModel.

@hendri54
Copy link
Author

I agree.
Also, I should have referred to RegressionTables.jl instead of PrettyTables.

@pdeffebach
Copy link
Contributor

I think this is a good idea. We could also add a method that contains just the information printed in coeftable plus a few others like dof etc.

@palday
Copy link
Member

palday commented Sep 29, 2022

I've been tinkering with something similar for MixedModels.jl in the form of a MixedModelSummary over in MixedModelsSerialization.jl.

We could probably define a sensible RegressionModelSummary interface for stored coefficients, (optionally) associated names and formula / coeftable as well as various summary statistics and potentially the variance-covariance matrix.

@nalimilan
Copy link
Member

Seems like the existing RegressionModel interface would be enough? The difference with a full LinearModel is just that methods that would require access to the full data (e.g. fitted) would throw an error.

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

No branches or pull requests

5 participants