Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with linearity and transformation in xtreg

    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.

    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
    Additionally, I plotted the linearity assumption to check the p-values of the previous test.

    Code:
    acprplot VOR, lowess
    Click image for larger version

Name:	VOR.png
Views:	1
Size:	25.7 KB
ID:	1649199

    Code:
    acprplot HGS, lowess
    Click image for larger version

Name:	HGS.png
Views:	1
Size:	23.8 KB
ID:	1649200


    Code:
    acprplot BFFA , lowess
    Click image for larger version

Name:	BFFA.png
Views:	1
Size:	16.9 KB
ID:	1649201

    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
    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!
Working...
X