lmWithCov | R Documentation |
Calculate regression coefficients and R^2
for an OLS regression.
Could be used with dominanceAnalysis
to
perform a dominance analysis without the original data.
lmWithCov(f, x)
f |
formula for lm model |
x |
correlation/covariance matrix |
coef |
regression coefficients |
r.squared |
|
formula |
formula provided as parameter |
cov |
covariance/correlation matrix provided as parameter |
cov.m<-matrix(c(1,0.2,0.3, 0.2,1,0.5,0.3,0.5,1),3,3,
dimnames=list(c("x1","x2","y"),c("x1","x2","y")))
lm.cov<-lmWithCov(y~x1+x2,cov.m)
da<-dominanceAnalysis(lm.cov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.