grouper = casegrouper_create_splits (proc_open (ds), dict);
while (casegrouper_get_next_group (grouper, &group))
run_oneway (&oneway, group, ds);
grouper = casegrouper_create_splits (proc_open (ds), dict);
while (casegrouper_get_next_group (grouper, &group))
run_oneway (&oneway, group, ds);
static void postcalc (const struct oneway_spec *cmd);
static void precalc (const struct oneway_spec *cmd);
static void postcalc (const struct oneway_spec *cmd);
static void precalc (const struct oneway_spec *cmd);
-updateit (void *user_data, const struct variable *wv,
- const struct variable *catvar, const struct ccase *c, void *aux)
+updateit (void *user_data,
+ enum mv_class exclude,
+ const struct variable *wv,
+ const struct variable *catvar UNUSED,
+ const struct ccase *c,
+ void *aux1, void *aux2)
- double weight = 1.0;
- if (wv)
- weight = case_data (c, wv)->f;
+ const struct variable *varp = aux1;
+
+ const union value *valx = case_data (c, varp);
+
+ struct descriptive_data *dd_total = aux2;
- if (val->f * weight < ws->minimum)
- ws->minimum = val->f * weight;
+ if (valx->f * weight > dd->maximum)
+ dd->maximum = valx->f * weight;
+
+ {
+ const struct variable *var = dd_total->var;
+ const union value *val = case_data (c, var);
- if (val->f * weight > ws->maximum)
- ws->maximum = val->f * weight;
+ moments1_add (dd_total->mom,
+ val->f,
+ weight);
+
+ if (val->f * weight < dd_total->minimum)
+ dd_total->minimum = val->f * weight;
+
+ if (val->f * weight > dd_total->maximum)
+ dd_total->maximum = val->f * weight;
+ }
for (v = 0; v < cmd->n_vars; ++v)
{
struct categoricals *cats = categoricals_create (&cmd->indep_var, 1,
cmd->wv, cmd->exclude,
makeit,
for (v = 0; v < cmd->n_vars; ++v)
{
struct categoricals *cats = categoricals_create (&cmd->indep_var, 1,
cmd->wv, cmd->exclude,
makeit,
struct group_proc *gp = group_proc_get (cmd->vars[i]);
struct hsh_table *group_hash = gp->group_hash;
struct group_proc *gp = group_proc_get (cmd->vars[i]);
struct hsh_table *group_hash = gp->group_hash;
+ if ( MISS_ANALYSIS == cmd->missing_type)
+ {
+ if ( var_is_value_missing (v, val, cmd->exclude))
+ continue;
+ }
+
+ covariance_accumulate_pass1 (pvw->cov, c);
+
+ const struct variable *v = cmd->vars[i];
+ const union value *val = case_data (c, v);
+
+ if ( MISS_ANALYSIS == cmd->missing_type)
+ {
+ if ( var_is_value_missing (v, val, cmd->exclude))
+ continue;
+ }
+
gsl_matrix *cm = covariance_calculate_unnormalized (pvw->cov);
const struct categoricals *cats = covariance_get_categoricals (pvw->cov);
gsl_matrix *cm = covariance_calculate_unnormalized (pvw->cov);
const struct categoricals *cats = covariance_get_categoricals (pvw->cov);
for (v = 0; v < cmd->n_vars; ++v)
{
struct categoricals *cats = covariance_get_categoricals (ws.vws[v].cov);
categoricals_done (cats);
for (v = 0; v < cmd->n_vars; ++v)
{
struct categoricals *cats = covariance_get_categoricals (ws.vws[v].cov);
categoricals_done (cats);
if (!taint_has_tainted_successor (taint))
output_oneway (cmd, &ws);
if (!taint_has_tainted_successor (taint))
output_oneway (cmd, &ws);
if (ll_count (&cmd->contrast_list) > 0)
{
show_contrast_coeffs (cmd, ws);
show_contrast_tests (cmd, ws);
}
if (ll_count (&cmd->contrast_list) > 0)
{
show_contrast_coeffs (cmd, ws);
show_contrast_tests (cmd, ws);
}
- const char *s = var_to_string (cmd->vars[i]);
+ moments1_calculate (ws->dd_total[i]->mom, &n, NULL, NULL, NULL, NULL);
+
+ df1 = pvw->n_groups - 1;
+ df2 = n - pvw->n_groups;
+ msa = pvw->ssa / df1;
tab_text (t, 0, i * 3 + 1, TAB_LEFT | TAT_TITLE, s);
tab_text (t, 1, i * 3 + 1, TAB_LEFT | TAT_TITLE, _("Between Groups"));
tab_text (t, 0, i * 3 + 1, TAB_LEFT | TAT_TITLE, s);
tab_text (t, 1, i * 3 + 1, TAB_LEFT | TAT_TITLE, _("Between Groups"));
tab_hline (t, TAL_1, 0, n_cols - 1, i * 3 + 1);
tab_hline (t, TAL_1, 0, n_cols - 1, i * 3 + 1);
/* Sums of Squares */
tab_double (t, 2, i * 3 + 1, 0, pvw->ssa, NULL);
tab_double (t, 2, i * 3 + 3, 0, pvw->sst, NULL);
/* Sums of Squares */
tab_double (t, 2, i * 3 + 1, 0, pvw->ssa, NULL);
tab_double (t, 2, i * 3 + 3, 0, pvw->sst, NULL);
/* Degrees of freedom */
tab_fixed (t, 3, i * 3 + 1, 0, df1, 4, 0);
tab_fixed (t, 3, i * 3 + 2, 0, df2, 4, 0);
/* Degrees of freedom */
tab_fixed (t, 3, i * 3 + 1, 0, df1, 4, 0);
tab_fixed (t, 3, i * 3 + 2, 0, df2, 4, 0);
- tab_fixed (t, 3, i * 3 + 3, 0, pvw->cc - 1, 4, 0);
+ tab_fixed (t, 3, i * 3 + 3, 0, n - 1, 4, 0);
/* Mean Squares */
tab_double (t, 4, i * 3 + 1, TAB_RIGHT, msa, NULL);
/* Mean Squares */
tab_double (t, 4, i * 3 + 1, TAB_RIGHT, msa, NULL);
- tab_double (t, 4, i * 3 + 2, TAB_RIGHT, gp->mse, NULL);
+ tab_double (t, 4, i * 3 + 2, TAB_RIGHT, pvw->mse, NULL);
/* The F value */
tab_double (t, 5, i * 3 + 1, 0, F, NULL);
/* The F value */
tab_double (t, 5, i * 3 + 1, 0, F, NULL);
const union value *gval = categoricals_get_value_by_subscript (cats, count);
const struct descriptive_data *dd = categoricals_get_user_data_by_subscript (cats, count);
moments1_calculate (dd->mom, &n, &mean, &variance, NULL, NULL);
const union value *gval = categoricals_get_value_by_subscript (cats, count);
const struct descriptive_data *dd = categoricals_get_user_data_by_subscript (cats, count);
moments1_calculate (dd->mom, &n, &mean, &variance, NULL, NULL);
- moments1_calculate (ws->totals, &n, &mean, &variance, NULL, NULL);
+ moments1_calculate (ws->dd_total[v]->mom, &n, &mean, &variance, NULL, NULL);
tab_text (t, 1, row + count,
TAB_LEFT | TAT_TITLE, _("Total"));
tab_text (t, 1, row + count,
TAB_LEFT | TAT_TITLE, _("Total"));
tab_double (t, 5, row + count, 0, std_error, NULL);
/* Now the confidence interval */
tab_double (t, 5, row + count, 0, std_error, NULL);
/* Now the confidence interval */
T = gsl_cdf_tdist_Qinv (q, n - 1);
tab_double (t, 6, row + count, 0,
T = gsl_cdf_tdist_Qinv (q, n - 1);
tab_double (t, 6, row + count, 0,
-
- tab_double (t, 8, row + count, 0, ws->minimum, fmt);
- tab_double (t, 9, row + count, 0, ws->maximum, fmt);
+ tab_double (t, 8, row + count, 0, ws->dd_total[v]->minimum, fmt);
+ tab_double (t, 9, row + count, 0, ws->dd_total[v]->maximum, fmt);
const struct variable *var = cmd->vars[v];
const struct group_proc *gp = group_proc_get (cmd->vars[v]);
const char *s = var_to_string (var);
const struct variable *var = cmd->vars[v];
const struct group_proc *gp = group_proc_get (cmd->vars[v]);
const char *s = var_to_string (var);
- tab_text (t, 0, v + 1, TAB_LEFT | TAT_TITLE, s);
+ moments1_calculate (ws->dd_total[v]->mom, &n, NULL, NULL, NULL, NULL);
+
+ df1 = pvw->n_groups - 1;
+ df2 = n - pvw->n_groups;
tab_double (t, 1, v + 1, TAB_RIGHT, F, NULL);
tab_fixed (t, 2, v + 1, TAB_RIGHT, df1, 8, 0);
tab_double (t, 1, v + 1, TAB_RIGHT, F, NULL);
tab_fixed (t, 2, v + 1, TAB_RIGHT, df1, 8, 0);
++i, cli = ll_next (cli))
{
struct contrasts_node *cn = ll_data (cli, struct contrasts_node, ll);
++i, cli = ll_next (cli))
{
struct contrasts_node *cn = ll_data (cli, struct contrasts_node, ll);
+
+ double grand_n;
+ moments1_calculate (ws->dd_total[v]->mom, &grand_n, NULL, NULL, NULL, NULL);
+ df = grand_n - pvw->n_groups;
+
if ( i == 0 )
{
tab_text (t, 1, (v * lines_per_variable) + i + 1,
if ( i == 0 )
{
tab_text (t, 1, (v * lines_per_variable) + i + 1,
- group_stat_array = hsh_sort (group_hash);
-
- for (ci = 0;
- coeffi != ll_null (&cn->coefficient_list) &&
- ci < hsh_count (group_hash);
+ for (coeffi = ll_head (&cn->coefficient_list);
+ coeffi != ll_null (&cn->coefficient_list);
struct coeff_node *cn = ll_data (coeffi, struct coeff_node, ll);
const double coef = cn->coeff;
struct coeff_node *cn = ll_data (coeffi, struct coeff_node, ll);
const double coef = cn->coeff;
- struct group_statistics *gs = group_stat_array[ci];
+ double winv ;
+
+ moments1_calculate (dd->mom, &n, &mean, &variance, NULL, NULL);
/* Std. Error */
tab_double (t, 4, (v * lines_per_variable) + i + 1,
/* Std. Error */
tab_double (t, 4, (v * lines_per_variable) + i + 1,
/* Degrees of Freedom */
tab_fixed (t, 6, (v * lines_per_variable) + i + 1,
/* Degrees of Freedom */
tab_fixed (t, 6, (v * lines_per_variable) + i + 1,