## Example
## We wish to compute the bounds between the Speed factor from the
## Holzinger (H) and Swineford data and a hypothetical external
## variable, Y.
## RH = R matrix for *H*olzinger Swineford data
RH <-
matrix(c( 1.00, 0, 0, 0, 0, 0,
.73, 1.00, 0, 0, 0, 0,
.70, .72, 1.00, 0, 0, 0,
.17, .10, .12, 1.00, 0, 0,
.11, .14, .15, .49, 1.00, 0,
.21, .23, .21, .34, .45, 1.00), 6, 6)
RH <- RH + t(RH) - diag(6)
RX <- RH[4:6, 4:6]
## S-C = Straight-curved
colnames(RX) <- rownames(RX) <-
c("Addition", "Counting dots", "S-C capitals")
print( RX, digits = 2 )
## Extract 1 MLE factor
fout <- faMain(R = RX,
numFactors = 1,
facMethod = "faml",
rotate="none")
## Lambda = factor loadings matrix
Lambda <- fout$loadings
print( Lambda, digits = 3 )
## rXY = correlations between the factor indicators (X) and
## the external variable (Y)
rXY = c(.1, .2, .3)
# Assume that the reliability of Y = .75
faBounds(Lambda, RX, rXY, alphaY = .75)
Run the code above in your browser using DataLab