Hi to everyone,
Im new in Stata programing, and it would be very helpful if someone gave me an opinion about my two problems.
First: I am trying to create a panel setting. woriking with sales data across several countries. Im trying to find the effect on saleid which is the effect of one particular law on the specific products (which are quoted by id) on specific time periods (example december 2013 or july 2012). as you can see in the first attachment.
i already created a group indicator using the commands: egen id1=group(id) and egen date2=group(date) (attachment 2) but when ive try to create the pannel setting using the comand xtset id1 date2 i always get the following comand : repeated time values within panel r(451); also when run only xtset id1 i tells me that the pannel is unbalanced. the only command that i managed to find in internet was to drop if date==date[_n-1] however im not fully covinced that this is a proper way to deal with my data.
my question is can I just go on with xtreg command even in the case of unbalanced pannel, will my estimators be biased ?
Second: in my regression I also trying to enter two fixed effects. the product-date fixed effect and the country-year fixed effect, so that to account for trends in the product and countries. i was just wondering if just an intenaction term between the variables of country and year would do the trick?
Any idea or advice would be highly appreciated.
Related Posts with Panel Setting problem, and country-year fixed effects
Create mother in law variables for female spouse in each householdHello Statalisters, I would like to generate for each spouse (female) in each household id (Fhhid),…
Deducting values in panel data across observationsDear Statalist, I've tried finding an answer for this question for a while. I'm using the latest S…
constrains in latent profile analysisDear scholars, I am struggling with the meaning of constrains in LPA. Stata's default constrain val…
usage of `' in stata commandsHi, I am trying to understand the use of command `' in stata. For instance, if the command is "if `3…
Create time-varying industry experience variables for different investorsHi there I am looking to create two variables based on the below example data. I would like to crea…
Subscribe to:
Post Comments (Atom)
0 Response to Panel Setting problem, and country-year fixed effects
Post a Comment