# mlmWithCov: Uses covariance/correlation matrix to calculate multivariate... In dominanceanalysis: Dominance Analysis

## Description

Calculate R^2_{XY} and P^2_{YX} for multivariate regression Could be used with `dominanceAnalysis` to perform a multivariate dominance analysis without original data.

## Usage

 `1` ```mlmWithCov(f, x) ```

## Arguments

 `f` formula. Should use `cbind(y1,y2,...,yk)~x1+x2+..+xp` `x` correlation/covariance matrix

## Value

 `r.squared.xy` R^2_{XY} of the regression `p.squared.yx` P^2_{YX} of the regression `formula` formula provided as parameter `cov` covariance/correlation matrix provided as parameter

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```library(car) cor.m<-matrix(c( 1.0000000, 0.7951377, 0.2617168, 0.6720053, 0.3390278, 0.7951377, 1.0000000, 0.3341037, 0.5876337, 0.3404206, 0.2617168, 0.3341037, 1.0000000, 0.3703162, 0.2114153, 0.6720053, 0.5876337, 0.3703162, 1.0000000, 0.3548077, 0.3390278, 0.3404206, 0.2114153, 0.3548077, 1.0000000), 5,5, byrow = TRUE, dimnames = list( c("na","ss","SAT","PPVT","Raven"), c("na","ss","SAT","PPVT","Raven"))) lwith<-mlmWithCov(cbind(na,ss)~SAT+PPVT+Raven,cor.m) da<-dominanceAnalysis(lwith) print(da) summary(da) ```

### Example output

```Loading required package: carData

Dominance analysis
Predictors: SAT, PPVT, Raven
Fit-indices: r.squared.xy, p.squared.yx

* Fit index:  r.squared.xy
complete conditional  general
SAT
PPVT  SAT,Ravn    SAT,Ravn SAT,Ravn
Raven                           SAT

Average contribution:
PPVT Raven   SAT
0.371 0.065 0.058
* Fit index:  p.squared.yx
complete conditional  general
SAT
PPVT  SAT,Ravn    SAT,Ravn SAT,Ravn
Raven                           SAT

Average contribution:
PPVT Raven   SAT
0.189 0.033 0.033

* Fit index:  r.squared.xy

Average contribution of each variable:

PPVT Raven   SAT
0.371 0.065 0.058

Dominance Analysis matrix:
model level   fit   SAT  PPVT Raven
1     0     0 0.112 0.459 0.129
SAT     1 0.112       0.368 0.088
PPVT     1 0.459  0.02       0.017
Raven     1 0.129 0.071 0.348
Average level 1     1       0.046 0.358 0.053
SAT+PPVT     2 0.479             0.015
SAT+Raven     2   0.2       0.294
PPVT+Raven     2 0.477 0.018
Average level 2     2       0.018 0.294 0.015
SAT+PPVT+Raven     3 0.494

* Fit index:  p.squared.yx

Average contribution of each variable:

PPVT Raven   SAT
0.189 0.033 0.033

Dominance Analysis matrix:
model level   fit   SAT  PPVT Raven
1     0     0 0.056  0.23 0.064
SAT     1 0.056       0.192 0.045
PPVT     1  0.23 0.018        0.01
Raven     1 0.064 0.036 0.175
Average level 1     1       0.027 0.184 0.027
SAT+PPVT     2 0.248             0.008
SAT+Raven     2 0.101       0.155
PPVT+Raven     2  0.24 0.016
Average level 2     2       0.016 0.155 0.008
SAT+PPVT+Raven     3 0.256
```

dominanceanalysis documentation built on Jan. 13, 2021, 3:47 p.m.