test.additivity: Testing Additivity in Nonparametric Regression

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/test.additivity.R

Description

test.additivity tests for additive model in nonparametric regression using mixed model representation and variance components testing.

Usage

1
2
3
test.additivity(x, y, type = "RLR", 
  nbasis = 10L, kernel = c("gaussian", "polynomial", "spline"),
  nsim = 5000L, seed = 130623L)

Arguments

x

design matrix. Each column should be scaled to have range within [0,1].

y

response vector.

type

RLR for restricted likelihood ratio test and generalized F-test

nbasis

number of basis functions in additive modeling.

kernel

reproducing kernel for non-additive modeling.

nsim

number of simulations from the null distribution.

seed

a seed to be set before simulating from the null distribution.

Value

A vector of test statistic and p-value.

Author(s)

Yichi Zhang

References

Zhang, Y., Staicu, A.-M., and Maity, A. (2016). Testing for additivity in non-parametric regression. Canadian Journal of Statistics, 44: 445-462. doi: 10.1002/cjs.11295

See Also

rlr.test

Examples

1
2
3
4
set.seed(20L)
x <- matrix(runif(200L), 100L, 2L)
y <- 4 * x[, 1L] * x[, 2L] + rnorm(100L)
test.additivity(x, y)

Example output

RLRT.stat.obs  RLRT.p.value  GFT.stat.obs   GFT.p.value 
     4.834003      0.020000      8.283858      0.073600 

lmeVarComp documentation built on May 2, 2019, 8:55 a.m.