Hi there,
In recent times, this Forum has been extremely useful to me. Thank you all. I am posting this first very thread because I would like to check if my way of using xtreg is correct. I promise, this will not be long.
This is what I want to do:
Using a panel dataset, I want to run a Fixed-Effects regression that comprises many variables. However, I also want to run a total of five model specifications, gradually adding year- and firm-fixed effects, as well as control variables.
So, my intention would be the following:
Specification (1): Only the main regressor, NO firm-, NO year-fixed effects
Specification (2): Only the main regressor, NO firm-, YES year-fixed effects
Specification (3): Only the main regressor, YES firm-, YES year-fixed effects
Specification (4) Like (3), but with a first set of CVs
Specification (5): Like (4), but with a second set of CVs
This is what I am doing:
Where firm_id is my entity identifier; fyear is my time variable, defined as the year of the observation, i.e. 1991, 1992, ..., 2014; log_pub is my main regressor, and all the others are control variables. Please notice I am using i.fyear to include time-fixed effects.
My concerns are:
1) Is it correct to use xtreg in specifications 1) and 2), considered that I want no time- nor firm-fixed effects? Should I use regress instead with i.fyear in spec. 2), so to use Pooled OLS?
2) My time variable fyear is defined as the year associated with the observation, in the form of 1991, 1992, ... 2010 and so on. Is this okay when including year-fixed effects with i.fyear?
In recent times, this Forum has been extremely useful to me. Thank you all. I am posting this first very thread because I would like to check if my way of using xtreg is correct. I promise, this will not be long.
This is what I want to do:
Using a panel dataset, I want to run a Fixed-Effects regression that comprises many variables. However, I also want to run a total of five model specifications, gradually adding year- and firm-fixed effects, as well as control variables.
So, my intention would be the following:
Specification (1): Only the main regressor, NO firm-, NO year-fixed effects
Specification (2): Only the main regressor, NO firm-, YES year-fixed effects
Specification (3): Only the main regressor, YES firm-, YES year-fixed effects
Specification (4) Like (3), but with a first set of CVs
Specification (5): Like (4), but with a second set of CVs
This is what I am doing:
Code:
xtset firm_id fyear *1 xtreg log_pub l_output, vce(cluster firm_id) *2 xtreg log_pub l_output i.fyear, vce(cluster firm_id) *3 xtreg log_pub l_output i.fyear, fe vce(cluster firm_id) *4 xtreg log_pub l_output lassets q roa xrdta ppeta i.fyear, fe (vce cluster firm_id) *5 xtreg log_pub l_output lassets q roa xrdta leverage cheta firm_age analysts_assets ppeta i.fyear, fe vce(cluster firm_id)
My concerns are:
1) Is it correct to use xtreg in specifications 1) and 2), considered that I want no time- nor firm-fixed effects? Should I use regress instead with i.fyear in spec. 2), so to use Pooled OLS?
2) My time variable fyear is defined as the year associated with the observation, in the form of 1991, 1992, ... 2010 and so on. Is this okay when including year-fixed effects with i.fyear?
Comment