Announcement

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

  • Logistic regression on sample weighted by propensity score

    Dear Statalist members!
    May be anyone know the syntax, how to conduct logistic regression on a sample weighted (not matched) by propensity score?

    E.g., for the linear regression on matched sample the syntax is:

    psmatch2 treatment covariate1 covariate#, out(outcome) logit
    reg outcome covariate1 covariate# [fweight=_weight]


    But what is the such syntax for logistic regression on weighted sample?

  • #2
    As requested in FAQ 12, please use CODE delimiters to show code, results, and data.

    The "fweight" statement in your regress command is incorrect. fweights are frequency weights, which indicate that a single observation in the data represents a certain number of identical observations in the original sample. You need pweights, (probability weights) both for regress and logistic. These are the only weights mentioned in the help for psmatch2.
    Code:
    reg outcome covariate1 covariate# [pw =_weight]
    

    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Dear Steve!
      Thank you for your help and excuse for late answer!
      It was few information in methodological articles about propensity score using for binary outcome, especially with STATA software. But it is very important for me to understand this one to apply it to my own research.
      So I collect a number of approaches to use propensity score for binary outcome. I‘m interested in your senior commentary about my findings of propensity score using for binary outcome. It was STATA syntax below (I use STATA 13.0).

      Odds Ratio estimation is the objective of given analysis:

      1. Using propensity score variable for logistic regression correction:
      Code:
      pscore tratment cov1 cov2 cov#, pscore(mypscore) blockid(myblock) logit comsup
      Code:
      logistic bin_outcome treatment mypscore
      2. Matching 1 : 1 and logistic regression on matched sample:
      Code:
      psmatch2 treatment, pscore(mypscore) common caliper(m) neighbor (1) noreplacement
      Code:
      logistic bin_outcome  treatment if _weight==1
      3. Kernel weighting and logistic regression on weighted sample:
      Code:
      psmatch2 treatment, kernel pscore(mypscore)
      Code:
      logistic bin_outcome treatment cov1 cov2 cov# [pweight = _weight]


      4. Mantel-Haenzel test within blocks of propensity score:
      Code:
      cc bin_outcome treatment, by(myblock)
      What is your opinion about correctness of given STATA syntax?

      Comment


      • #4
        Sergei: I recommend you look at the
        Code:
        teffects
        command. It will estimate the propensity score and allow you to perform regression adjustment using a logistic model for the outcome, y.

        Code:
        teffects ipwra (y x1 ... xK, logit) (w x1 ... xK)
        The default for the PS estimation for the treatment, w, is logit. Now, this gives you average treatment effects, but it seems that should be of most interest, anyway.

        Comment


        • #5
          Thanks, Jeff!

          I use this command, but results interpretation is not clear for me.
          For example (cattaneo2.dta, lbweight - binary outcome, mbsmoke - treatment):
          Code:
          use "http://www.stata-press.com/data/r13/cattaneo2.dta", clear
          teffects ipwra (lbweight mmarried alcohol mage medu, logit) (mbsmoke mmarried alcohol mage medu)
          Result: ATE (smoker vs nonsmoker) = 0.054 (95%CI 0.028-0.080)

          It is not equal to odds ratio, but I'm interested in adjusted OR as a result of analysis. So, can you tell me, how can I calculate adjusted OR using teffects command?

          Best regards!


          Comment


          • #6
            Hopefully someone else can chime in. Frankly, the number you report -- .054 -- is the most meaningful to me. It means that whatever is outcome, it has a 5.4 percentage point higher chance of occuring for smokers. The OR has never spoken to me, and it is not a focus in empirical economics. I understand it is in other fields.

            If you want the OR, here is what I think would work. Hopefully someone else will chime in if I'm wrong:

            Code:
            logit treatment covariate1 covariate#
            predict phat
            logit outcome covariate1 covariate# [pweight = 1/phat], or
            One problem is that the standard errors from the second logit will not be correct because they ignore the estimation of the propensity score. The good news is, they are conservative, as shown more generally in Wooldridge (2007, Journal of Econometrics), "Inverse Probability Weighted M-Estimation for General Missing Data Problems."

            The
            Code:
            teffects
            command allows one to realize the efficiency from having estimated the propensity score.

            Jeff

            Comment


            • #7
              A new command for propensity matching is Ariel Linden's MMWS': module to perform marginal mean weighting through stratification. (SSC). I replicated the simulations from the original, very badly written, article (Hong, 2010). To my surprise mmws outperformed IPTW matching.

              Reference:


              Hong, G. 2010. Marginal mean weighting through stratification: adjustment for selection bias
              in multilevel data. Journal of Educational and Behavioral Statistics 35: 499-531.

              Steve Samuels
              Statistical Consulting
              [email protected]

              Stata 14.2

              Comment


              • #8
                I need help to do propensity score matching for my data doing only logistic regression, because psmatch2 command only do regression. Also, I tried many ways, and the result are not the same and I'm confused which one is correct.

                Comment

                Working...
                X