set.cor(y, x,data, z=NULL,n.obs=NULL,use="pairwise")
mat.regress(y, x,data, z=NULL,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 is rectangular, correlations are found from the data. The print function reports t and p values for the beta weights, the summary function just reports the beta weights.
J. Cohen, P. Cohen, S.G. West, and L.S. Aiken. (2003) Applied multiple regression/correlation analysis for the behavioral sciences. L. Erlbaum Associates, Mahwah, N.J., 3rd ed edition.
cluster.cor
, factor2cluster
,principal
,ICLUST
set.cor(y=c(7:9),x=c(1:6),data=Thurstone,n.obs=213)
#now try partialling out some variables
set.cor(y=c(7:9),x=c(1:3),z=c(4:6),data=Thurstone) #compare with the previous
set.cor(x=c("gender","education"),y=c("SATV","SATQ"),data=sat.act) # regression from raw data
Run the code above in your browser using DataLab