test.data <- Harman74.cor$cov #24 mental variables
#choose 3 of them to regress against another 4 -- arbitrary choice of variables
summary(mat.regress(test.data,c(1,2,3),c(4,5,10,12),n.obs=213),digits=2) #choose the variables by number
mat.regress(test.data,c("VisualPerception", "Cubes","PaperFormBoard"),c("Flags","Addition")) #choose the variables by name
data(attitude)
mat.regress(attitude,c(1:3),c(4:7)) #standardized regression from raw data
Run the code above in your browser using DataCamp Workspace