Hi Everybody! I am new to this forum so I hope i have provided all the information needed in my message.
My data is panel data. I have yearly data on different companies in 4 different countries. When I tried to ttset the data, i noticed that for several companies i have duplicate years but with different accounting methods.
so for example for Company A, i have 2 observations for the year 2014 but with either Unconsolidated or Consilidated data. there are also companies that only report with unconsolidated or consolidated data, so here there are no duplicates.
variablenames:
IDNRCODES = id of a company
CLOSDATE_year = year
ACCDATA = indicates if the data is either unconsildated (4) or consolidated (1), .
I tried to gen a variable "MULTIPLEACC" that could indicate whether or not a company has data over dfifferent observations with both unconsolidated or unconsolidated data, so I would be able to specifically drop observations. But i could not make it work. Probably since an observation itself can not have both 1 and 4 in the ACCDATA cell.
command i used:
bysort IDNRCODES(CLOSDATE_year) : gen MULTIPLEACC = (ACCDATA==1 & ACCDATA==4)
(I am using Stata/MP 17.0)
is there anyone who has an idea how i could handle this?
thank you!
My data is panel data. I have yearly data on different companies in 4 different countries. When I tried to ttset the data, i noticed that for several companies i have duplicate years but with different accounting methods.
so for example for Company A, i have 2 observations for the year 2014 but with either Unconsolidated or Consilidated data. there are also companies that only report with unconsolidated or consolidated data, so here there are no duplicates.
variablenames:
IDNRCODES = id of a company
CLOSDATE_year = year
ACCDATA = indicates if the data is either unconsildated (4) or consolidated (1), .
I tried to gen a variable "MULTIPLEACC" that could indicate whether or not a company has data over dfifferent observations with both unconsolidated or unconsolidated data, so I would be able to specifically drop observations. But i could not make it work. Probably since an observation itself can not have both 1 and 4 in the ACCDATA cell.
command i used:
bysort IDNRCODES(CLOSDATE_year) : gen MULTIPLEACC = (ACCDATA==1 & ACCDATA==4)
(I am using Stata/MP 17.0)
is there anyone who has an idea how i could handle this?
thank you!
Comment