NKnotsTest: Test of functional form assumption using B-splines

Description Usage Arguments Value Author(s) Examples

View source: R/DAMisc_functions.R

Description

Estimate hypothesis test of lower- and higher-order non-linear relationships against an assumed target relationship.

Usage

1
2
    NKnotsTest(form, var, data, targetdf=1, degree=3, min.knots=1, 
       max.knots=10, adjust="none")

Arguments

form

A formula detailing the model for which smoothing is to be evaluated.

var

A character string identifying the variable for which smoothing is to be evaluated.

data

Data frame providing values of all variables in form.

targetdf

The assumed degrees of freedom against which the tests will be conducted.

degree

Degree of polynomial in B-spline basis functions.

min.knots

Minimum number of internal B-spline knots to be evaluated.

max.knots

Maximum number of internal B-spline knots to be evaluated.

adjust

Method by which p-values will be adjusted (see p.adjust)

Value

A matrix with F statistics, numerator and denominator DF and p-values for all required tests.

Author(s)

Dave Armstrong (UW-Milwaukee, Department of Political Science)

Examples

1
2
library(car)
NKnotsTest(prestige ~ education + type, var="income", data=na.omit(Prestige), targetdf=3)

DAMisc documentation built on May 30, 2017, 8:12 a.m.