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

Single terms deletion hypothesis testin in a linear regression model.

1 |

`y` |
The dependent variable, a numerical vector with numbers. |

`x` |
A numerical matrix with the indendent variables. We add, internally, the first column of ones. |

`type` |
If you want to perform the usual F (or t) test set this equal to "F". For the test based on the partial correlation set this equal to "cor". |

This is the same function as R's built in drop1 that it works with the F test or the partial correlation coefficient. For the linear regression model, the Wald test is equivalent to the partial F test. So, instead of performing many regression models with single term deletions we perform one regression model with all variables and compute their Wald test effectively. Note, that this is true, only if the design matrix "x" contains the vectors of ones and in our case this must be, strictly, the first column. The second option is to compute the p-value of the partial correlation.

A matrix with two columns. The test statistic and its associated pvalue for each independent variable.

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>

Hastie T., Tibshirani R. and Friedman J. (2008). The Elements of Statistical Learning (2nd Ed.), Springer.

1 2 3 4 5 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.