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
{{ message }}
Repository navigation
ENH: predicted mean, conditional expectation in nonlinear models with random term in linpred #8762
e.g Logit( x b + e) where e is an unobserved random term
Jensen's inequality bites again.
E(y | x) is not Logit(x b) (or expit ?)
Wooldridge on control function explains average structural function, ASF, that marginalizes/integrates out the e random variable, implemented by averaging over the sample e.
This looks similar to the "smearing" mean adjustment when endog is a nonlinearly, e.g. log, transformed y. #6611
Wooldridge, Jeffrey M. “Control Function Methods in Applied Econometrics.” The Journal of Human Resources 50, no. 2 (2015): 420–45.
AFAIU, the same applies to random/mixed effects nonlinear models, GLM, discrete.
AFAIR, I ran into this before in the random effect context, or as cause of overdispersion.
What should predict, get_prediction return by default?
What other statistics do we need as option for predict?
In the simple case of nonlinear transformation, the interpretation is in terms of median, quantiles only need monotonicity but no curvature adjustment. That's the interpretation that I prefer for nonlinear models, asymmetric distributions that don't have a mean parameterization, e.g. AFT accelerated failure time models for survival.
In tsa with log transformed endog, ignoring the mean correction often produces better forecasts than the smearing estimate, AFAIR some literature
Related:
In models like Probit, the additional randomness also changes the scale of the distribution of the latent random variable.
The estimated parameters are scaled parameters. b / s
In those cases it is important to look at marginal, partial effects. d E(y | x) / d x
(similar applies to heteroscedastic Logit, Probit. However, there we are fully parametric.)
example for fully parametric model with endogeneity (not control function)
endogenous participation in ZIP, ZINB and hurdle models,
error terms in zero model and count model are correlated, correlated bivariate normal random terms in linear predictors.
both predicted mean and marginal/partial effects integrate out the error term, similar to random effect in Poisson.
(MixedMixin has some tools for integration like this, gauss-hermite quadrature, of each observation, not a random effect in a cluster or panel. I had used this for an overdispersed poisson model, poisson-normal mixture or poisson-gamma mixture as in NB)
eg. in the statistics literature GEE is referred to as estimating "marginal" model ("marginal" in terms of marginal distribution integrating out random effects, population average).
The question is what do we estimate if we ignore random effects, e.g. using OLS or GEE instead of mixed models.
Mixed models assume independent (or uncorrelated) random effects, unobserved heterogeneity, so very strict assumption.
Activity
josef-pkt commentedon Mar 29, 2023
example for fully parametric model with endogeneity (not control function)
endogenous participation in ZIP, ZINB and hurdle models,
error terms in zero model and count model are correlated, correlated bivariate normal random terms in linear predictors.
both predicted mean and marginal/partial effects integrate out the error term, similar to random effect in Poisson.
(MixedMixin has some tools for integration like this, gauss-hermite quadrature, of each observation, not a random effect in a cluster or panel. I had used this for an overdispersed poisson model, poisson-normal mixture or poisson-gamma mixture as in NB)
Liu, Xueyan, Wencong Chen, Tian Chen, Hui Zhang, and Bo Zhang. “Marginal Effects and Incremental Effects in Two-Part Models for Endogenous Healthcare Utilization in Health Services Research.” Health Services and Outcomes Research Methodology 20, no. 2 (September 1, 2020): 111–39. https://doi.org/10.1007/s10742-020-00211-x.
josef-pkt commentedon Feb 17, 2025
good theory overview article of estimating partial effect under independence or conditional independence.
Wooldridge, Jeffrey M. 2005. “Unobserved Heterogeneity and Estimation of Average Partial Effects.” In Identification and Inference for Econometric Models: Essays in Honor of Thomas Rothenberg, edited by Donald W. K. Andrews and James H. Stock, 27–55. Cambridge: Cambridge University Press. https://doi.org/10.1017/CBO9780511614491.004.
(I have not looked at Woodridge's book in a long time, it has similar arguments but not as specific to this point, AFAIR)
I ran into this looking for background to #9507
eg. in the statistics literature GEE is referred to as estimating "marginal" model ("marginal" in terms of marginal distribution integrating out random effects, population average).
The question is what do we estimate if we ignore random effects, e.g. using OLS or GEE instead of mixed models.
Mixed models assume independent (or uncorrelated) random effects, unobserved heterogeneity, so very strict assumption.