c->indep_means = gsl_vector_alloc (p);
c->indep_std = gsl_vector_alloc (p);
- c->ss_indeps = gsl_vector_alloc (p); /* Sums of squares for the
- model parameters.
- */
c->n_obs = n;
c->n_indeps = p;
c->n_coeffs = p;
c->dfe = c->dft - c->dfm;
c->intercept = 0.0;
c->depvar_mean = 0.0;
- c->depvar_std = 0.0;
/*
Default settings.
*/
{
gsl_vector_free (c->indep_means);
gsl_vector_free (c->indep_std);
- gsl_vector_free (c->ss_indeps);
gsl_matrix_free (c->cov);
free (c->indep_vars);
free (c->coeff);
return (obs - linreg_predict (c, vals, n_vals));
}
-double linreg_get_indep_variable_sd (linreg *c, size_t j)
-{
- assert (c != NULL);
- return gsl_vector_get (c->indep_std, j);
-}
-
-void linreg_set_indep_variable_sd (linreg *c, size_t j, double s)
-{
- assert (c != NULL);
- gsl_vector_set (c->indep_std, j, s);
-}
-
/*
Mean of the independent variable.
*/
column of the design matrix.
*/
double depvar_mean;
- double depvar_std;
gsl_vector *indep_means;
gsl_vector *indep_std;
Sums of squares.
*/
double ssm; /* Sums of squares for the overall model. */
- gsl_vector *ss_indeps; /* Sums of squares from each
- independent variable. */
double sst; /* Sum of squares total. */
double sse; /* Sum of squares error. */
double mse; /* Mean squared error. This is just sse /
linreg_residual (const linreg *, double, const double *, size_t);
const struct variable ** linreg_get_vars (const linreg *);
-/*
- Return or set the standard deviation of the independent variable.
- */
-double linreg_get_indep_variable_sd (linreg *, size_t);
-void linreg_set_indep_variable_sd (linreg *, size_t, double);
/*
Mean of the independent variable.
*/