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
Breusch-Pagan TestHello I am trying to do a Breusch-Pagan test to test for heteroscedasticity. I have to regression m…
Random of Fixed Effects?I am currently writing a dissertation on the effect of foreign aid on the human development index. …
using commands to search within a smcl fileIs it feasible to use any command to search for a text string within a smcl file? this would help lo…
Invalid Chi2I have this code that keeps throwing "Invalid Chi2" Where am I wrong please? Code: local varie_eff…
using -encode- with multiple string variablesI use Stata 14 on Windows. I have a data set of 30,000 observations with multiple observations (diff…
Subscribe to:
Post Comments (Atom)
0 Response to Problems with collapse command
Post a Comment