Hello everyone,
I have to compute the weighted average of democratic scores in the destination countries, weighted it with my shares of emigrants in a certain province in a year.
This is the Stata command i am using:
bysort provincia year: asgen weighted_average= democracy_polity if democracy_polity!=. & share_emigration!=., weight(share_emigration)
However, the new variables doe not make much sense since the values do not sum up to 1.
Thank you,
Best,
Margherita
Related Posts with ASGEN command for weighted average
ppml_panel_sg : collinearity over lhs>0Hi, I am training to estimate the impact of one FTA on bilateral trade: ppml_panel_sg TRADE FTA i…
Error while declaring panel dataDear Statalisters, I am new to stata. I have an unbalanced dataset on firms' investment and number …
Graphing age and period main effects derived from mixed-effects logit modelHello Everyone, I am estimating an age-period-cohort (APC) model to isolate cohort trends in diabet…
Measuring effects from interaction termGood evening, I'm running multiple regressions based on my IV of living in a district that varyies …
Oaxaca result conversion?I got the following results through oaxaca two-fold method. ---------------------------------------…
Subscribe to:
Post Comments (Atom)
0 Response to ASGEN command for weighted average
Post a Comment