cov.biplot: The covariance biplot

Description Usage Arguments Value Author(s) Examples

View source: R/AllFunctions.R

Description

Takes in a set of predictor variables and a set of response variables and produces a covariance biplot.

Usage

1
cov.biplot(X, Y, ...)

Arguments

X

A (NxP) predictor matrix

Y

A (NxM) response matrix

...

Other arguments. Currently ignored

Value

The covariance biplot of X and Y

Author(s)

Opeoluwa F. Oyedele and Sugnet Gardner-Lubbe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
if(require(pls))
data(oliveoil, package="pls")
X = as.matrix(oliveoil$chemical, ncol=5)
dimnames(X) = list(paste(c("G1","G2","G3","G4","G5","I1","I2","I3","I4",
"I5","S1","S2","S3","S4","S5","S6")),
paste(c("Acidity","Peroxide","K232","K270","DK")))
Y = as.matrix(oliveoil$sensory, ncol=6)
dimnames(Y) = list(paste(c("G1","G2","G3","G4","G5","I1","I2","I3","I4",
"I5","S1","S2","S3","S4","S5","S6")),
paste(c("Yellow","Green","Brown","Glossy","Transp","Syrup")))
cov.biplot(X, Y)

#cocktail data
if(require(SensoMineR))
data(cocktail, package="SensoMineR")
X3 = as.matrix(compo.cocktail, ncol=4)
Y3 = as.matrix(senso.cocktail, ncol=13)
cov.biplot(X3,Y3)

Example output

Loading required package: pls

Attaching package: 'pls'

The following object is masked from 'package:stats':

    loadings

$G__UDhalf
         Comp 1  Comp 2 
Acidity    0.358   0.686
Peroxide   0.887  -0.387
K232       0.932  -0.196
K270       0.833   0.179
DK         0.510   0.256

$H__VDhalf
       Comp 1  Comp 2 
Yellow  -0.655 -0.3629
Green    0.600  0.4439
Brown    0.662 -0.6107
Glossy  -0.735  0.0220
Transp  -0.688 -0.0956
Syrup    0.705 -0.2115

Loading required package: SensoMineR
Loading required package: FactoMineR
$G__UDhalf
       Comp 1  Comp 2 
orange -1.0729  -0.664
banana  1.1504  -0.124
mango   0.0747   0.596
lemon  -0.6981   0.879

$H__VDhalf
                Comp 1  Comp 2 
color.intensity -0.0728  0.0238
odor.intensity   0.3269  0.4546
odor.orange     -0.6048 -0.3758
odor.banana      0.6248 -0.0470
odor.mango      -0.2929  0.4541
odor.lemon      -0.1862  0.6782
strongness      -0.3973  0.4408
sweet            0.6166  0.0742
acidity         -0.5540  0.2462
bitterness      -0.5580  0.0321
persistence     -0.2308  0.4331
pulp             0.5740  0.2618
thickness        0.6633  0.2228

PLSbiplot1 documentation built on May 2, 2019, 9:41 a.m.