Announcement

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

  • Test the non-linearity relationship between dependent variables and predictors

    Dear All,

    Please , i would like test the non-linear relationship between the dependent variable and predictors ( in my example (panel data) , the relation between stability measure of banks (Z-score) and Loan growth given that the loan growth square was significant in the model ) . witch test in STATA should i use to confirm this results ?

    Best Regards,
    Mouldi

  • #2
    Hi Mouldi,

    There are several approaches you could use to test whether a non-linear transformation is a better representation of the relationship between a predictor and an outcome. First, you should use your knowledge of the substantive area to justify the possibility of the non-linear relationship. In the absence of strong content knowledge, visualizing the raw data may help to indicate potential functional forms. Using the auto data in Stata, for example:
    Code:
    sysuse auto
    
    scatter weight length
    Next, perhaps we think a squared relationship might be worth investigating (even though the scatter may not strongly suggest it...)

    Code:
    generate length_sq = length ^ 2
    
    regress weight length length_sq
    Using the Wald-based P-value we can see the squared term is not significant, this is some level of evidence but may not be the most statistically rigorous. So lets do a likelihood-ratio test (LRT) to test how the model with the extra squared term compares to the linear-only nested model.

    Code:
    regress weight length
    estimates store linear
    
    regress weight length length_sq
    lrtest linear .
    The P-value from the LRT seems to suggest that the more complex model (with the squared term included and using one more degree of freedom) does not fit the model significantly better based on comparing nested likelihoods.

    Of course, even though we may have ruled-out a quadratic relationship, we have not yet satisfactorily ruled-out other functional forms (e.g. cubic, etc.). We could continue to test these in a similar fashion or we could try other non-linear approaches (e.g. fractional polynomials, splines, etc.)
    Last edited by Matt Warkentin; 23 Oct 2018, 10:16.

    Comment


    • #3
      Thank you Matt Warkentin for quick response , i found this output :

      Likelihood-ratio test LR chi2(1) = 925.81
      (Assumption: linear nested in .) Prob > chi2 = 0.0000

      means we reject the linearity hypothesis and conclude the non-linear relationship ?

      Thank you

      Comment


      • #4
        Hi Mouldi,

        Yes, based only on the output you have provided here, you would conclude that the model that includes the linear + squared terms fits significantly better than the model containing only the linear term (i.e. the non-linear relationship fits better).

        Comment


        • #5
          Thank you very much for valuable help

          Comment

          Working...
          X