100 |
double rsq; |
double rsq; |
101 |
double adjrsq; |
double adjrsq; |
102 |
double stderr; |
double stderr; |
103 |
|
|
104 |
assert (c != NULL); |
assert (c != NULL); |
105 |
rsq = c->ssm / c->sst; |
rsq = c->ssm / c->sst; |
106 |
adjrsq = 1.0 - (1.0 - rsq) * (c->n_obs - 1.0) / (c->n_obs - c->n_indeps); |
adjrsq = 1.0 - (1.0 - rsq) * (c->n_obs - 1.0) / (c->n_obs - c->n_indeps); |
107 |
stderr = sqrt (2 * (c->n_indeps - 1.0) / (c->n_obs - 1.0)); |
stderr = sqrt ((c->n_indeps - 1.0) / (c->n_obs - 1.0)); |
108 |
t = tab_create (n_cols, n_rows, 0); |
t = tab_create (n_cols, n_rows, 0); |
109 |
tab_dim (t, tab_natural_dimensions); |
tab_dim (t, tab_natural_dimensions); |
110 |
tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); |
tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); |
111 |
tab_hline (t, TAL_2, 0, n_cols - 1, 1); |
tab_hline (t, TAL_2, 0, n_cols - 1, 1); |
112 |
tab_vline (t, TAL_2, 2, 0, n_rows - 1); |
tab_vline (t, TAL_2, 2, 0, n_rows - 1); |
113 |
tab_vline (t, TAL_0, 1, 0, 0); |
tab_vline (t, TAL_0, 1, 0, 0); |
114 |
|
|
115 |
tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("R")); |
tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("R")); |
116 |
tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("R Square")); |
tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("R Square")); |
117 |
tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Adjusted R Square")); |
tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Adjusted R Square")); |
118 |
tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Std. Error of the Estimate")); |
tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Std. Error of the Estimate")); |
119 |
tab_float (t, 1, 1, TAB_RIGHT, sqrt(rsq), 10, 2); |
tab_float (t, 1, 1, TAB_RIGHT, sqrt (rsq), 10, 2); |
120 |
tab_float (t, 2, 1, TAB_RIGHT, rsq, 10, 2); |
tab_float (t, 2, 1, TAB_RIGHT, rsq, 10, 2); |
121 |
tab_float (t, 3, 1, TAB_RIGHT, adjrsq, 10, 2); |
tab_float (t, 3, 1, TAB_RIGHT, adjrsq, 10, 2); |
122 |
tab_float (t, 4, 1, TAB_RIGHT, stderr, 10, 2); |
tab_float (t, 4, 1, TAB_RIGHT, stderr, 10, 2); |
522 |
*/ |
*/ |
523 |
if (is_depvar (i)) |
if (is_depvar (i)) |
524 |
{ |
{ |
525 |
assert(v->type == NUMERIC); |
assert (v->type == NUMERIC); |
526 |
gsl_vector_set (Y, row, val->f); |
gsl_vector_set (Y, row, val->f); |
527 |
} |
} |
528 |
else |
else |