Announcement

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

  • graph

    Hi all,

    I have been away from using stata for a couple of years hence am asking a perhaps very stupid question:
    How could I create a graph (line) that plots the number of observations of a specific variable over the years? I have to show the number of acquisitions over years, and the acq. variable is a dummy. Data looks like this:
    Year acq took place
    1991 1
    1991 1
    .
    .
    1992 0
    1992 0
    .
    .2018 1
    2018 0
    .
    .Many thanks

  • #2
    Code:
    clear all
    sysuse auto
    keep rep78
    drop if missing(rep78)
    contract rep78
    list
    
    graph twoway line _freq rep78

    Comment


    • #3
      Alternatively you could use egen‘s total() function first.

      Comment

      Working...
      X