Announcement

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

  • Employing standardized coefficients using weighted data

    Hi Statalisters,

    I using data which employs a multi-stage probability sample, and provides probability weights. According to the available literature on the data, the weights were created primarily to take into consideration sub-sampling of non-respondents. In analysis, I had been employing these p-weights and the ", beta" command to allow for standardized coefficients (as advised by a reviewer, to allow comparisons of magnitude for coefficients).
    e.g.:
    eststo: reg Y1 X1 X2 X3 X3 [pweight=WEIGHT],r beta

    I am trying to see if the coefficients between the above regression and a regression with additional IVs (X4, X5,...) are significantly different.:

    eststo: reg Y1 X1 X2 X3 X3 X4 X5[pweight=WEIGHT],r beta
    suest est1 est2
    test [est1_mean]_X1_1 =[est2_mean]_X1_1

    running these commands, I receive the error:
    model est1 was estimated with pweights, you should re-estimate using iweights

    Looking through the archives I found only this relevant post (http://www.stata.com/statalist/archi.../msg01461.html)

    When I use the svy command (svyset [pweight = WEIGHT]) I am able to make the comparison of interest, but am no longer able to specify the ", beta" command.
    I believe this has something to do with the fact that Stata does not like the effect of the weights on the variance used to calculate the standardized coefficients.
    Is there a permissible alternative approach that will allow both pweights and standardized coefficients? Or could I display the significance results of the Wald test with the standardized coefficients?

    If required, I would be able to provide additional information. I am using stata 12, and employ no addons.

  • #2
    You can do this directly.

    For a multiple regression with outcome \(y\) and predictors \(x_k, \thinspace k = 1 \dots P\), suppose \(b_k\) is the regression coefficient associated with \(x_k\). Then the standardized regression coefficient is:

    \[
    b_k^{'} =b_k \frac{s_{x_k}}{s_y}
    \]

    where the \(s_*\) indicates the standard deviation of the variable (*). This is the form used in a handout by Richard Williams: https://www3.nd.edu/~rwilliam/stats1/x92.pdf ).

    Richard gets coefficients for survey regression by transforming variables in a 2007 Statalist post :http://http://www.stata.com/statalis.../msg00075.html .

    Here's an approach that does it by transforming the coefficients.

    Code:
    sysuse auto, clear
    local y mpg   /* outcome */
    local xvars turn length weight /* predictors */
    
    svyset turn [pw = price]
    /* Get coefficients */
    
     svy: regress `y' `xvars'
        matrix b = e(b)
    
         /* Get SDs of y and predictors */
        svy: mean `y'
        estat sd
        matrix sy = r(sd)
    
        svy: mean `xvars'
        estat sd
        matrix sx = r(sd)
    
        /*Compute standardized coefficients */
        mata:
         sy = st_matrix("sy")
         sx = st_matrix("sx")'
         b = st_matrix("b")
         bx = b[1 ,1..(cols(b)-1)]'
         st_matrix("betas",(sx:/sy):*bx)
        end
    
    
    matrix rownames betas = `xvars'
    matrix list betas
    Results:
    Code:
    betas[3,1]
                    c1
      turn   .09803076
    length  -.45034061
    weight  -.45578916
    Last edited by Steve Samuels; 27 Jan 2015, 12:36. Reason: removed quiet block
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Hi I recently came across this question and realized a seemingly efficient way to do this. I just standardize both predictors and outcomes (using egen=std statement), and it has the same output. Hope this helps!

      Comment

      Working...
      X