Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ESTIMATE AND STORE coefficient values AND calculate standard errors using DELTA method.

    Hi there,

    I am currently using stata 12. I am trying to run two regressions with the same dependent and explanatory variables but different estimates. More specifically, I want to:



    1. run the within estimator and store the value of a specific coefficient of an explanatory variable from this regression output.

    2.Then I want to run the between estimator using the same variables and store the value of a variable (the same as in the case of the between estimator).

    3.After this, I want to estimate a new coefficient which is calculated as (1-(within estimate coefficient/between estimate coefficient).

    4.Upon this estimation, I want to then estimate (compute) the standard errors by using the delta method.




    Does anyone know which stata codes to use in order to store the value of certain coefficients? And then make the above calculation? and finally compute the st.errors by delta method?


    I hope I was clear enough and please let me know if you need any clarification.

    I would appreciate your help very much

    thank you

  • #2
    Probably something like this:

    Code:
    xtreg dep_var ind_vars, be
    estimates store between
    xtreg dep_var ind_vars, fe
    estimates store within
    suest between within
    nlcom 1-[within]var_of_interest/[between]var_of_interest

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      Probably something like this:

      Code:
      xtreg dep_var ind_vars, be
      estimates store between
      xtreg dep_var ind_vars, fe
      estimates store within
      suest between within
      nlcom 1-[within]var_of_interest/[between]var_of_interest
      In this case, how would Stata estimate the variance-covariance matrix for variables from two different regressions?

      Comment


      • #4
        -suest- creates the covariance matrix. If you want to see it, you can run -estat vce- after the -suest- command.

        But, I realize as I write this that the code I proposed in #2 will not work because -suest- does not support -xtreg-. So you have to do this by emulating the within- and -between regressions with regress.

        So something like this:
        Code:
        foreach v of varlist dep_var indep_vars {
            by panel_var, sort: egen btwn_`v' = mean(`v')
            gen within_`v' = `v' - btwn_`v'
        }
        regress btwn_dep_var btwn_indep_vars
        estimates store between
        regress within_dep_var within_indep_vars
        estimates store within
        suest between within
        After -suest- you can run -nlcom- or any of the usual post-estimation commands.

        Note: If there is more than one independent variable in your models, you will have to list out the various btwn_ versions of the independent variables and the various within_ versions.

        Comment

        Working...
        X