Hello,
I am trying to perform propensity score matching in order to calculate weights and perform a regression with the matched sample.
I tried using both teffects and psmatch2.
I want to match on one continuous variable (x1) and 2 categorical variables (x2, x3).
this code works and provides me with the _weight output variable i need for regressions using
However, if i want to perform a 1:k match like this
my _weight variable becomes an integer and therefore i cannot use frequency weights in my regression anymore
How do I change that and calculate frequency weights from my non-integer weights that the 1:k matching with psmatch2 provides me?
Also, i tried using the teffects command.
However, teffects does not allow the categorical specification with i.x2 or i.x3.
I tried using dummy variables instead for all my categories but then i have too many perfect predictors.
Is there any way i can still use teffects psmatch with categorical variables ?
Is it ok to just use x2 and x3 without specifiying them as categorical variables, e.g:
thank you
I am trying to perform propensity score matching in order to calculate weights and perform a regression with the matched sample.
I tried using both teffects and psmatch2.
I want to match on one continuous variable (x1) and 2 categorical variables (x2, x3).
Code:
. psmatch2 treatment x1 i.x2 i.x3, out(y) logit
Code:
[fweight=_weight]
Code:
. psmatch2 treatment x1 i.x2 i.x3, out(y) logit neighbor(3)
Code:
(error: may not use noninteger frequency weights r(401)
Also, i tried using the teffects command.
However, teffects does not allow the categorical specification with i.x2 or i.x3.
I tried using dummy variables instead for all my categories but then i have too many perfect predictors.
Is there any way i can still use teffects psmatch with categorical variables ?
Is it ok to just use x2 and x3 without specifiying them as categorical variables, e.g:
Code:
teffects psmatch (Y) (treatment x1 x2 x3), gen(match)
Comment