[ /METHOD = @{CORRELATION, COVARIANCE@} ]
+ [ /ANALYSIS=@var{var_list} ]
+
[ /EXTRACTION=@{PC, PAF@}]
[ /ROTATION=@{VARIMAX, EQUAMAX, QUARTIMAX, PROMAX[(@var{k})], NOROTATE@}]
The @cmd{FACTOR} command performs Factor Analysis or Principal Axis Factoring on a dataset. It may be used to find
common factors in the data or for data reduction purposes.
-The @subcmd{VARIABLES} subcommand is required. It lists the variables which are to partake in the analysis.
+The @subcmd{VARIABLES} subcommand is required. It lists the variables
+which are to partake in the analysis. (The @subcmd{ANALYSIS}
+subcommand may optionally further limit the variables that
+participate; it is not useful and implemented only for compatibility.)
The @subcmd{/EXTRACTION} subcommand is used to specify the way in which factors (components) are extracted from the data.
If @subcmd{PC} is specified, then Principal Components Analysis is used.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011, 2012, 2014, 2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
lex_match (lexer, T_SLASH);
- if (lex_match_id (lexer, "PLOT"))
+ if (lex_match_id (lexer, "ANALYSIS"))
+ {
+ struct const_var_set *vs;
+ const struct variable **vars;
+ size_t n_vars;
+ bool ok;
+
+ lex_match (lexer, T_EQUALS);
+
+ vs = const_var_set_create_from_array (factor.vars, factor.n_vars);
+ ok = parse_const_var_set_vars (lexer, vs, &vars, &n_vars,
+ PV_NO_DUPLICATE | PV_NUMERIC);
+ const_var_set_destroy (vs);
+
+ if (!ok)
+ goto error;
+
+ free (factor.vars);
+ factor.vars = vars;
+ factor.n_vars = n_vars;
+ }
+ else if (lex_match_id (lexer, "PLOT"))
{
lex_match (lexer, T_EQUALS);
while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH)
factor
/variables question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24
+ /analysis all
/print univariate det correlation
/format blank(.30)
/plot eigen
end data.
factor
- /variables read write math science socst
+ /variables read write math science socst
+ /analysis read write math science socst
/extraction pc
/plot eigen
/criteria mineigen (.557)