Announcement

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

  • standard error of geometric mean of estimates

    Hi,

    I want to calculate a geometric mean of estimates in separate regressions.

    I have n binomial variables, for which I want to calculate composite indices for combinations of probabilities for different groups.
    I do a logistic regression on each of these n variables , and compute margins for a categorial variable (at a type observation)
    I want to calculate the geometric mean of the n estimates for each value of the categorial variable - and get a sense of the variation of this derived variable

    Code:
    probit var1 x1 x2 x3 i.x4
    margins i.x4 , at(x1=1 x2=0 x3=21) coeflegend post
    estimates store v1estimate
    
    probit var2 x1 x2 x3 i.x4
    margins i.x4 , at(x1=1 x2=0 x3=21) coeflegend post
    estimates store v2estimate
    Then for each level of x4, I want to calculate the product of the margins. My instinct is to try something like (for level 1 of x4)

    Code:
    nlcom  ({v1estimate}_b[1.bransch] *{v2_estimate} _b[1.bransch])^(1/2)
    Which does not work. Calculating the mean is simple, but how would I get a standard error for this composite measure? In the worst one, I have four variables in the composite index.

    Can I use nlcom, and how do I reference the different results, or how would I calculate this (if possible)

    Grateful for any help!


  • #2
    My first idea was to use -suest- to combine the margins estimation results, but that would not work since the variance is funky.

    I wonder if you can use -biprobit- (or user-written -cmp-) to fit a SUP. This allows for correlation between the errors in the two outcome equations, so it is not quite equivalent to the two separate probits, but it makes everything else a lot easier

    Here's an example:

    Code:
    set more off
    webuse school, clear
    biprobit private vote logptax loginc years i.school
    margins school, expression(sqrt(predict(pmarg1)*predict(pmarg2))) at(logptax=7 loginc=10)

    Comment


    • #3
      Thanks, that worked a treat for the two-variable case. Now I have to go think deeply about the four-variabel indices...

      Comment


      • #4
        The -cmp- command I suggested may be able to do that.

        Comment


        • #5
          I had to do some hard thinking, but in the end I managed to get output.
          Only crinkle was that option svy made the margins command throw a varlist missing (r(100)) error. Strange. And I didn't understand which variable list was missing... Still, without svy it worked. Happy days .

          Comment


          • #6
            Ok, for general productivity purposes (if I or anybody else should need this again)

            Code:
            cmp (Y1 = i.X1 i.X2 X3  X4) (Y2 = i.X1 i.X2 X3  X4) (Y3 = i.X1 i.X2 X3  X4) (Y4 = i.X1 i.X2 X3  X4) , ind($cmp_probit $cmp_probit $cmp_probit $cmp_probit)
            
            margins i.X1, expression((predict(pr eq(#1))*predict(pr eq(#2))*predict(pr eq(#3))*predict(pr eq(#4)))^(1/4))  at(X3=12.43 X4=100 X2=0)

            Comment

            Working...
            X