struct categoricals *cats;
- /*
+ /*
Sums of squares due to different variables. Element 0 is the SSE
for the entire model. For i > 0, element i is the SS due to
variable i.
lex_error (lexer, NULL);
goto error;
}
-
+
glm.alpha = lex_number (lexer);
lex_get (lexer);
if ( ! lex_force_match (lexer, T_RPAREN))
size_t j;
size_t n = 0;
size_t m = 0;
-
+
for (i = 0; i < cov->size1; i++)
{
if (not_dropped (i, dropped_f))
- {
+ {
m = 0;
for (j = 0; j < cov->size2; j++)
{
gsl_matrix_set (submatrix, n, m,
gsl_matrix_get (cov, i, j));
m++;
- }
+ }
}
n++;
}
}
-/*
+/*
Type 1 sums of squares.
Populate SSQ with the Type 1 sums of squares according to COV
*/
{
gsl_matrix *model_cov = NULL;
gsl_matrix *submodel_cov = NULL;
-
+
n_dropped_submodel = n_dropped_model;
for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++)
{
for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++)
{
- const struct interaction * x =
+ const struct interaction * x =
categoricals_get_interaction_by_subscript (cats, i - cmd->n_dep_vars);
if ( x == cmd->interactions [k])
free (submodel_dropped);
}
-/*
+/*
Type 2 sums of squares.
Populate SSQ with the Type 2 sums of squares according to COV
*/
size_t n_dropped_submodel = 0;
for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++)
{
- const struct interaction * x =
+ const struct interaction * x =
categoricals_get_interaction_by_subscript (cats, i - cmd->n_dep_vars);
model_dropped[i] = false;
free (submodel_dropped);
}
-/*
+/*
Type 3 sums of squares.
Populate SSQ with the Type 2 sums of squares according to COV
*/
for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++)
{
- const struct interaction * x =
+ const struct interaction * x =
categoricals_get_interaction_by_subscript (cats, i - cmd->n_dep_vars);
model_dropped[i] = false;
struct glm_workspace ws;
struct covariance *cov;
+ input = casereader_create_filter_missing (input,
+ cmd->dep_vars, cmd->n_dep_vars,
+ cmd->exclude,
+ NULL, NULL);
+
+ input = casereader_create_filter_missing (input,
+ cmd->factor_vars, cmd->n_factor_vars,
+ cmd->exclude,
+ NULL, NULL);
+
ws.cats = categoricals_create (cmd->interactions, cmd->n_interactions,
cmd->wv, cmd->exclude, MV_ANY);
cov = covariance_2pass_create (cmd->n_dep_vars, cmd->dep_vars,
- ws.cats, cmd->wv, cmd->exclude);
+ ws.cats, cmd->wv, cmd->exclude, true);
c = casereader_peek (input, 0);
taint_destroy (taint);
}
-static const char *roman[] =
+static const char *roman[] =
{
"", /* The Romans had no concept of zero */
"I",
/* TRANSLATORS: The parameter is a roman numeral */
tab_text_format (t, 1, 0, TAB_CENTER | TAT_TITLE,
- _("Type %s Sum of Squares"),
+ _("Type %s Sum of Squares"),
roman[cmd->ss_type]);
tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("df"));
tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Mean Square"));
ssq_effects += ssq;
- if (! cmd->intercept)
+ if (! cmd->intercept)
{
df++;
ssq += intercept_ssq;
tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Total"));
tab_double (t, 1, r, 0, ws->total_ssq + intercept_ssq, NULL, RC_OTHER);
tab_double (t, 2, r, 0, n_total, NULL, RC_WEIGHT);
-
+
r++;
}
return false;
}
- lex_error (lexer, "Nested variables are not yet implemented"); return false;
+ lex_error (lexer, "Nested variables are not yet implemented"); return false;
return true;
}