# MINTregression: MINTregression In IndepTest: Nonparametric Independence Tests Based on Entropy Estimation

## Description

Performs a goodness-of-fit test of a linear model by testing whether the errors are independent of the covariates.

## Usage

 1 MINTregression(x, y, k, keps, w = FALSE, eps) 

## Arguments

 x The n \times p design matrix. y The response vector of length n. k The value of k to be used for estimation of the joint entropy H(X,ε). keps The value of k to be used for estimation of the marginal entropy H(ε). w The weight vector to be used for estimation of the joint entropy H(X,ε), with the same options as for the KLentropy function. eps A vector of null errors which should have the same distribution as the errors are assumed to have in the linear model.

## Value

The p-value corresponding the independence test carried out.

## References

\insertRef

2017arXiv171106642BIndepTest

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 # Correctly specified linear model x=runif(100,min=-1.5,max=1.5); y=x+rnorm(100) plot(lm(y~x),which=1) MINTregression(x,y,5,10,w=FALSE,rnorm(10000)) # Misspecified mean linear model x=runif(100,min=-1.5,max=1.5); y=x^3+rnorm(100) plot(lm(y~x),which=1) MINTregression(x,y,5,10,w=FALSE,rnorm(10000)) # Heteroscedastic linear model x=runif(100,min=-1.5,max=1.5); y=x+x*rnorm(100); plot(lm(y~x),which=1) MINTregression(x,y,5,10,w=FALSE,rnorm(10000)) # Multivariate misspecified mean linear model x=matrix(runif(1500,min=-1.5,max=1.5),ncol=3) y=x[,1]^3+0.3*x[,2]-0.3*x[,3]+rnorm(500) plot(lm(y~x),which=1) MINTregression(x,y,30,50,w=TRUE,rnorm(50000)) 

IndepTest documentation built on May 1, 2019, 10:24 p.m.