Hi,
I am new with STATA and I would like some advice for the following problem: I am dealing with panel count data model.My dependent variable is a count and is the number(count) of investment projects in each host country(i), in each sector (j) in a given year(t). My data is panel data from 2003 to 2016 and I have 12 industries and 105 host nations. My two main explanatory variables vary by industry by time(ij)and by country, industry, time(ijt).Control variables are composed of i and t. Therefore,
I am dealing with three-dimensional panel data analysis:
i= country, 105
j= industry, 12
t =year, 14
I am using xtpoisson with fe approach with robust standard errors.
After reading a lot of STATAlist previous posts I realized that in order to xtset my data I need to combine countries*industries fixed effect:
egen panelid= group (country * industries)
xtset panelid Year
xtset Y X i.Year, robust i(panelid) fe
However, because I have a lot of countries (105) and a lot of zeros on my dependent variable an important downfall of this estimation is the loss of degrees of freedom because of the inclusion of all these dummy variables. Instead of interacting countries* industries and because I don’t want to combine the country and industry FE, I also tried to put them separately on the model:
For a model with industry FE:
Xtset Industry
Xtpoisson Y X i. Year i.country, fe
Xtpoisson Y X. i.Year i.region, fe
I also incorporate regional dummies in order to group my 105 countries and I incorporated in the model:
Xtpoisson Y X. i.Year i.region, fe
My question is that is there any other way to model a three dimensional panel data without combining industries and countries which generates so many dummies? At the same time when I am grouping industries & countries does not allow me to have a separate information about industries or countries.
I found this older post that was helpful on my decision.
https://www.statalist.org/forums/for...ata-regression
Any suggestions or advice will be greatly appreciated.
Thank you very much,
Related Posts with Issue with three-dimensional panel data analysis
Creating spells of 3 months.Dear All, I am using prescription drug claims data and want to identify spells of 3 months of contin…
replacing "X" character within a string variable with "9"Hi, I have a string variable that some of its values consist of a combination of numbers and "X" (e.…
Help for data with multiple quarterly observationsHello and sorry if this question is obvious or incorrect, I have quarterly data from 2007q1 to 2010…
Reshape and group data by highest value of variablesHi Statalisters I am working on a somewhat intricate reshape of my data set. I have done some resea…
Question on looping over files in a directory using local and foreachDear Statalists, Recently I am attempting to deal with some .dta files in a local directory on the …
Subscribe to:
Post Comments (Atom)
0 Response to Issue with three-dimensional panel data analysis
Post a Comment