Dear All,
I am a beginner working on Stata for academic purposes and I need help in carrying out a panel data regression.
1) I have a sample of S&P500 companies on which I need to investigate the direct effect of a variable x1 over y, and this is quite trivial as a simple regression is also already providing clear results of this relationship. But, I would like to use fe or re function instead. In this first case, the Hausman test indicates that fe should be used, yet I am wondering if it is possible to finalize a model with a fe and re (I need re in the 2nd part)
2) Problems arise when I introduce the second hypothesis I am investigating, namely whether the baseline effect is different in the three industries I am considering. Thus, I generated a variable which takes a value of either 1 or 2 or 3 depending on the industry in which the company operates. Of course, the industry is recurring as my panel goes from 1999 to 2013 for each company and the industry is clearly a time-invariant variable. For this reason, I guess a random-effects regression would more suitable here, as opposed to hypothesis 1. This is why I am running the regression using i.varname to indicate it is categorical. But when I run the regression I have trouble in interpreting the table's results (e.g. the p>z value should be higher or lower than 5% to have a statistically significant result for the considered variable? Or is there another way to check the overall validity and statistically significance of the model per se?). Also, do I need to use vce(cluster varname) in the command or not?
3) I am writing commands as follows:
- First model dependent variable + control variables --> xtreg y c1 c2 c3, fe/re
- Second model dependent variable + independent variable + control variables --> xtreg y x1 c1 c2 c3, fe/re
- Third model dependent variable + independent variable + moderator + control variables --> xtreg y x1 i.x2 c1 c2 c3, re
Do you think the structure of these commands is right for generating these models or should I write them in some other way?
Thank you in advance and hope someone can help me quite urgently.
Kind Regards,
Francesco
I am a beginner working on Stata for academic purposes and I need help in carrying out a panel data regression.
1) I have a sample of S&P500 companies on which I need to investigate the direct effect of a variable x1 over y, and this is quite trivial as a simple regression is also already providing clear results of this relationship. But, I would like to use fe or re function instead. In this first case, the Hausman test indicates that fe should be used, yet I am wondering if it is possible to finalize a model with a fe and re (I need re in the 2nd part)
2) Problems arise when I introduce the second hypothesis I am investigating, namely whether the baseline effect is different in the three industries I am considering. Thus, I generated a variable which takes a value of either 1 or 2 or 3 depending on the industry in which the company operates. Of course, the industry is recurring as my panel goes from 1999 to 2013 for each company and the industry is clearly a time-invariant variable. For this reason, I guess a random-effects regression would more suitable here, as opposed to hypothesis 1. This is why I am running the regression using i.varname to indicate it is categorical. But when I run the regression I have trouble in interpreting the table's results (e.g. the p>z value should be higher or lower than 5% to have a statistically significant result for the considered variable? Or is there another way to check the overall validity and statistically significance of the model per se?). Also, do I need to use vce(cluster varname) in the command or not?
3) I am writing commands as follows:
- First model dependent variable + control variables --> xtreg y c1 c2 c3, fe/re
- Second model dependent variable + independent variable + control variables --> xtreg y x1 c1 c2 c3, fe/re
- Third model dependent variable + independent variable + moderator + control variables --> xtreg y x1 i.x2 c1 c2 c3, re
Do you think the structure of these commands is right for generating these models or should I write them in some other way?
Thank you in advance and hope someone can help me quite urgently.
Kind Regards,
Francesco
Comment