Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • combining multiple observations into one

    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

  • #2
    -help collapse-

    It is the norm in this community to use our real given and surnames as our username, to promote professionalism and collegiality. Unfortunately, the Forum software does not permit you to edit your username. However, you can click on Contact Us in the lower right corner of this page and send a message to the system administrator requesting the correction. Your adherence to this norm will be appreciated and may increase the propensity of others to respond to your queries.

    Comment


    • #3
      thanks for the advice I will do so

      Comment

      Working...
      X