You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
issue is replicating GLM with GMM, specifically with dispersion modelling, related to Quadratic Estimating Equations.
In Tweedie PR #2872, issue #2858 the question was how to find the moment condition for the dispersion parameters, specifically the "instrument" in front of the conditional moment restriction for dispersion/variance.
The approach we finally took is directly from a reference for Pearson function estimator.
The more general question is what are the optimal, or at least better than ad-hoc, instruments.
I just saw that Cameron and Trivedi count data 2nd ed. have sections (11.7) on QEE and GMM for moment estimators for Poisson/NegativeBinomial type count models.
expression for optimal instruments look too complicated, but it's a more specific example than Chamberlain and Newey.
topic: models that include functions for 2nd moment (variance and correlation functions)
GLSHet, Garch, QIF, GEE, GMM, double exponential, ...
Mixed Models are also in this category but they are just MLE where all the work is computational
@josef-pkt By GMM, you are referring to Generalized Linear Mixed Models?
So I was talking to an actuary friend a while back. I've been intrigued with the idea of mixed models, but honestly, am unaware of anyone successfully using them. (To my knowledge). The problem is generally that the datasets are too large to add a bunch of coefficients to model random effects.
With that said, there are some ideas which have intrigued me. For example, if we occasionally put an agent on a performance improvement program if they write a bunch of policies with too many losses. The PIP is essentially a treatment (we provide stricter underwriting guidelines to agent). I've always wanted to compare the "improvement" an agent on a PIP has vs. a similar agent not on a PIP, and thought that GLMM's were the way to go.
With that said, this is still very pie-in-the-sky based on what I'm currently working on (which is really more data clean-up and manipulation to be honest). But there's some use for this in my eyes.
I should add, the big concern I have with this is that if I use agent as the random effect, the matrix would be huge. A company could easily have 1500 agents... so that's a huge design matrix... not sure how much RAM that would need.
@thequackdaddy Sorry, this is econometrics GMM is generalized method of moments (nobel prize a few years ago)
GMM is a generalization of matching moments, similar to what we do with the Pearson function for the Tweedie variance parameters.
The advantage in the context here is that we can get an estimator just based on the moment conditions for mean and dispersion without having to specify some kind of "fake" likelihood function.
If we have a likelihood function or parts of it, then we can use the score or estimating equations as the moment condition and replicate MLE or QuasiMLE.
There is literature in various areas to extend this to modeling dispersion, correlation or higher moments.
GLMM or with a more explicit name GLMMixed is in early stages of development.
I guess you have repeated data or panel data for your agents so this would be ab appropriate use case.
My impression is that it will be feasible to handle quite large dataset, 1500 agents is not much.
In the linear case it is possible to remove individual/agent specific constants (fixed effects) without large memory requirements (some reference implementation used industry and employment data with a few hundred thousand to a few million firms and workers).
Also for cases like this we can extend the possible size by using sparse matrices, or special datastructures that we never need to keep a full design matrix with all random and fixed effects in memory (assuming that they have a relatively simple and sparse categorical or group structure).
Nonlinear models like GLM will be a bit more tricky, but it "should" work out.
I don't know how soon we will get there. We have one GSOC project this summer where half of the project looks into distributed computations to reduce in-memory requirements.
I thought about GMM in the Tweedie context, if we want to get the corrected covariance matrix for the variance/dispersion parameter, which according to Jorgensen depends on the estimation and covariance of the mean parameters.
GMM provides a generic setup to combine different equations to get consistent inference. But it would also be possible to do it explicitly case by case as in Jorgensen, or to use a specific generic function.
I kind of have this in some unfinished PRs, but I'm always looking out for more applications because some details and API issues are not yet clear to me.
Activity
thequackdaddy commentedon Apr 23, 2016
@josef-pkt By GMM, you are referring to Generalized Linear Mixed Models?
So I was talking to an actuary friend a while back. I've been intrigued with the idea of mixed models, but honestly, am unaware of anyone successfully using them. (To my knowledge). The problem is generally that the datasets are too large to add a bunch of coefficients to model random effects.
With that said, there are some ideas which have intrigued me. For example, if we occasionally put an agent on a performance improvement program if they write a bunch of policies with too many losses. The PIP is essentially a treatment (we provide stricter underwriting guidelines to agent). I've always wanted to compare the "improvement" an agent on a PIP has vs. a similar agent not on a PIP, and thought that GLMM's were the way to go.
With that said, this is still very pie-in-the-sky based on what I'm currently working on (which is really more data clean-up and manipulation to be honest). But there's some use for this in my eyes.
I should add, the big concern I have with this is that if I use agent as the random effect, the matrix would be huge. A company could easily have 1500 agents... so that's a huge design matrix... not sure how much RAM that would need.
josef-pkt commentedon Apr 23, 2016
@thequackdaddy Sorry, this is econometrics GMM is generalized method of moments (nobel prize a few years ago)
GMM is a generalization of matching moments, similar to what we do with the Pearson function for the Tweedie variance parameters.
The advantage in the context here is that we can get an estimator just based on the moment conditions for mean and dispersion without having to specify some kind of "fake" likelihood function.
If we have a likelihood function or parts of it, then we can use the score or estimating equations as the moment condition and replicate MLE or QuasiMLE.
There is literature in various areas to extend this to modeling dispersion, correlation or higher moments.
GLMM or with a more explicit name GLMMixed is in early stages of development.
I guess you have repeated data or panel data for your
agentsso this would be ab appropriate use case.My impression is that it will be feasible to handle quite large dataset, 1500 agents is not much.
In the linear case it is possible to remove individual/agent specific constants (fixed effects) without large memory requirements (some reference implementation used industry and employment data with a few hundred thousand to a few million firms and workers).
Also for cases like this we can extend the possible size by using sparse matrices, or special datastructures that we never need to keep a full design matrix with all random and fixed effects in memory (assuming that they have a relatively simple and sparse categorical or group structure).
Nonlinear models like GLM will be a bit more tricky, but it "should" work out.
I don't know how soon we will get there. We have one GSOC project this summer where half of the project looks into distributed computations to reduce in-memory requirements.
josef-pkt commentedon Apr 23, 2016
I thought about GMM in the Tweedie context, if we want to get the corrected covariance matrix for the variance/dispersion parameter, which according to Jorgensen depends on the estimation and covariance of the mean parameters.
GMM provides a generic setup to combine different equations to get consistent inference. But it would also be possible to do it explicitly case by case as in Jorgensen, or to use a specific generic function.
I kind of have this in some unfinished PRs, but I'm always looking out for more applications because some details and API issues are not yet clear to me.