/*
PSPP - a program for statistical analysis.
Copyright (C) 2012, 2013, 2016 Free Software Foundation, Inc.
/*
PSPP - a program for statistical analysis.
Copyright (C) 2012, 2013, 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
the Free Software Foundation, either version 3 of the License, or
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
the Free Software Foundation, either version 3 of the License, or
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
append_value_name (const struct variable *var, const union value *val, struct string *str)
{
var_append_value_name (var, val, str);
append_value_name (const struct variable *var, const union value *val, struct string *str)
{
var_append_value_name (var, val, str);
Minimum should alway equal mimima[0].val.
Likewise, maximum should alway equal maxima[0].val.
This redundancy exists as an optimisation effort.
Minimum should alway equal mimima[0].val.
Likewise, maximum should alway equal maxima[0].val.
This redundancy exists as an optimisation effort.
const struct variable *ivar = iact->vars[ivar_idx];
const int width = var_get_width (ivar);
const union value *val = case_data (c, ivar);
const struct variable *ivar = iact->vars[ivar_idx];
const int width = var_get_width (ivar);
const union value *val = case_data (c, ivar);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
ds_put_cstr (&label, var_to_string (ivar));
ds_put_cstr (&label, " = ");
append_value_name (ivar, val, &label);
ds_put_cstr (&label, var_to_string (ivar));
ds_put_cstr (&label, " = ");
append_value_name (ivar, val, &label);
struct exploratory_stats *es =
categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp);
struct exploratory_stats *es =
categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
ds_put_cstr (&label, var_to_string (ivar));
ds_put_cstr (&label, " = ");
append_value_name (ivar, val, &label);
ds_put_cstr (&label, "; ");
ds_put_cstr (&label, var_to_string (ivar));
ds_put_cstr (&label, " = ");
append_value_name (ivar, val, &label);
ds_put_cstr (&label, "; ");
interaction_to_string (iact, &label);
ds_put_cstr (&label, ")");
}
interaction_to_string (iact, &label);
ds_put_cstr (&label, ")");
}
sl = spreadlevel_plot_create (ds_cstr (&label), cmd->sl_power);
for (grp = 0; grp < n_cats; ++grp)
sl = spreadlevel_plot_create (ds_cstr (&label), cmd->sl_power);
for (grp = 0; grp < n_cats; ++grp)
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
{
const struct variable *ivar = iact->vars[ivar_idx];
const union value *val = case_data (c, ivar);
ds_put_cstr (&label, var_to_string (ivar));
ds_put_cstr (&label, " = ");
append_value_name (ivar, val, &label);
ds_put_cstr (&label, "; ");
ds_put_cstr (&label, var_to_string (ivar));
ds_put_cstr (&label, " = ");
append_value_name (ivar, val, &label);
ds_put_cstr (&label, "; ");
ds_cstr (&label), n, mean,
sqrt (var), false));
ds_cstr (&label), n, mean,
sqrt (var), false));
int ivar_idx;
if ( v > 0 )
tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var);
int ivar_idx;
if ( v > 0 )
tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var);
heading_rows + v * rows_per_var + i * rows_per_cat,
TAT_TITLE | TAB_LEFT,
gettext (ptile_alg_desc [cmd->pc_alg]));
heading_rows + v * rows_per_var + i * rows_per_cat,
TAT_TITLE | TAB_LEFT,
gettext (ptile_alg_desc [cmd->pc_alg]));
heading_rows + v * rows_per_var + i * rows_per_cat,
0,
percentile_calculate (es->percentiles[p], cmd->pc_alg),
NULL, RC_OTHER);
heading_rows + v * rows_per_var + i * rows_per_cat,
0,
percentile_calculate (es->percentiles[p], cmd->pc_alg),
NULL, RC_OTHER);
int ivar_idx;
if ( v > 0 )
tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var);
int ivar_idx;
if ( v > 0 )
tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var);
tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
tab_text (t, heading_columns, 0, TAB_CENTER | TAT_TITLE,
var_to_string (cmd->id_var));
else
tab_text (t, heading_columns, 0, TAB_CENTER | TAT_TITLE,
var_to_string (cmd->id_var));
else
int ivar_idx;
if ( v > 0 )
tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var);
int ivar_idx;
if ( v > 0 )
tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var);
heading_columns + 3,
heading_rows + n_cats * v + i,
0,
"%g%%",
100.0 * es[v].missing / total
);
heading_columns + 3,
heading_rows + n_cats * v + i,
0,
"%g%%",
100.0 * es[v].missing / total
);
if ( lex_match_variable (lexer, ex->dict, &v))
{
iact = interaction_create (v);
if ( lex_match_variable (lexer, ex->dict, &v))
{
iact = interaction_create (v);
const struct examine *examine = aux1;
struct exploratory_stats *es = pool_calloc (examine->pool, examine->n_dep_vars, sizeof (*es));
struct subcase ordering;
const struct examine *examine = aux1;
struct exploratory_stats *es = pool_calloc (examine->pool, examine->n_dep_vars, sizeof (*es));
struct subcase ordering;
struct ccase *outcase ;
const struct variable *var = examine->dep_vars[v];
const double x = case_data (c, var)->f;
struct ccase *outcase ;
const struct variable *var = examine->dep_vars[v];
const double x = case_data (c, var)->f;
if (var_is_value_missing (var, case_data (c, var), examine->dep_excl))
{
es[v].missing += weight;
if (var_is_value_missing (var, case_data (c, var), examine->dep_excl))
{
es[v].missing += weight;
case_data_idx (c, examine->id_idx), examine->id_width);
case_data_rw_idx (outcase, EX_WT)->f = weight;
case_data_idx (c, examine->id_idx), examine->id_width);
case_data_rw_idx (outcase, EX_WT)->f = weight;
const double val = case_data_idx (c, EX_VAL)->f;
double wt = case_data_idx (c, EX_WT)->f;
wt = var_force_valid_weight (examine->wv, wt, &warn);
const double val = case_data_idx (c, EX_VAL)->f;
double wt = case_data_idx (c, EX_WT)->f;
wt = var_force_valid_weight (examine->wv, wt, &warn);
struct order_stats *os;
moments_calculate (es[v].mom, &n, &mean, &var, NULL, NULL);
struct order_stats *os;
moments_calculate (es[v].mom, &n, &mean, &var, NULL, NULL);
cmd->wv, cmd->dep_excl, cmd->fctr_excl);
categoricals_set_payload (cmd->cats, &payload, cmd, NULL);
cmd->wv, cmd->dep_excl, cmd->fctr_excl);
categoricals_set_payload (cmd->cats, &payload, cmd, NULL);
}
else if (lex_match_id (lexer, "CINTERVAL"))
{
if ( !lex_force_num (lexer))
goto error;
}
else if (lex_match_id (lexer, "CINTERVAL"))
{
if ( !lex_force_num (lexer))
goto error;
grouper = casegrouper_create_splits (proc_open (ds), examine.dict);
while (casegrouper_get_next_group (grouper, &group))
run_examine (&examine, group);
grouper = casegrouper_create_splits (proc_open (ds), examine.dict);
while (casegrouper_get_next_group (grouper, &group))
run_examine (&examine, group);