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
We need to extend the LEF/GLM models to not be GLinearM.
I thought there are open issues, but I didn't see any.
design idea (some notes for it)
Instead of moving to general nonlinear mean function E(y | x) = m(x, params), we can move to a combination link-mean function E(y | x) = inverse_link(m(x, params)).
One main point: reuse current link properties, and current score_factor to extend it by just replacing the inner part which is currently the linear prediction linpred = exog dot params + offset
The advantage is in applying chain rule for derivatives.
If link is identity, then this reduces to the econometrics general mean function.
There are problems with the accuracy of the hessian, with possible problems of observed versus expected information matrix. #3278 has a reference and mentions hessian approximation in the comments.
I didn't check any references now, this was just a brief coding exercise to check inheritance.
a possible application for this: density estimation from histogram of sample or noisy pdf.
y_i = n * d * pdf(x_i, theta) where pdf is midpoint of bin, and y_i is count in bin, (using local linear or some approx to prob of bin)
or
y_i = cdf(x_i, theta) where y_i is ecdf, cumulative counts (maybe not, loose independence of observations)
or use proper discretized prob_i = cdf_ub_i - cdf_lb_i (similar to MLE using grouped data)
I think the problem mentioned in the gist with gaussian derivatives is that scale is not fixed during the score, hessian computation.
This has been cleared up in master a while ago and we fix now scale during the optimization in fit, and have adjusted unit tests that use fixed scale for derivatives (when comparing to numerical derivatives)..
one application would be Logit or Probit (or CDFLink) with heteroscedasticity of latent variable
see several articles and Stats programs for heteroscedastic logit or ologit.
heteroscedasticity of latent variable in binary models introduces nonlinearity in mean function
It's relevant for interval censored latent variables, binary with CDFLink, ordinal, CensoredCount.
This is different from heteroscedasticity in dispersion as in models with extra dispersion parameters like negbin, beta-binomial or families for continuous endog.
Activity
josef-pkt commentedon Feb 3, 2018
A quick experiment to see how much we have to override in GLMNonlinear inheriting from GLM.
https://gist.github.com/josef-pkt/5e717a6da313b7a41f23f7d1adbd9c19
There are problems with the accuracy of the hessian, with possible problems of observed versus expected information matrix. #3278 has a reference and mentions hessian approximation in the comments.
I didn't check any references now, this was just a brief coding exercise to check inheritance.
josef-pkt commentedon Jan 22, 2021
a possible application for this: density estimation from histogram of sample or noisy pdf.
y_i = n * d * pdf(x_i, theta) where pdf is midpoint of bin, and y_i is count in bin, (using local linear or some approx to prob of bin)
or
y_i = cdf(x_i, theta) where y_i is ecdf, cumulative counts (maybe not, loose independence of observations)
or use proper discretized prob_i = cdf_ub_i - cdf_lb_i (similar to MLE using grouped data)
josef-pkt commentedon Jan 22, 2021
gist looks good.
I think the problem mentioned in the gist with gaussian derivatives is that scale is not fixed during the score, hessian computation.
This has been cleared up in master a while ago and we fix now scale during the optimization in fit, and have adjusted unit tests that use fixed scale for derivatives (when comparing to numerical derivatives)..
bump
josef-pkt commentedon Oct 16, 2022
bump
one application would be Logit or Probit (or CDFLink) with heteroscedasticity of latent variable
see several articles and Stats programs for heteroscedastic logit or ologit.
heteroscedasticity of latent variable in binary models introduces nonlinearity in mean function
It's relevant for interval censored latent variables, binary with CDFLink, ordinal, CensoredCount.
This is different from heteroscedasticity in dispersion as in models with extra dispersion parameters like negbin, beta-binomial or families for continuous endog.