Last chance! 50% off unlimited learning
Sale ends in
mat.regress(m, x, y,n.obs=NULL)
ICLUST
, principal
), extract the clusters from these results (factor2cluster
), and then form the composite correlation matrix using cluster.cor
. The variables in this reduced matrix may then be used in multiple R procedures using mat.regress.Although the overall matrix can have missing correlations, the correlations in the subset of the matrix used for prediction must exist. If the number of observations is entered, then the conventional confidence intervals, statistical significance, and shrinkage estimates are reported. If the input matrix is rectangular, correlations are found from the data.
cluster.cor
, factor2cluster
,principal
,ICLUST
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 DataLab