coefficient here. */
/*
- The variable struct is ignored during estimation. It is here so
- the calling procedure can find the variable used in the model.
+ Pointers to the variables.
*/
const struct variable *depvar;
+ const struct variable **indep_vars;
gsl_vector *residuals;
struct pspp_coeff **coeff;
to it. n is the number of cases, p is the number of
independent variables.
*/
-pspp_linreg_cache *pspp_linreg_cache_alloc (size_t n, size_t p);
+pspp_linreg_cache *pspp_linreg_cache_alloc (const struct variable *, const struct variable **,
+ size_t, size_t);
bool pspp_linreg_cache_free (void *);
/*
All variables used in the model.
*/
-int pspp_linreg_get_vars (const void *, const struct variable **);
+int pspp_linreg_get_vars (const void *, struct variable **);
-const struct pspp_coeff *pspp_linreg_get_coeff (const pspp_linreg_cache
+struct pspp_coeff *pspp_linreg_get_coeff (const pspp_linreg_cache
*,
const struct variable
*,
*/
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);
+
+/*
+ Regression using only the covariance matrix.
+ */
+int pspp_linreg_with_cov (const struct design_matrix *, pspp_linreg_cache *);
#endif