Dear all,
I am using STATA 14.2 and would like to use xtreg,fe since the Hausman test recommended me to use fixed effects.
First I tested my variables for linearity with -nlcheck-. Here, one moderator (VOR) and two of my control variables (HGS and BFFA) were significant, indicating a violation of the linearity assumption.
Additionally, I plotted the linearity assumption to check the p-values of the previous test.



The control variable BFFA is already log-transformed.
From my point of view, there is definitely a violation of the linearity assumption for these three variables. Now to my questions:
1) I have read here in the forum that one can get around the violation of the linearity assumption by integrating an additional squared term of the corresponding variable. Is this possible even though this is a moderator? Would the following regressions be properly formulated in that case?
2) Does the violation of the linearity assumption by control variables matter at all or does the linearity assumption only matter for predictor variables.
Thanks a lot for your help!
I am using STATA 14.2 and would like to use xtreg,fe since the Hausman test recommended me to use fixed effects.
First I tested my variables for linearity with -nlcheck-. Here, one moderator (VOR) and two of my control variables (HGS and BFFA) were significant, indicating a violation of the linearity assumption.
Code:
quietly xtreg c.TER c.ARMQ c.VOR c.REVEN SUER c.HGS c.AVGG c.BFFA c.RIST,fe nlcheck VOR Nonlinearity test: F( 9, 818) = 3.59 Prob > F = 0.0002 nlcheck HGS Nonlinearity test: F( 9, 818) = 5.86 Prob > F = 0.0000 nlcheck BFFA Nonlinearity test: F( 9, 818) = 1.96 Prob > F = 0.0406
Code:
acprplot VOR, lowess
Code:
acprplot HGS, lowess
Code:
acprplot BFFA , lowess
The control variable BFFA is already log-transformed.
From my point of view, there is definitely a violation of the linearity assumption for these three variables. Now to my questions:
1) I have read here in the forum that one can get around the violation of the linearity assumption by integrating an additional squared term of the corresponding variable. Is this possible even though this is a moderator? Would the following regressions be properly formulated in that case?
Code:
quietly xtreg c.TER c.ARMQ c.VOR c.VOR^2 c.REVEN SUER c.HGS c.AVGG c.BFFA c.RIST,fe quietly xtreg c.TER c.ARMQ##c.VOR c.ARMQ##c.VOR^2 c.REVEN SUER c.HGS c.AVGG c.BFFA c.RIST,fe
Thanks a lot for your help!