Skip to content

FAQ: How good are standard errors? How good is inference? #3270

Open

Description

@josef-pkt

The basic models have established cov_params and related standard errors and inference. For these the usual limitations apply.

There are some additional models or approaches that do not have established standard errors or where reliable standard errors are not yet implemented, or where a model produces "generic" standard errors for the parameters that might not be valid for all options.

In general, the covariance of parameters are estimated under the assumption that the model is given and correctly specified. Some covariance estimators like those based on the sandwich form are robust to misspecification of the model in some directions. In some cases the asymptotic standard errors are not a good approximation to finite samples, where the required sample size depends on the specific model and modelling approach.

some areas where standard errors might be wrong:

  • specification search and variable selection: Standard errors are mostly calculated ignoring any uncertainty about or search for the specification. Two special cases are penalized estimation and semi-parametric fitting where better estimates of the covariance of the parameters might be available but not implemented. An example for semi-parametric fitting is the choice of the polynomial order or of the number of knots in splines, or other analogs of a bandwidth.

  • multi-step estimation procedures: If the estimation procedure consists of several stages, then the effect of initial stages is not always included in the covariance estimate of the last model. We have three cases:

    • wrongly ignored: The standard errors are incorrect if the effect of initial stages are not taken into account. Specification search and variable selection is one example. Other examples are the effect on weighted regression if weights are determined by the data for example in inverse probability weighting (but see next). Estimator are often combined in a sequential way in outlier robust regression. In some cases the covariance of the final stage estimator depends on the estimator in earlier stages
    • ignored but asymptotically irrelevant: In some cases we can estimate some parameters in an initial stage but those parameters are asymptotically uncorrelated with the parameters of interest. A common example for this is the estimation of parameters of the variance function in GLM or linear exponential family which asymptotically do not affect the covariance of the mean parameters because the information matrix is block-diagonal. This includes feasible generalized least squares estimators and correlation estimators in GEE.
    • explicitly taken into account: Some models like two-stage least squares, two-stage heckman estimation have well defined estimation stages that are correctly taken into account in the covariance of the final stage parameters.

Backwards Compatibility Warning
We will improve and change the default and the options for cov_params and related estimators without necessarily going through a deprecation stage in cases where an existing implementation use a very narrow interpretation or are based on very strict assumption so that they are incorrect for common use cases.

Activity

  1. josef-pkt commented on Nov 16, 2016

    @josef-pkt
    MemberAuthor

    This is written with the main three cases in mind, where cov_params and inference are work in progress:

    • estimators that include L1 penalization for variable selection
    • bandwidth choice or equivalent for splines and kernel regression (asymptotics is based on fixed bandwidth/knots or some fixed rate which might not be the one used in the specification search).
    • multi-stage robust regression, especially reweighting estimators (selecting observation to include by dropping outliers identified by an initial estimator, i.e. selecting observations instead of variables including outlier dummies). (I don't have an overview on how the outlier identification procedure affects the cov_params of the final estimate.)
  2. josef-pkt commented on Nov 17, 2016

    @josef-pkt
    MemberAuthor

    as anecdote: perils of early implementations

    SAS/NLIN had incorrectly used fixed weights in the standard error calculations in RLM that differed by about 20 and 30% in the example in
    Street, James O., Raymond J. Carroll, and David Ruppert. 1988. “A Note on Computing Robust Regression Estimates Via Iteratively Reweighted Least Squares.” The American Statistician 42 (2): 152–54. doi:10.2307/2684491.

    R package mgcv has changed the default standard error calculation for splines and GAM several times.

    (AFAIR, I read somewhere that initial IPW implementation did not take the data dependent estimation of weights into account in calculating standard errors.)

    The same applies or will apply to statsmodels.
    (but not in what are by now established models and results like for RLM and others, i.e. where we have a package with reference numbers, unless that method is too difficult to implement in a first round.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions