Dear STATA users,

I am writing my bachelor thesis and need to do some econometric research with stata. I've been reading posts but still struggling on finding out how to correctly run my regression

I would be really grateful if you could give me some advice on how to procede

I am running a panel regression with T>N, I have 19 countries and 180 periods with monthly observations from 2003-2018. (Some independent variables are yearly data though but I have adjusted them to monthly)

My goal is to find out whether market concentration and population variables impact the effect of a change in monetary policy on the change in deposit rates. So my final regression is:

Dependent variable = OVER_SPREADCH // the change in deposit rates

Independent variables = RATECHANGE // the change in Central Bank interest rate

+ continuous control variables= HHI POP_AGE TER_EDUC LOG_INC GBONDSP

+ interaction terms= c.HHI#c.RATECHANGE c.POP_AGE#c.RATECHANGE c.TER_EDUC#c.RATECHANGE c.LOG_INC#c.RATECHANGE

And my interest is placed on the coefficient of those interaction terms.

My questions are:

1. Should I use the command xtgls for running the regression? I have read that this is the case for panels with T>N, but I'm not sure if it can be used with fixed effects by including country and year dummies.

2. I have run the heteroskedasticity test and concluded that it's present, but could not test for autocorrelation as it seems that xtserial can not work with factor variables, is the result the same if I test by removing the interaction terms? In that case, there is autocorrelation as well

>xtgls OVER_SPREADCH RATECHANGE HHI POP_AGE TER_EDUC LOG_INC GBONDSP c.HHI#c.RATECHANGE c.POP_AGE#c.RATECHANGE c.TER_EDUC#c.RATECHANGE c.LOG_INC#c.RATECHANGE, panels(hetero) igls

>estimates store hetero

>xtgls OVER_SPREADCH RATECHANGE HHI POP_AGE TER_EDUC LOG_INC GBONDSP c.HHI#c.RATECHANGE c.POP_AGE#c.RATECHANGE c.TER_EDUC#c.RATECHANGE c.LOG_INC#c.RATECHANGE, igls

>estimates store homo

>local df=e(N_g)-1

>lrtest hetero homo , df(`df')

3. Then I tried to test for fe vs re with -xtoverid- given heteroskedasticity, but the command does not work with/out the interaction terms. Is there a way I can test whether I should include year and country dummies to control for fixed effects? I tried:

> xtreg OVER_SPREADCH RATECHANGE HHI POP_AGE TER_EDUC LOG_INC GBONDSP,re vce(robust)

> xtoverid

Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS

I have as well tried xttest0 and the hausman test with xtreg, which I know they might not be suitable given my panel charateristics. However, what I obtained is that, when including the interaction terms, the results favor re and even simple OLS; but if I exclude the factor variables, fe is favoured. Does this suggest anything?

4. And the last question, I have also test for cross-sectional dependence using -xttest2- and -xtcsd, pesaran abs-, after -xtreg-, and results suggest cross-sectional dependence, can I conclude that this is also true even if I later decide to use xtgls?

Many thanks in advance for spending your time reading my post!

Kind regards,

Linna

I am writing my bachelor thesis and need to do some econometric research with stata. I've been reading posts but still struggling on finding out how to correctly run my regression

I would be really grateful if you could give me some advice on how to procede

I am running a panel regression with T>N, I have 19 countries and 180 periods with monthly observations from 2003-2018. (Some independent variables are yearly data though but I have adjusted them to monthly)

My goal is to find out whether market concentration and population variables impact the effect of a change in monetary policy on the change in deposit rates. So my final regression is:

Dependent variable = OVER_SPREADCH // the change in deposit rates

Independent variables = RATECHANGE // the change in Central Bank interest rate

+ continuous control variables= HHI POP_AGE TER_EDUC LOG_INC GBONDSP

+ interaction terms= c.HHI#c.RATECHANGE c.POP_AGE#c.RATECHANGE c.TER_EDUC#c.RATECHANGE c.LOG_INC#c.RATECHANGE

And my interest is placed on the coefficient of those interaction terms.

My questions are:

1. Should I use the command xtgls for running the regression? I have read that this is the case for panels with T>N, but I'm not sure if it can be used with fixed effects by including country and year dummies.

2. I have run the heteroskedasticity test and concluded that it's present, but could not test for autocorrelation as it seems that xtserial can not work with factor variables, is the result the same if I test by removing the interaction terms? In that case, there is autocorrelation as well

>xtgls OVER_SPREADCH RATECHANGE HHI POP_AGE TER_EDUC LOG_INC GBONDSP c.HHI#c.RATECHANGE c.POP_AGE#c.RATECHANGE c.TER_EDUC#c.RATECHANGE c.LOG_INC#c.RATECHANGE, panels(hetero) igls

>estimates store hetero

>xtgls OVER_SPREADCH RATECHANGE HHI POP_AGE TER_EDUC LOG_INC GBONDSP c.HHI#c.RATECHANGE c.POP_AGE#c.RATECHANGE c.TER_EDUC#c.RATECHANGE c.LOG_INC#c.RATECHANGE, igls

>estimates store homo

>local df=e(N_g)-1

>lrtest hetero homo , df(`df')

3. Then I tried to test for fe vs re with -xtoverid- given heteroskedasticity, but the command does not work with/out the interaction terms. Is there a way I can test whether I should include year and country dummies to control for fixed effects? I tried:

> xtreg OVER_SPREADCH RATECHANGE HHI POP_AGE TER_EDUC LOG_INC GBONDSP,re vce(robust)

> xtoverid

Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS

I have as well tried xttest0 and the hausman test with xtreg, which I know they might not be suitable given my panel charateristics. However, what I obtained is that, when including the interaction terms, the results favor re and even simple OLS; but if I exclude the factor variables, fe is favoured. Does this suggest anything?

4. And the last question, I have also test for cross-sectional dependence using -xttest2- and -xtcsd, pesaran abs-, after -xtreg-, and results suggest cross-sectional dependence, can I conclude that this is also true even if I later decide to use xtgls?

Many thanks in advance for spending your time reading my post!

Kind regards,

Linna

## Comment