Learn R Programming

psych (version 1.8.3.3)

residuals.psych: Extract residuals from various psych objects

Description

Residuals in the various psych functions are extracted and then may be "pretty" printed.

Usage

# S3 method for psych
residuals(object,diag=TRUE,...)
# S3 method for psych
resid(object,diag=TRUE,...)

Arguments

object

The object returned by a psych function.

diag

if FALSE, then convert the diagonal of the residuals to NA

...

Other parameters to be passed to residual (ignored but required by the generic function)

Value

residuals: a matrix of residual estimates

Details

Currently implemented for fa, principal, omega, irt.fa, and fa.extension.

Examples

Run this code
# NOT RUN {
f3 <- fa(Thurstone,3)
residuals(f3)
sum(residuals(f3)^2) #include diagonal
sum(residuals(f3,diag=FALSE)^2,na.rm=TRUE) #drop diagonal
# }

Run the code above in your browser using DataLab