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
Too large R SquaredI regressed the loan rate on firm variables and loan characteristics and yield a way too high r squa…
Oaxaca_rif erroranalyzing wage discrimination using oaxaca_rif However, Some problem have occur. I did the followin…
note: index_msa omitted because of collinearityhi friends. i have faced a problem. in my regression , this notification confused me. my regression:…
Line graph with different style for forecasted valuesHello, I have some values which are both historical and forecasted. Let's say that from 2000q1 to 2…
note: index_msa omitted because of collinearityhi friends. i have faced a problem. in my regression , this notification confused me. my regression:…
Subscribe to:
Post Comments (Atom)
0 Response to ASGEN command for weighted average
Post a Comment