Hi,
I am currently doing a panel data research. I am testing the relationship of environmentalcontroversies (1 or 0) and ME_decoupling (1 or 0) --> both of binary nature. I am using a random effects probit regression with some control variables.
I sorted my data as panel data and generated dummy's for industries as classified by NACE classification code. I want to test Yt+1 for ME_decoupling and in order to do so, I created a year +1 +2 -1 and -2. My input is the following:
The problem seems to be with the following input. To be clear, I want to control for sector and year.
With this, I create 275 dummy's for industry and 9 dummy's for year.
Next, I wanted to test my hypothesis with the following code, however, Stata issued an error message.
Now, I was thinking, maybe I have another variable in my dataset called industry, but that is not the case. So I don't get why Stata gives me this error. I want to use all the dummy's in my regression and I thought I needed to use the i. command for that but apparently, I am doing something wrong.
Is there anyone with a solution for me?
Kind regards,
Hidde
I am currently doing a panel data research. I am testing the relationship of environmentalcontroversies (1 or 0) and ME_decoupling (1 or 0) --> both of binary nature. I am using a random effects probit regression with some control variables.
I sorted my data as panel data and generated dummy's for industries as classified by NACE classification code. I want to test Yt+1 for ME_decoupling and in order to do so, I created a year +1 +2 -1 and -2. My input is the following:
Code:
egen ISIN_num = group(ISINnumber) tsset ISIN_num Year tab NACERev2_n, gen(industry) tab Year, gen(y) foreach x of varlist ME_decoupling{ . sort ISIN_num Year . by ISIN_num: gen `x'_1=`x'[_n+1] . by ISIN_num: gen `x'_2=`x'[_n+2] . by ISIN_num: gen `x'1=`x'[_n-1] . by ISIN_num: gen `x'2=`x'[_n-2] . }
Code:
tab NACERev2_n, gen(industry) tab Year, gen(y)
Next, I wanted to test my hypothesis with the following code, however, Stata issued an error message.
Code:
xtprobit ME_decoupling1 EnvControversies_n Numberofemployees_n PLbeforetaxthUSD_n PLforperiodUSD_n OpRevUSD_n TotalassetsthUSD_n listingstatus_n i.industry i.y, re vce(robust) industry ambiguous abbreviation r(111);
Now, I was thinking, maybe I have another variable in my dataset called industry, but that is not the case. So I don't get why Stata gives me this error. I want to use all the dummy's in my regression and I thought I needed to use the i. command for that but apparently, I am doing something wrong.
Is there anyone with a solution for me?
Kind regards,
Hidde
Comment