residuals.psych.Rd
Residuals in the various psych functions are extracted and then may be "pretty" printed.
Currently implemented for fa
, principal
, omega
, irt.fa
, and fa.extension
.
residuals: a matrix of residual estimates
f3 <- fa(Thurstone,3)
residuals(f3)
#> Sntnc Vcblr Snt.C Frs.L F.L.W Sffxs Ltt.S Pdgrs Ltt.G
#> Sentences 0.18
#> Vocabulary 0.01 0.16
#> Sent.Completion 0.00 -0.01 0.26
#> First.Letters -0.01 0.00 0.01 0.27
#> Four.Letter.Words 0.01 0.00 0.00 0.00 0.37
#> Suffixes 0.00 0.00 0.00 0.00 0.00 0.50
#> Letter.Series 0.00 0.01 -0.01 0.01 -0.01 0.00 0.27
#> Pedigrees -0.01 0.00 0.02 0.00 0.00 0.01 0.00 0.49
#> Letter.Group 0.01 -0.01 0.00 0.00 0.01 0.00 0.00 0.00 0.48
sum(residuals(f3)^2) #include diagonal
#> [1] 1.142454
sum(residuals(f3,diag=FALSE)^2,na.rm=TRUE) #drop diagonal
#> [1] 0.002456811