`crssigtest`

implements a consistent test of significance of
an explanatory variable in a nonparametric regression setting that is
analogous to a simple *t*-test in a parametric regression
setting. The test is based on Ma and Racine (2011).

1 2 3 4 5 6 | ```
crssigtest(model = NULL,
index = NULL,
boot.num = 399,
boot.type = c("residual","reorder"),
random.seed = 42,
boot = TRUE)
``` |

`model` |
a |

`index` |
a vector of indices for the columns of |

`boot.num` |
an integer value specifying the number of bootstrap replications to
use. Defaults to |

`boot.type` |
whether to conduct ‘residual’ bootstrapping (iid) or permute (reorder) in place the predictor being tested when imposing the null. |

`random.seed` |
an integer used to seed R's random number generator. This is to ensure replicability. Defaults to 42. |

`boot` |
a logical value (default |

`crssigtest`

returns an object of type
`sigtest`

. `summary`

supports `sigtest`

objects. It has the following components:

`index` |
the vector of indices input |

`P` |
the vector of bootstrap P-values for each statistic in |

`P.asy` |
the vector of asymptotic P-values for each statistic in index |

`F` |
the vector of pseudo F-statistics |

`F.boot` |
the matrix of bootstrapped pseudo F-statistics
generated under the null (one column for each statistic in |

`df1` |
the vector of numerator degrees of freedom for each
statistic in |

`df2` |
the vector of denominator degrees of freedom for each
statistic in |

`rss` |
the vector of restricted sums of squared residuals for
each statistic in |

`uss` |
the vector of unrestricted sums of squared residuals for
each statistic in |

`boot.num` |
the number of bootstrap replications |

`boot.type` |
the |

`xnames` |
the names of the variables in |

This function should be considered to be in ‘beta status’ until further notice.

Caution: bootstrap methods are, by their nature, *computationally
intensive*. This can be frustrating for users possessing large
datasets. For exploratory purposes, you may wish to override the
default number of bootstrap replications, say, setting them to
`boot.num=99`

.

Jeffrey S. Racine racinej@mcmaster.ca

Li, Q. and J.S. Racine (2007), *Nonparametric Econometrics:
Theory and Practice,* Princeton University Press.

Ma, S. and J.S. Racine, (2011), “Inference for Regression Splines with Categorical and Continuous Predictors,” Working Paper.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
## Not run:
options(crs.messages=FALSE)
set.seed(42)
n <- 1000
z <- rbinom(n,1,.5)
x1 <- rnorm(n)
x2 <- runif(n,-2,2)
z <- factor(z)
## z is irrelevant
y <- x1 + x2 + rnorm(n)
model <- crs(y~x1+x2+z,complexity="degree",segments=c(1,1))
summary(model)
model.sigtest <- crssigtest(model)
summary(model.sigtest)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.