/* PSPP - a program for statistical analysis.
- Copyright (C) 2005, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010, 2011, 2012, 2013, 2014, 2016 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
if (lex_match_id (lexer, "DEPENDENT"))
{
- if (!lex_force_match (lexer, T_EQUALS))
- goto error;
+ lex_match (lexer, T_EQUALS);
free (regression.dep_vars);
regression.n_dep_vars = 0;
}
else if (lex_match_id (lexer, "STATISTICS"))
{
+ unsigned long statistics = 0;
lex_match (lexer, T_EQUALS);
while (lex_token (lexer) != T_ENDCMD
{
if (lex_match (lexer, T_ALL))
{
- regression.stats = ~0;
+ statistics = ~0;
}
else if (lex_match_id (lexer, "DEFAULTS"))
{
- regression.stats |= STATS_DEFAULT;
+ statistics |= STATS_DEFAULT;
}
else if (lex_match_id (lexer, "R"))
{
- regression.stats |= STATS_R;
+ statistics |= STATS_R;
}
else if (lex_match_id (lexer, "COEFF"))
{
- regression.stats |= STATS_COEFF;
+ statistics |= STATS_COEFF;
}
else if (lex_match_id (lexer, "ANOVA"))
{
- regression.stats |= STATS_ANOVA;
+ statistics |= STATS_ANOVA;
}
else if (lex_match_id (lexer, "BCOV"))
{
- regression.stats |= STATS_BCOV;
+ statistics |= STATS_BCOV;
}
else if (lex_match_id (lexer, "CI"))
{
- regression.stats |= STATS_CI;
+ statistics |= STATS_CI;
if (lex_match (lexer, T_LPAREN))
{
goto error;
}
}
+
+ if (statistics)
+ regression.stats = statistics;
+
}
else if (lex_match_id (lexer, "SAVE"))
{
workspace.pred_idx = -1;
workspace.writer = NULL;
workspace.reader = NULL;
+ workspace.residvars = NULL;
+ workspace.predvars = NULL;
if (save)
{
int i;
if (regression.resid)
{
- workspace.extras ++;
- workspace.res_idx = 0;
+ workspace.res_idx = workspace.extras ++;
workspace.residvars = xcalloc (regression.n_dep_vars, sizeof (*workspace.residvars));
for (i = 0; i < regression.n_dep_vars; ++i)
if (regression.pred)
{
- workspace.extras ++;
- workspace.pred_idx = 1;
+ workspace.pred_idx = workspace.extras ++;
workspace.predvars = xcalloc (regression.n_dep_vars, sizeof (*workspace.predvars));
for (i = 0; i < regression.n_dep_vars; ++i)
msg (SW, _("REGRESSION with SAVE ignores TEMPORARY. "
"Temporary transformations will be made permanent."));
+ if (dict_get_filter (dict))
+ msg (SW, _("REGRESSION with SAVE ignores FILTER. "
+ "All cases will be processed."));
+
workspace.writer = autopaging_writer_create (proto);
caseproto_unref (proto);
}
for (; (c = casereader_read (r)) != NULL; case_unref (c))
{
- struct ccase *outc = case_clone (c);
+ struct ccase *outc = case_create (casewriter_get_proto (ws->writer));
for (k = 0; k < cmd->n_dep_vars; k++)
{
const struct variable **vars = xnmalloc (cmd->n_vars, sizeof (*vars));
tab_double (t, 5, 1, 0, F, NULL, RC_OTHER);
- tab_double (t, 6, 1, 0, pval, NULL, RC_OTHER);
+ tab_double (t, 6, 1, 0, pval, NULL, RC_PVALUE);
tab_title (t, _("ANOVA (%s)"), var_to_string (var));
tab_submit (t);