63 |
|
|
64 |
/* |
/* |
65 |
Cache for the relevant data from the model. There are several |
Cache for the relevant data from the model. There are several |
66 |
members which the caller may not use, and which could use a lot of |
members which the caller might not use, and which could use a lot of |
67 |
storage. Therefore non-essential members of the struct will be |
storage. Therefore non-essential members of the struct will be |
68 |
allocated only when requested. |
allocated only when requested. |
69 |
*/ |
*/ |
70 |
|
struct pspp_linreg_coeff |
71 |
|
{ |
72 |
|
double estimate; /* Estimated coefficient. */ |
73 |
|
const struct variable *v; /* The variable associated with this coefficient. |
74 |
|
The calling function should supply the variable |
75 |
|
when it creates the design matrix. The estimation |
76 |
|
procedure ignores the struct variable *. It is here so |
77 |
|
the caller can match parameters with relevant |
78 |
|
variables. |
79 |
|
*/ |
80 |
|
}; |
81 |
struct pspp_linreg_cache_struct |
struct pspp_linreg_cache_struct |
82 |
{ |
{ |
83 |
int n_obs; /* Number of observations. */ |
int n_obs; /* Number of observations. */ |
84 |
int n_indeps; /* Number of independent variables. */ |
int n_indeps; /* Number of independent variables. */ |
85 |
|
int n_coeffs; |
86 |
|
|
87 |
/* |
/* |
88 |
The var structs are ignored during estimation. |
The variable struct is ignored during estimation. |
89 |
They are here so the calling procedures can |
It is here so the calling procedure can |
90 |
find the variables used in the model. |
find the variable used in the model. |
91 |
*/ |
*/ |
92 |
struct var *depvar; |
const struct variable *depvar; |
93 |
struct var **indepvar; |
|
94 |
gsl_vector *residuals; |
gsl_vector *residuals; |
95 |
|
struct pspp_linreg_coeff *coeff; |
96 |
gsl_vector *param_estimates; |
gsl_vector *param_estimates; |
97 |
int method; /* Method to use to estimate parameters. */ |
int method; /* Method to use to estimate parameters. */ |
98 |
/* |
/* |