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
Stratifying in logistic regressionHello, I am attempting to conduct a logistic regression and I want to stratify by a group that I hav…
Detecting autocorrelation in DiD: can I use xtserial?Hello, I am working on the following Diff in diff model in stata: reg ln_sales = i.treatment +trea…
regress, unbiased standard errors?Hello, I would like to know if the command regress corrects for n-k to get the unbiased standard err…
Box plotsHi all, I am quite stuck in plotting a proper box plot with STATA. The following is the plot result…
Neural NetworkHi everyone, I have just recently uploaded a neural network module for Stata. brain.ado is neural …
Subscribe to:
Post Comments (Atom)
0 Response to Problems with collapse command
Post a Comment