Drop all possible single terms from a model using the partial correlation {MXM} | R Documentation |
Drop all possible single terms from a model using the partial correlation
Description
Drop all possible single terms from a model using the partial correlation.
Usage
cor.drop1(y, x, logged = FALSE)
Arguments
y |
A numerical vector with the response variable. |
x |
A numerical matrix or a data.frame with the predictor variables. If is is a matrix it is internally transformed into a data.frame form, hence the user is advised to supply a data.frame in order to save some time. If the number of columns (variables) is higher than the number of rows (observations) the function will simply not work. |
logged |
If you want the p-values be returned leave this FALSE. If it is TRUE their logarithm is returned. |
Details
This uses R's command drop1
and modifies it so as to calculate the p-value using Fisher's conditional independence test.
Value
A matrix with two columns, the test statistic values and its associated p-value.
Author(s)
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
See Also
glm.bsreg, fbed.reg, mmpcbackphase
Examples
y <- rnorm(200)
x <- matrix( rnorm(200 * 10), ncol = 10)
cor.drop1(y, x)