mod.MMLR: Multivariate Multiple Linear Regression (MMLR)

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 gives the MMLR parameters.

Usage

1
mod.MMLR(X, Y, ...)

Arguments

X

A (NxP) predictor matrix

Y

A (NxM) response matrix

...

Other arguments. Currently ignored

Value

The MMLR parameters

Author(s)

Opeoluwa F. Oyedele and Sugnet Gardner-Lubbe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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")))
mod.MMLR(X, Y)

Example output

Loading required package: pls

Attaching package: 'pls'

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

    loadings

$Y.hat
     Yellow     Green     Brown   Glossy   Transp    Syrup
G1 26.73104 64.990130  8.081694 76.27441 71.39310 48.38923
G2 53.71428 28.263314 13.465701 82.52604 80.77868 47.55520
G3 49.12644 32.876899 11.633693 83.73030 82.01464 46.98400
G4 25.45242 64.555192 13.358243 78.88542 73.58094 48.88108
G5 48.11360 39.445618  7.921333 82.40396 78.99941 46.77680
I1 40.14791 45.175529 19.000729 73.84847 70.26410 51.03603
I2 51.21702 32.849514 14.216723 78.05777 75.52457 48.99943
I3 50.11115 34.734852 16.652237 75.83587 72.16004 50.70755
I4 50.64475 32.348609 12.792545 77.81991 74.73071 50.04229
I5 29.03398 52.247847 24.066711 73.14531 69.62636 52.91547
S1 61.79647 22.059468 11.391972 85.44957 84.22324 45.29259
S2 64.92414 21.232679  7.371281 86.36883 85.75586 43.27491
S3 62.77607 19.685175  9.970428 82.93039 80.92721 47.46942
S4 64.45415 17.413109 10.117578 84.28728 83.21214 46.30877
S5 72.73259  9.857696  7.811744 86.46328 84.95644 45.76917
S6 63.02398 18.464369  9.447390 84.97319 82.95258 47.19806

$B.mmlr
               Yellow       Green        Brown      Glossy      Transp
Acidity   -51.0165658   51.291052   -6.4844173  -6.3617271 -11.7957129
Peroxide    0.6456279   -1.089654    0.9028607  -0.5271234  -0.7517657
K232      -46.1772571   39.189621    4.5381798 -11.0271994 -10.3817721
K270     -145.9986160  265.859946   56.4743276   9.8964176  -2.8016891
DK       1988.1100989 -764.195065 -649.9930327 -55.0042100 -49.4276490
                Syrup
Acidity     6.8397798
Peroxide    0.6378628
K232        5.3901349
K270      -38.3552852
DK       -489.8614420

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