assert (c != NULL);
rsq = c->ssm / c->sst;
adjrsq = 1.0 - (1.0 - rsq) * (c->n_obs - 1.0) / (c->n_obs - c->n_indeps);
- std_error = sqrt ((c->n_indeps - 1.0) / (c->n_obs - 1.0));
+ std_error = sqrt (pspp_linreg_mse (c));
t = tab_create (n_cols, n_rows, 0);
tab_dim (t, tab_natural_dimensions);
tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
int n_cols = 7;
int n_rows = 4;
const double msm = c->ssm / c->dfm;
- const double mse = c->sse / c->dfe;
+ const double mse = pspp_linreg_mse (c);
const double F = msm / mse;
const double pval = gsl_cdf_fdist_Q (F, c->dfm, c->dfe);
covariance_matrix_destroy (cov);
}
+double pspp_linreg_mse (const pspp_linreg_cache *c)
+{
+ assert (c != NULL);
+ return (c->sse / c->dfe);
+}
*/
double pspp_linreg_get_indep_variable_mean (pspp_linreg_cache *, const struct variable *);
void pspp_linreg_set_indep_variable_mean (pspp_linreg_cache *, const struct variable *, double);
+double pspp_linreg_mse (const pspp_linreg_cache *);
#endif
#============#========#=================#==========================#
# R #R Square|Adjusted R Square|Std. Error of the Estimate#
#========#===#========#=================#==========================#
-# |.05# .00| .00| .00#
+# |.05# .00| .00| 8.11#
#========#===#========#=================#==========================#
2.2 REGRESSION. ANOVA
#===================#==============#====#===========#=====#============#
#============#========#=================#==========================#
# R #R Square|Adjusted R Square|Std. Error of the Estimate#
#========#===#========#=================#==========================#
-# |.97# .94| .93| .33#
+# |.97# .94| .93| 1.34#
#========#===#========#=================#==========================#
2.2 REGRESSION. ANOVA
#===================#==============#==#===========#======#============#