Learn R Programming

FAiR (version 0.2-0)

make_restrictions: Make an object of class "restrictions"

Description

This function is a constructor for objects that are of class "restrictions" or that inherit from "restrictions". Rarely would a user call this function directly, since it is called by Factanal in the usual case.

Usage

make_restrictions(factors, model, method, fixed, covmat, criteria = NULL)

Arguments

factors
The number (>0) of factors to be fitted, which differs from the argument in factanal in that factors can be a numeric vector of length two to indicate the number of factors to ext
model
A character string indicating "SEFA", "EFA", or "CFA" to indicate whether a semi-exploratory, an exploratory, or a confirmatory factor analysis model should be estimated. Defaults to "SEFA".
method
A character string indicating "MLE" or "YWLS" to indicate how the model should be estimated. Defaults to "MLE". The "YWLS" option uses Yates' (1987) weighted-least squares criterion as opposed to most of the weighted-least squa
fixed
An optional matrix or list of two matrices that specifies the values of certain coefficients. Unrestricted coefficients should be denoted by NA. If fixed is a matrix, it should have rows equal to the number of outc
covmat
A covariance matrix, or a covariance list as returned by cov.wt or similar. It should have row and column names.
criteria
An optional list whose elements should be functions or character strings that name functions to be used as criteria during the lexical optimization when model != "EFA". It is almost always best to leave this a

Value

  • Returns an object of class "restrictions" or that inherits from class "restrictions". This object would then be passed to the restrictions argument of Factanal.

Details

This function is essential but it is called internally by Factanal when the restrictions argument of Factanal is not specified. Thus, a typical user would never need to call this function directly. It is somewhat convenient when conducting simulations or debugging, in the sense that the appropriate object can be created once and then passed repeatedly to the restrictions argument of Factanal to avoid having to repeatedly answer the questions in the pop-up menus.

See Also

Factanal and restrictions-class

Examples

Run this code
res <- make_restrictions(covmat = Harman74.cor) # answer pop-up questions
    show(res)

Run the code above in your browser using DataLab