Drop all possible single terms from a model using the partial correlation | R Documentation |
Drop all possible single terms from a model using the partial correlation.
cor.drop1(y, x, logged = FALSE)
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. |
This uses R's command drop1
and modifies it so as to calculate the p-value using Fisher's conditional independence test.
A matrix with two columns, the test statistic values and its associated p-value.
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
glm.bsreg, fbed.reg, mmpcbackphase
y <- rnorm(200) x <- matrix( rnorm(200 * 10), ncol = 10) cor.drop1(y, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.