Announcement

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

  • How to calculate Point Estimates in a regression

    Dear All;

    Need your kind help. I have a file tea_data.csv (attached for reference). I generated the variable teaDum, which takes value 1 if any amount of tea is sown and 0 otherwise. I further generated the variable post, which takes a value of 1 if the cohort is born on or after 1979. I then generated the interaction term using #, however I am required to provide the point estimate which I am unable to figure.

    Kindly help.

    Regards
    Attached Files

  • #2
    Shashank:

    if your questions refer to an assignement, please see https://www.statalist.org/forums/help#adviceextras #4.
    As per your description, the ppoint estimates of your coefficients are those that Stata gives you back in the column named -Coefficient-.
    As an aside, please use -dataex- to share examples/excerpts of your dataset. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo;
      Thanks for your comments. The question is part of an assignment where I am unable to figure the difference between coefficient and point estimate. I also assumed the coefficients are the point estimates but apparently they are not as my answers were marked wrong.
      Now I am seeking to learn from my mistakes for the future hence asking on this forum as to what is the difference between the two. I came across a command called lincom but could not figure the syntax!
      Hope this explains and removes any moral dilemmas
      Regards

      Comment


      • #4
        The regression coefficient is a point estimate, but there are many other point estimates. So apparently the person teaching your course was looking for a different point estimate. We cannot read her/his mind, so you'll just have to ask her/him.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Shashank:
          I would not talk about moral dilemmas, but rules of the forum (as per FAQ).
          I do share Maarten's point that interested listers need more details from your end to see what's the matter with your data.
          Eventually, -lincom- is a post rstimation command that supports the linear combination of the regression coefficients.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            I'm guessing (and for reasons that Maarten and Carlo pointed out above it's just a guess) that you fitted your regression model with the interaction specified as
            Code:
            regress <outcome> i.teaDum##i.post
            and provided your instructor with these regression coefficients as the point estimates, while your instructor wanted the point estimates that you'd get from, say,
            Code:
            regress <outcome> 0bn.teaDum#0bn.post 1.teaDum#0.post 0.teaDum#1.post 1.teaDum#1.post, noconstant
            which are the same as what you'd get from
            Code:
            version 16.1: table teaDum post, contents(mean <outcome>)
            and for that reason a regression model specified like that is also called a cell-means model, and is often fitted with something along the following lines.
            Code:
            egen byte cmm = group(teaDum post), label
            regress <outcome> ibn.cmm, noconstant
            Either that or you neglected to use double octothorpes to specify the interaction

            I then generated the interaction term using #
            or used a single octothorpe and neglected to separately include the main effects terms, and so ended up with a completely misspecified model and just the wrong answer.

            Comment


            • #7
              Dear Carlo, Marteen and Joseph;

              I would like to extend my gratitude for taking out the time to guide me. I figured that the point estimate meant here was the coefficient itself. The mistake I made was using a single "#" instead of "##".

              However, I would like to pose one more question for the sake of my learning. What is the difference between # and ## when it comes to interaction between variables?

              Regards

              Comment


              • #8
                Shashank:
                the difference is that, unlike -##- (which is the way to go most of the times), -#- does not include the conditional main effect of the predictors included in the interaction:
                Code:
                . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
                (1978 automobile data)
                
                . regress price i.foreign##i.rep78
                note: 1.foreign#1b.rep78 identifies no observations in the sample.
                note: 1.foreign#2.rep78 identifies no observations in the sample.
                note: 1.foreign#5.rep78 omitted because of collinearity.
                
                      Source |       SS           df       MS      Number of obs   =        69
                -------------+----------------------------------   F(7, 61)        =      0.39
                       Model |    24684607         7  3526372.43   Prob > F        =    0.9049
                    Residual |   552112352        61  9051022.16   R-squared       =    0.0428
                -------------+----------------------------------   Adj R-squared   =   -0.0670
                       Total |   576796959        68  8482308.22   Root MSE        =    3008.5
                
                -------------------------------------------------------------------------------
                        price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                --------------+----------------------------------------------------------------
                      foreign |
                     Foreign  |   2088.167   2351.846     0.89   0.378     -2614.64    6790.974
                              |
                        rep78 |
                           2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
                           3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
                           4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
                           5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
                              |
                foreign#rep78 |
                   Foreign#1  |          0  (empty)
                   Foreign#2  |          0  (empty)
                   Foreign#3  |  -3866.574   2980.505    -1.30   0.199    -9826.462    2093.314
                   Foreign#4  |  -1708.278   2746.365    -0.62   0.536    -7199.973    3783.418
                   Foreign#5  |          0  (omitted)
                              |
                        _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
                -------------------------------------------------------------------------------
                
                . regress price i.foreign#i.rep78
                note: 1.foreign#1b.rep78 identifies no observations in the sample.
                note: 1.foreign#2.rep78 identifies no observations in the sample.
                
                      Source |       SS           df       MS      Number of obs   =        69
                -------------+----------------------------------   F(7, 61)        =      0.39
                       Model |    24684607         7  3526372.43   Prob > F        =    0.9049
                    Residual |   552112352        61  9051022.16   R-squared       =    0.0428
                -------------+----------------------------------   Adj R-squared   =   -0.0670
                       Total |   576796959        68  8482308.22   Root MSE        =    3008.5
                
                -------------------------------------------------------------------------------
                        price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                --------------+----------------------------------------------------------------
                foreign#rep78 |
                  Domestic#2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
                  Domestic#3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
                  Domestic#4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
                  Domestic#5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
                   Foreign#1  |          0  (empty)
                   Foreign#2  |          0  (empty)
                   Foreign#3  |   264.1667   2746.365     0.10   0.924    -5227.529    5755.862
                   Foreign#4  |   1696.944   2351.846     0.72   0.473    -3005.863    6399.751
                   Foreign#5  |   1728.167   2351.846     0.73   0.465     -2974.64    6430.974
                              |
                        _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
                -------------------------------------------------------------------------------
                
                .
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X