Hello all,
i have problems with creating a panel data set and I also have to mentioned that I am a stata beginner.

The Dataset includes many observations (around 100.000) and includes the following parameters:
companyid directorid role startrole endrole
9876 1234 Manager 2004 2006
9876 1234 CEO 2006 2008
9876 1233 President 2004 2010
9888 1234 CEO 2008 2010

So in genereal I have in the Datasets different observations for different time periods, companys, directors, roles.

And now I want to include a specific timeperiod from 1999-2017 for each companyid. Any observation that does not fall within this period can be deleted. The data set should therefore look like the following:
companyid year directorid role
9876 1999 (missing) (missing)
...
9876 2004 1234 Manager
9876 2004 1233 President
9876 2005 1234 Manager
9876 2005 1233 President
...
9876 2017 (missing) (missing)

I try to use the code "tsset director_id year_startrole". But I receive always the error "repeated time values within panel". I know that the time values are overlapping but I need then, like in the example, for example two rows for the companyid and for the year.

I hope someone can help me out.
Thank you all in advance.
Best regards,
Dennis