testNL: Test Transformations and Polynomials in Non-linear Models

testNLR Documentation

Test Transformations and Polynomials in Non-linear Models

Description

Tests for model improvements for non-linear transformations and polynomials with Clarke's (2007) distribution-free test for non-nested models.

Usage

testNL(obj, var, transPower, polyOrder, plot = FALSE, ...)

## S3 method for class 'glm'
testNL(obj, var, transPower, polyOrder, plot = FALSE, ...)

## S3 method for class 'lm'
testNL(obj, var, transPower, polyOrder, plot = FALSE, ...)

Arguments

obj

Object of a supported class in which non-linear functional forms will be tested.

var

String giving name of variable to be tested.

transPower

The power used in the transformation. For transformations in the range (-0.01, 0.01), the log transformation is used.

polyOrder

The order of the polynomial to be used.

plot

Logical indicating whether the effects should be plotted

...

Currently not implemented.

Details

Three hypotheses are tested with this function. The first is whether the original specification is preferred to the power transformation. The second is whether the original specification is preferred to the polynomial model. The third is whether the power transformation is preferred to the polynomial model. All tests are done with the Clarke test.

Value

A plot or a data frame giving the results of the tests identified above.

Author(s)

Dave Armstrong

References

Kevin Clarke. 2007. "A Simple Distribution-Free Test for Nonnested Hypotheses." Political Analysis 15(3): 347–363.


davidaarmstrong/damisc documentation built on Oct. 1, 2023, 3:05 p.m.