struct moments_var
{
struct moments1 *m;
- struct variable *v;
+ const struct variable *v;
};
/* Linear regression models. */
/*
Variables used (both explanatory and response).
*/
-static struct variable **v_variables;
+static const struct variable **v_variables;
/*
Number of variables.
Compute the first two moments.
*/
static size_t
-mark_missing_cases (const struct casefile *cf, struct variable *v,
- int *is_missing_case, double n_data, struct moments_var *mom)
+mark_missing_cases (const struct casefile *cf, const struct variable *v,
+ int *is_missing_case, double n_data,
+ struct moments_var *mom)
{
struct casereader *r;
struct ccase c;
return 2;
- if (!parse_variables (lexer, dict, &v_variables, &n_variables, PV_NONE))
+ if (!parse_variables_const (lexer, dict, &v_variables, &n_variables, PV_NONE))
{
free (v_variables);
return 0;
*/
static int
prepare_data (int n_data, int is_missing_case[],
- struct variable **indep_vars,
- struct variable *depvar, const struct casefile *cf, struct moments_var *mom)
+ const struct variable **indep_vars,
+ const struct variable *depvar, const struct casefile *cf,
+ struct moments_var *mom)
{
int i;
int j;
const union value *val;
struct casereader *r;
struct ccase c;
- struct variable **indep_vars;
+ const struct variable **indep_vars;
struct design_matrix *X;
struct moments_var *mom;
gsl_vector *Y;