make_restrictions {FAiR}R Documentation

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 extract at level one and level two of a two-level semi-exploratory or confirmatory factor analysis model. If a single number, make_restrictions will ask whether to estimate a second level if appropriate.
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 squares criteria that are usually mentioned in the factor analysis literature.
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 outcome variables and columns equal to the number of factors at level one. If fixed is a list of two two matrices, the first element of the list corresponds to the coefficient matrix at level one and the second element corresponds to the coefficient matrix at level two (and should have rows equal to the number of first-order factors and columns equal to the number of second-order factors. By definition, providing fixed is inappropriate if model = "EFA", but fixed need not be supplied in any case. If appropriate, make_restrictions will prompt you about fixing coefficients to certain values with its pop-up menus.
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 argument unspecified to allow make_restrictions to prompt for these criteria.

If criteria is a list that includes character strings the strings should be one or more of "no_suppressors_xxx", "dets_xxx", or "cohyperplanarity" where "xxx" is either "1st" or "2nd" to indicate whether the criterion should be applied to the first or second level of the model. Thus, a suffix of "2nd" is only appropriate if a two-level model is estimated. The function implied by method is automatically appended to the end of this list to serve as the ultimate lexical criterion.

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.

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.

Author(s)

Ben Goodrich http://wiki.r-project.org/rwiki/doku.php?id=packages:cran:fair

See Also

Factanal and restrictions-class

Examples

  ## Not run: 
    res <- make_restrictions(covmat = Harman74.cor) # answer pop-up questions
    show(res)
  
## End(Not run)

[Package FAiR version 0.2-0 Index]