Dear all,
I have the following dataset. My dataset is way longer (40,000+ observations) and this is just an abstract.
ID is the number of the firm.
subsidiaries are the subsidiaries for each firm.
year is the variable year from 1995-2000.
Country is the country in which we have the subsidiaries and finally the two last columns are the sale per subsidiaries ("sale") and the total sale per firm (mean of sale group by id).
CAN = subsidiairies within Canada (1= Y and 0 = N)
Above = 1 if year >1998 and 0 if year < 1998
I am trying to use the xtset function which does not work given that I have repeated values in the dataset. I would like to test the effect of two other variables: CAN (1 = within Canada for the subsidiaries and 0 = not in Canada) and Above (1 = above 1998 and 0 below 1998)
As you can see, a firm can have multiple other firms (variables subsidiaries) and I grouped them as follows:
However, the error message is still there: repeated time values within panel
r(451);
What should I do? I used also the function which led to a deletion of more than 12,000 observations.
Thank you in advance if you can help me,
Eugene
I have the following dataset. My dataset is way longer (40,000+ observations) and this is just an abstract.
ID is the number of the firm.
subsidiaries are the subsidiaries for each firm.
year is the variable year from 1995-2000.
Country is the country in which we have the subsidiaries and finally the two last columns are the sale per subsidiaries ("sale") and the total sale per firm (mean of sale group by id).
CAN = subsidiairies within Canada (1= Y and 0 = N)
Above = 1 if year >1998 and 0 if year < 1998
Code:
input double id str103 subsidiaries float year str2 Country float(sale sale2 CAN Above) 1 Firm Kiwi 1995 "CAN" 2000 2000 1 0 2 Firm Strawberry 1996 "CAN" 3000 4500 1 0 2 Firm Strawberry 1996 "CAN" 1500 4500 1 0 2 Firm Strawberry 1997 "CAN" 800 1300 1 0 2 Firm Strawberry 1997 "CAN" 500 1300 1 0 2 Firm Strawberry 1998 "CAN" 200 300 1 1 2 Firm Strawberry 1998 "CAN" 100 300 1 1 3 Firm Apple 1996 "JAP" 450 820 0 0 3 Firm Banana 1996 "NET" 370 820 53620 0 0 3 Firm Apple 1997 "JAP" 4000 7000 0 0 3 Firm Banana 1997 "NET" 3000 7000 0 0 3 Firm Banana 1998 "NET" 200 250 0 1 3 Firm Apple 1998 "JAP" 50 250 0 1 3 Firm Banana 1999 "NET" 60 130 0 1 3 Firm Apple 1999 "JAP" 70 130 0 1 3 Firm Banana 2000 "NET" 2000 2000 0 1
As you can see, a firm can have multiple other firms (variables subsidiaries) and I grouped them as follows:
Code:
egen company_id = group(id)
r(451);
What should I do? I used also the function which led to a deletion of more than 12,000 observations.
Code:
drop if year==year[_n-1]
Eugene
Comment