gsl_matrix_view xtx;
gsl_matrix_view xmxtx;
double m;
- double tmp;
size_t i;
size_t j;
int rc;
m = l->depvar_mean;
for (i = 0; i < l->n_indeps; i++)
{
- tmp = gsl_matrix_get (sw, i, l->n_indeps);
+ double tmp = gsl_matrix_get (sw, i, l->n_indeps);
l->coeff[i] = tmp;
m -= tmp * linreg_get_indep_variable_mean (l, i);
}
for (i = 0; i < l->n_indeps; i++)
for (j = i; j < l->n_indeps; j++)
{
- tmp = -1.0 * l->mse * gsl_matrix_get (sw, i, j);
+ double tmp = -1.0 * l->mse * gsl_matrix_get (sw, i, j);
gsl_matrix_set (l->cov, i + 1, j + 1, tmp);
}
/*
gsl_matrix_free (xm);
if (rc == GSL_SUCCESS)
{
- tmp = l->mse / l->n_obs;
+ double tmp = l->mse / l->n_obs;
for (i = 1; i < 1 + l->n_indeps; i++)
{
tmp -= gsl_matrix_get (l->cov, 0, i)
gsl_vector *xty;
gsl_vector *tau;
gsl_vector *params;
- double tmp = 0.0;
size_t i;
size_t j;
}
}
l->intercept = linreg_get_depvar_mean (l);
- tmp = 0.0;
for (i = 0; i < l->n_indeps; i++)
{
- tmp = linreg_get_indep_variable_mean (l, i);
+ double tmp = linreg_get_indep_variable_mean (l, i);
l->intercept -= l->coeff[i] * tmp;
intercept_variance += tmp * tmp * gsl_matrix_get (q, i, i);
}