Dear Statalists,
I am working on treatment effects of foreign acquisition on firms' productivity, in which I use propensity score matching to match firms that have similar characteristics (one is acquired and the other stay in domestic hand) and see how their productivity differs.
I have questions over the command in the guideline for psmatch2:
g att = .
egen g = group(groupvars)
levels g, local(gr)
qui foreach j of local gr {
psmatch2 treatvar varlist if g==`j', out(outvar)
replace att = r(att) if g==`j'
}
sum att
Could you please explain what does it mean when the curly bracket "{" is used and why does, after the bracket, psmatch2 move to another line but not stay at the same line, also why does the closing bracket stay alone at another line?
Thank you so much for your concerns.
Related Posts with Matching within strata in psmatch2
Estimating effect of lagged changes on wealth accumulationHi Everyone! I am trying to estimate the effect of a lagged independent variable on wealth accumula…
Loop with a conditionDear All First time poster. Using Stata 15.1 on Windows. I am doing a epidemiologic register study…
Grouping Households in Panel Data Based on IdentifiersHi All, I am trying to follow households over time in a panel dataset. Currently, each individual h…
Generate date on conditionDear all Please advise how I can replace "extr_date" ONLY for id's where "age2019" is less than 18 …
Grouping small communities to avoid small cell problemHello everyone, Thank you for your help in advance! I am quite desperate at this moment as this sho…
Subscribe to:
Post Comments (Atom)
0 Response to Matching within strata in psmatch2
Post a Comment