mlmWithCov: Uses covariance/correlation matrix to calculate multivariate...

View source: R/mlmWithCov.r

mlmWithCovR Documentation

Uses covariance/correlation matrix to calculate multivariate index of fit

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

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

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)

clbustos/dominanceAnalysis documentation built on March 8, 2024, 5:22 a.m.