Repository navigation
Open
Labels
comp-basecomp-discretecomp-genmodtopic-post_estimpost-estimation results, margins, prediction, inference, diagnostictopic-predicttype-enh
Description
We have no the underlying infrastructure with NonlinearDeltaCov to add special cases of prediction without much work.
- get_prediction: in my current version this can handle any
model.predict(which=...)(after one more bugfix). Aggregation weights are still missing.
other possibilities not supported by this
- get_prediction_partial:
- linear prediction for subset of exog, we only have predict partial in GAM, AFAIR (can be done already using t_test)
- "eform" can be considered also as partial prediction, i.e. predict for each parameter (of mean function)
- I have not seen a multi-column, multi-parameter version of
eformyet. Does it make sense to have link of a subsum of linpred?
- get_prediction_nonlinear:
- This would be for user specified function (similar to Stata)
- This would mainly be a predict wrapper for wald_nonlinear
- It should include agg_weights and average=True option that
_get_wald_nonlineardoes not have. (useful for margeff, predicted ATE)
- get_prediction_diff (or compare? e.g. also allow ratio) ENH compare prediction #2291
- special case of get_prediction_nonlinear where user provides two sets of exog and we predict ("which"?) the difference.
- Using margins for count and binary exog would be a special case (e.g. in first exog set everyone is male, in second set everyone is female)
- possible extension: we use formula
transformation for each exog set. This would automatically handle interaction effects and polynomials. - do we need paired versus independent (in analogy to t_test) see below for ATE
- predict_at (I will not be working on this anytime soon, I guess)
- automatic construction of predefined exog sets
- currently
get_margeffincludes some of this - emmeans and lsmeans in other packages
- The difficult part will be formula handling if we support
terms(and interaction) and not just columns of exog. It's difficult to get the relevant information about how user/formula constructed the exog.
- ...
Right now I'm mainly interested in whether to add get_prediction_nonlinear and/or get_prediction_diff
ATE, average treatment effect possible use case for get_prediction_diff
- paired: we predict potential outcome for each observation, i.e. two sets of exog cover the same observations
- unpaired/independent: comparing subset of exog populations, only relevant with
average=True. Observations in two exog sets need not be the same, i.e. compare average prediction in population 2 with average prediction in population 1.
related nonlinear example: risk ratio in Logit: ratio of average prediction or average of ratio. #2215 #2619
Metadata
Metadata
Assignees
Labels
comp-basecomp-discretecomp-genmodtopic-post_estimpost-estimation results, margins, prediction, inference, diagnostictopic-predicttype-enh
Activity
josef-pkt commentedon Nov 23, 2021
I think we should add a method for the
transformin predict with formulas as a utility method for users to construct predict exog.I did something similar already in base._prediction_inference for reuse across functions.
josef-pkt commentedon Feb 10, 2022
get_prediction_diff might be able to replicate regression adjustment method in TreatmentEffect. #8034
full interaction term
treatment * exog_otherso all parameters are allowed to differ by treatment.i.e. block structure of exog (as in RAGMM moment conditions.
with appropriate full sample exog in get_prediction we can compute POM, and get_prediction_diff could compute ATE.