Hello,
I'm working on a longitudinal panel data set. This is a rough sketch of my data:
CITY COUNTRY YEAR EVENTS
Paris FRA 2000 13
Lyon FRA 2000 5
Lille FRA 2000 2
So now as I have data on all three cities I want to combine all of them together to analyse on the country level. So I want to drop the city variable and then sum up all numbers of events. SO fun the end I would get only one observations namely:
COUNTRY YEAR EVENTS
FRA 2000 20
The thing is that not every country has 3 observations per year. Most of them have only one, so Stata would have to be able to recognise how many observations there are for each country. So if one obeservation only take the one number off events. with 2 observations add the two numbers, with 3 observations adding all 3 numbers.
I have absolute no idea how to do it as I'm new here.
I am very grateful for every help as I need it for my Bachelor Thesis...
haha
I'm working on a longitudinal panel data set. This is a rough sketch of my data:
CITY COUNTRY YEAR EVENTS
Paris FRA 2000 13
Lyon FRA 2000 5
Lille FRA 2000 2
So now as I have data on all three cities I want to combine all of them together to analyse on the country level. So I want to drop the city variable and then sum up all numbers of events. SO fun the end I would get only one observations namely:
COUNTRY YEAR EVENTS
FRA 2000 20
The thing is that not every country has 3 observations per year. Most of them have only one, so Stata would have to be able to recognise how many observations there are for each country. So if one obeservation only take the one number off events. with 2 observations add the two numbers, with 3 observations adding all 3 numbers.
I have absolute no idea how to do it as I'm new here.
I am very grateful for every help as I need it for my Bachelor Thesis...
haha
Comment