For a regressor entered through a spline or polynomial basis whose span
contains the linear function (true for splines::ns(), splines::bs()
and poly()), linearity means the basis coefficients are proportional
to the coefficients a that reproduce x itself (x = c + B a). The
test is the joint Wald test of the q - 1 restrictions that the
coefficient vector is orthogonal to the complement of a, so it accepts
any covariance type, including cluster-robust ones. For a test of whether
the regressor matters at all, use jointtest() on its columns.
Arguments
- object
a
"panglm"fit- variable
name of the regressor
- vcov
NULL(the covariance stored on the fit) or a type passed tovcov.panglm()
Value
an object of class "panglm_jointtest", as returned by
jointtest().
Validation
The package tests check that the test rejects a nonlinear curve and keeps its size under linearity, and the fixed-effects likelihood-ratio statistic against the Wald statistic.
See also
Other tests:
jointtest(),
pandispersiontest(),
panhausman()