Hello everyone,
I have a dataset with Italian data on electoral outcomes. My dataset contains information about all the election years (from 1987 to 2013), provinces, municipalities, eligible voters, actual voters, parties, and votes per party. My goal is to have the dataset at the province level with the votes for the political parties in the election years, together with all the eligible and actual voters.
I, therefore, used this command: collapse (sum) votes eligibles voters, by (province party year).
It works but I obtain different numbers of voters for the same province in the same year...which is wrong.
Where do you think I am doing wrong?
Thank you in advance for your help!!
Related Posts with Problems with collapse command
Event Study Using earnings announcement dateI have a data that looks as follow . Post1 = 0 is collapsed mean of date -45 to -1 for the event dat…
Bayes Stochastic Frontier AnalysisDear all, Does anyone have the Stata command to do Bayes Stochastic Frontier Analysis(SFA)?In Stata …
Loop over *dta files to export to csv filesDear Stata users I have 132 *dta files (X1.dta to X132.dta) in the folder which must be exported to…
use local in foreach commandDear All, I ran the following command Code: local in1 "inrange(year,2011,2012)" local in2 "inrange(…
Help with graph, poisson regressionHello, I have ran a poisson regression for a paper that I have to write. My goal was to find the pr…
Subscribe to:
Post Comments (Atom)
0 Response to Problems with collapse command
Post a Comment