manifest-class: Class "manifest"

Description Details Objects from the Class Slots Methods Author(s) See Also Examples

Description

It is not necessary to understand this help page if one merely wants to estimate a factor analysis model. This help page is intended for those who want to modify or extend FAiR or otherwise want some idea of how FAiR works “behind the scenes”.

This class contains information in its slots about the left-hand side of a factor analysis model.

Details

In the future, the advantages of formal S4 classes will be exploited more fully. For example, to include a new model in FAiR, the first step might be to define a a new class that extends "manifest" if necessary. Then, appropriate methods for this class would need to be written. Here is a table of the class hierarchy:

Class Parent Class Comment
"manifest" none none (virtual class)
"manifest.basic" "manifest" Can be used for any model
"manifest.basic.userW" "manifest.basic" ADF with user-specified weight matrix
"manifest.data" "manifest.basic" Can be used for any model
"manifest.data.ordinal" "manifest.data" Used when some variables are ordinal
"manifest.data.ranks" "manifest.data" Used when variables are converted to their ranks
"manifest.data.mcd" "manifest.data" Can be used for any model

Objects from the Class

Objects can be created by calls of the form new("manifest", ...). However, it is not recommended to do so in normal usage since make_manifest provides the constructor for users.

Slots

The "manifest" is virtual and has the following slots:

n.obs

An integer indicating the number of observations.

how

A character string indicating how the covariance matrix among the manifest variables was calculated.

call

The call to make_manifest.

An object of class "manifest.basic" inherits from the "manifest" class and has five additional slots:

cov

A sample covariance matrix among manifest variables.

cor

A sample correlation matrix among manifest variables.

sds

A numeric vector containing the square root of the diagonal of the sample covariance matrix.

center

A numeric vector containing the mean of the manifest variables.

diag

A logical indicating whether the diagonal elements of the sample “covariance” matrix are all 1.0.

An object of class "manifest.data" inherits from the "manifest.basic" class and and has four additional slots:

X

A numeric matrix of manifest variables (unstandardized).

wt

A numeric vector whose length is the same as the number of rows in X indicating the weight of each observation in calculating the sample covariance matrix.

acov

An object of dsyMatrix-class from the Matrix package representing an asymptotic estimate of the fourth-order central moments of the data

An object of class "manifest.data.ordinal" inherits from the "manifest.data" but has no additional slots. It is used when some of the manifest variables are ordered factors. Likewise for the "manifest.data.ranks" class which has no additional slots and is used when Spearman correlations are calculated. An object of class "manifest.data.mcd" inherits from the "manifest.data" class and has one additional slot, CovMcd, which is an object of CovMcd-class that is defined in the rrcov package.

Methods

Technically, "manifest" is in the signature of all the model-fitting generic functions documented in S4GenericsFAiR and the same is true for make_restrictions However, at the moment those methods are only defined for the "manifest.basic" class. The following methods are defined for the "manifest.basic" class, but some of them are also defined for inherited classes if their behavior needs to differ in small ways.

cormat

signature(object = "manifest.basic")

model.matrix

signature(object = "manifest.basic"), which also has a standardized = TRUE argument that controls whether the sample correlation matrix or sample covariance matrix is extracted

show

signature(object = "manifest.basic")

plot

signature(x = "manifest.basic", y = "ANY")

screeplot

signature(x = "manifest.basic")

Author(s)

Ben Goodrich

See Also

make_manifest and S4GenericsFAiR

Examples

1
2
3
4
5
6
7
8
showClass("manifest")
showClass("manifest.basic")
showClass("manifest.data")
showClass("manifest.data.mcd")
man <- make_manifest(covmat = Harman74.cor)
show(man)
plot(man)
str(man)

FAiR documentation built on May 29, 2017, 6:08 p.m.