X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Flinreg.h;h=53f47a611c71dd92b808379bb905370fc01bbdde;hb=0bc7ad7a02ccb75b428dd4ce511986845c2a6c04;hp=05c8159630d8aa8da3467148a72e6d7a2da95218;hpb=4b79b7a1a1898a4e9b34d7be6a6ff1dd35e43938;p=pspp-builds.git diff --git a/src/math/linreg.h b/src/math/linreg.h index 05c81596..53f47a61 100644 --- a/src/math/linreg.h +++ b/src/math/linreg.h @@ -21,6 +21,7 @@ #include #include #include +#include enum { @@ -96,9 +97,10 @@ struct pspp_linreg_cache_struct coefficient here. */ /* - Pointer to the dependent variable. + Pointers to the variables. */ const struct variable *depvar; + const struct variable **indep_vars; gsl_vector *residuals; struct pspp_coeff **coeff; @@ -175,7 +177,8 @@ typedef struct pspp_linreg_cache_struct pspp_linreg_cache; 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 *); @@ -214,4 +217,9 @@ void pspp_linreg_set_indep_variable_sd (pspp_linreg_cache *, const struct variab */ 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. + */ +void pspp_linreg_with_cov (const struct covariance_matrix *, pspp_linreg_cache *); #endif