- Copyright (C) 2005, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2010, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
gsl_matrix_set (l->cov, i + 1, j + 1, tmp);
}
/*
gsl_matrix_set (l->cov, i + 1, j + 1, tmp);
}
/*
xm = gsl_matrix_calloc (1, l->n_indeps);
for (i = 0; i < xm->size2; i++)
{
xm = gsl_matrix_calloc (1, l->n_indeps);
for (i = 0; i < xm->size2; i++)
{
- gsl_matrix_set (xm, 0, i,
+ gsl_matrix_set (xm, 0, i,
linreg_get_indep_variable_mean (l, i));
}
rc = gsl_blas_dsymm (CblasRight, CblasUpper, l->mse,
linreg_get_indep_variable_mean (l, i));
}
rc = gsl_blas_dsymm (CblasRight, CblasUpper, l->mse,
for (i = 1; i < 1 + l->n_indeps; i++)
{
tmp -= gsl_matrix_get (l->cov, 0, i)
* linreg_get_indep_variable_mean (l, i - 1);
}
gsl_matrix_set (l->cov, 0, 0, tmp);
for (i = 1; i < 1 + l->n_indeps; i++)
{
tmp -= gsl_matrix_get (l->cov, 0, i)
* linreg_get_indep_variable_mean (l, i - 1);
}
gsl_matrix_set (l->cov, 0, 0, tmp);
l->intercept -= l->coeff[i] * tmp;
intercept_variance += tmp * tmp * gsl_matrix_get (q, i, i);
}
/* Covariances related to the intercept. */
intercept_variance += linreg_mse (l) / linreg_n_obs (l);
l->intercept -= l->coeff[i] * tmp;
intercept_variance += tmp * tmp * gsl_matrix_get (q, i, i);
}
/* Covariances related to the intercept. */
intercept_variance += linreg_mse (l) / linreg_n_obs (l);
- gsl_matrix_set (l->cov, 0, 0, intercept_variance);
+ gsl_matrix_set (l->cov, 0, 0, intercept_variance);
* linreg_get_indep_variable_mean (l, j);
}
gsl_matrix_set (l->cov, 0, i + 1, intcpt_coef);
gsl_matrix_set (l->cov, i + 1, 0, intcpt_coef);
intcpt_coef = 0.0;
}
* linreg_get_indep_variable_mean (l, j);
}
gsl_matrix_set (l->cov, 0, i + 1, intcpt_coef);
gsl_matrix_set (l->cov, i + 1, 0, intcpt_coef);
intcpt_coef = 0.0;
}
params = gsl_matrix_calloc (cov->size1, cov->size2);
gsl_matrix_memcpy (params, cov);
reg_sweep (params, l->dependent_column);
params = gsl_matrix_calloc (cov->size1, cov->size2);
gsl_matrix_memcpy (params, cov);
reg_sweep (params, l->dependent_column);