rcontrib.data.frame {growthPheno} | R Documentation |
Computes a measure of how correlated each variable in a set is with the other variable, conditional on a nominated subset of them
Description
A measure of how correlated a variable is with those in a set is given by the
square root of the sum of squares of the correlation coefficients between the
variables and the other variables in the set (Cumming and Wooff, 2007). Here, the partial
correlation between the subset of the variables listed in response
that
are not listed in include
is calculated from the partial correlation matrix
for the subset, adjusting for those variables in include
. This is useful
for manually deciding which of the variables not in include
should next be
added to it.
Usage
## S3 method for class 'data.frame'
rcontrib(obj, responses, include = NULL, ...)
Arguments
obj |
A |
responses |
A |
include |
A |
... |
allows passing of arguments to other functions. |
Value
A numeric
giving the correlation measures.
Author(s)
Chris Brien
References
Cumming, J. A. and D. A. Wooff (2007) Dimension reduction via principal variables. Computational Statistics and Data Analysis, 52, 550–565.
See Also
rcontrib
, rcontrib.matrix
, PVA
, intervalPVA.data.frame
Examples
data(exampleData)
longi.dat <- prepImageData(data=raw.dat, smarthouse.lev=1)
longi.dat <- within(longi.dat,
{
Max.Height <- pmax(Max.Dist.Above.Horizon.Line.SV1,
Max.Dist.Above.Horizon.Line.SV2)
Density <- PSA/Max.Height
PSA.SV = (PSA.SV1 + PSA.SV2) / 2
Image.Biomass = PSA.SV * (PSA.TV^0.5)
Centre.Mass <- (Center.Of.Mass.Y.SV1 + Center.Of.Mass.Y.SV2) / 2
Compactness.SV = (Compactness.SV1 + Compactness.SV2) / 2
})
responses <- c("PSA","PSA.SV","PSA.TV", "Image.Biomass", "Max.Height","Centre.Mass",
"Density", "Compactness.TV", "Compactness.SV")
h <- rcontrib(longi.dat, responses, include = "PSA")