-
Notifications
You must be signed in to change notification settings - Fork 9
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
Better Integration with StatsBase.RegressionModel #19
Comments
I don't think the |
I have the
Some of these could potentially be added to Maybe some that could be added to
|
Thanks for the list. Some of the cases you listed could be variants of existing functions, e.g. |
Also, it looks like lots of these concepts are common with MixedModels.jl. Have you looked ta that package? Cc: @dmbates |
I agree with @nalimilan that Wouldn't be enough to have instead of More generally, I think I am not getting part of the discussion (totally my fault). Suppose you have a linear model type. I would define the type as follow
You need then to define the following methods for MyLinPredModel
Then everything should work. Could this potentially work? |
My implementation has a very naive way of making get type-stable, but I am sure there are better ways. My get implementation is:
I came up with this solution which has its pros and drawbacks. For example, it is strict in the sense no longer I can make calculations between
The pros is that I am less likely to make an error, and can use the inner constructors to verify properties of the statistics. It also allows the Aye. The individual, idiosyncratic, and thetas are bunched in a dictionary as ErrorComponent in R |
@gragusa I think that's a good overall scheme. The only issues I can think of at least for HC estimators is for example with HC1 or HC4 which use uses the How about adding named arguments for dof and cluster ids? Then it could work something like:
Then I could make |
@Nosferican In You do not need arguments if you can get I can modify For panel with fixed effect, HC is inconsistent, but could be corrected (and this can be done inside the API (obtain the HC and the apply the bias adjustment). |
@gragusa
would this be the Julian-way? If such, I can adapt my code to eschew named arguments with default implied values and define different methods. I think addressing the |
@nalimilan @gragusa...
where
|
For Julia 0.7 the migration to a @lbittarello if Microeconometrics inheritances from |
It would be great to have some help. I have not touch CovarianceMatrices in
a long time and I have not followed StatsModels.jl evolution.
I will try to make a overhaul of the types dependency and also improve the
API. But feel free to chime in ....
On Fri, Nov 10, 2017 at 5:16 PM José Bayoán Santiago Calderón (史志鼎) < ***@***.***> wrote:
For Julia 0.7 the migration to a DataFrames and StatsModels ecosystem
will be completed. As part of the changes coming is the shift from the
DataFrames.DataFrameRegressionModel which GLM and this package rely to
StatsBase.RegressionModel inheritance StatsModels#32
<JuliaStats/StatsModels.jl#32>. I have added a
few methods to StatsBase which will help the transition like coefnames
and model_matrix (Commit #301
<JuliaStats/StatsBase.jl#301>). I would be happy
to help in the transition so more people can use the package.
@lbittarello <https://github.com/lbittarello> if Microeconometrics
<http://Microeconometrics.jl> inheritances from StatsBase.RegressionModel
it should play well likewise.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfRgsKB5l4vdCHWWnWx93uKiPTyId1sks5s1HbRgaJpZM4OabhV>
.
--
Giuseppe Ragusa
|
I can help with the API and HC / CRVE... HAC is outside my area of expertise so I rather let you handle everything there for now.
where
Then we can provide a function for packages to use:
which updates their struct with the What are your thoughts? |
* add params * add params\! * update docstrings
Would be nice to have before the transition in StatsModels.jl Terms 2.0 era. Can you list the requirements you might need?
|
Late reply —-
It depends on how we want to implement this.
The minimal interface would be for statsmodel to provide
- pseudohessian
- pseudoscore
Or something like this (this are the bread and meat of robust variances).
Then packages should take care of implementing those.
Alternatively, the methods you propose are going to be useful if
CovarianceMatrices has to implement variances for methods.
On Tue, 12 Mar 2019 at 22:10, José Bayoán Santiago Calderón (史志鼎) < ***@***.***> wrote:
Would be nice to have before the transition in StatsModels.jl Terms 2.0
era.
Can you list the requirements you might need?
- weights
- informationmatrix
- residuals
- leverage
- dof_residual
- deviance
Do the HAC estimators require a time indicator?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfRgvWO4_739VUv0jfvysU4CXy-KtLqks5vWBfLgaJpZM4OabhV>
.
--
Giuseppe Ragusa
|
The API has the methods, |
Does GLM implement those? If not we should write them and make a PR.
On Mon, 3 Jun 2019 at 17:03, José Bayoán Santiago Calderón < ***@***.***> wrote:
The API has the methods,
score(obj::StatisticalModel) and informationmatrix(model::StatisticalModel;
expected::Bool = true). That should be the minimum interface. The
additional accessors dof_residual, weights, deviance should be more than
enough for most cases (e.g., not including time or clusters).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AAD5DASXRZ46FTAGEGO7MYTPYUXDXA5CNFSM4DTJXBK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWZWCMQ#issuecomment-498295090>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD5DAURXDYR7OTT6W5BHW3PYUXDXANCNFSM4DTJXBKQ>
.
--
Giuseppe Ragusa
|
Hi @gragusa. I am finishing some of the decisions for my longitudinal analysis package. The structs will all be children of
StatsBase.RegressionModel
and inherit fromStatsBase.StatisticalModel
. All methods for both abstract types will be implemented such thatStatsBase.residuals(model)
will return the residuals and so on withcoef
,dof
,dof_residual
, etc. In addition, all other fields which do not have aStatsBase.RegressionModel
method to access are fully accessible throughBase.get(model, value::Symbol)
. For example, if one wants to get the MRSS one just needs to callget(model, :MRSS)
, etc. Let me know if this scheme will work for you.The text was updated successfully, but these errors were encountered: