Description Usage Arguments Details Examples
Test linear and non-linear hypotheses of the coefficients of a fitted regression model.
1 |
... |
one or more (possibly non-linear) expressions |
Jointly tests that the (non-linear) expressions in ... are all equal to zero.
Use a variable name to refer to the coefficient associated with
that variable, for instance testnl(model, 2*age)
to test that
twice the coefficient associated with age is equal to zero.
Separate multiple expressions by commas, i.e. testnl(model, 2*age, motheduc^2)
.
For "weird" variable names, surround in backticks (see example).
1 2 3 4 5 6 7 8 9 10 11 12 | # fit a model with interations for illustration
use(datasets::mtcars)
regr(wt ~ hp * disp)
# first, test that hp = disp
testnl(hp - disp)
# then do a full f test (`hp:disp` is the interaction term)
testnl(hp, disp, `hp:disp`)
# if you want to test the intercept, it's called (Intercept)
testnl(sqrt(`(Intercept)`))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.