factor_analyzer.confirmatory_factor_analyzer.ModelSpecification
factor_analyzer.confirmatory_factor_analyzer.ModelSpecification(
loadings,
n_factors,
n_variables,
factor_names=None,
variable_names=None,
)Encapsulate the model specification for CFA.
This class contains a number of specification properties that are used in the CFA procedure.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| loadings | array - like |
The factor loadings specification. | required |
| n_factors | int | The number of factors. | required |
| n_variables | int | The number of variables. | required |
| factor_names | list of str | A list of factor names, if available. Defaults to None. |
None |
| variable_names | list of str | A list of variable names, if available. Defaults to None. |
None |
Attributes
| Name | Description |
|---|---|
| error_vars | Get the error variance specification. |
| error_vars_free | Get the indices of “free” error variance parameters. |
| factor_covs | Get the factor covariance specification. |
| factor_covs_free | Get the indices of “free” factor covariance parameters. |
| factor_names | Get list of factor names, if available. |
| loadings | Get the factor loadings specification. |
| loadings_free | Get the indices of “free” factor loading parameters. |
| n_factors | Get the number of factors. |
| n_lower_diag | Get the lower diagonal of the factor covariance matrix. |
| n_variables | Get the number of variables. |
| variable_names | Get list of variable names, if available. |
Methods
| Name | Description |
|---|---|
| copy | Return a copy of the model specification. |
| get_model_specification_as_dict | Get the model specification as a dictionary. |
copy
factor_analyzer.confirmatory_factor_analyzer.ModelSpecification.copy()Return a copy of the model specification.
get_model_specification_as_dict
factor_analyzer.confirmatory_factor_analyzer.ModelSpecification.get_model_specification_as_dict(
)Get the model specification as a dictionary.
Returns
| Name | Type | Description |
|---|---|---|
| model_specification | dict | The model specification keys and values, as a dictionary. |