| Libgretl Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define NEW_NA #define NADBL #define na (x) #define isfinite (x) #define xna (x) #define model_missing (m,t) int model_missval_count (const MODEL *pmod); int list_adjust_t1t2 (const int *list, const double **Z, DATAINFO *pdinfo); int array_adjust_t1t2 (const double *x, int *t1, int *t2); int varlist_adjust_sample (const int *list, int *t1, int *t2, const double **Z); int set_reference_missmask_from_list (const int *list, const double **Z, const DATAINFO *pdinfo); int check_for_missing_obs (const int *list, int *t1, int *t2, const double **Z); int set_miss (const int *list, const char *param, double **Z, DATAINFO *pdinfo, PRN *prn); double missing_obs_fraction (const double **Z, const DATAINFO *pdinfo); int any_missing_user_values (const double **Z, const DATAINFO *pdinfo);
#define model_missing(m,t) ((m)->missmask != NULL && (m)->missmask[t] == '1')
m : |
|
t : |
int model_missval_count (const MODEL *pmod);
pmod : |
pointer to model. |
| Returns : | a count of the missing values within the sample
range over which pmod was estimated.
|
int list_adjust_t1t2 (const int *list,
const double **Z,
DATAINFO *pdinfo);
list : |
|
Z : |
|
pdinfo : |
|
| Returns : |
int array_adjust_t1t2 (const double *x,
int *t1,
int *t2);
x : |
|
t1 : |
|
t2 : |
|
| Returns : |
int varlist_adjust_sample (const int *list,
int *t1,
int *t2,
const double **Z);
Drops leading or trailing observations from the sample range
initially given by the values in t1 and t2, if missing values are
found among the variables given in list at the start or end of
the range.
If you want to check for missing values inside the sample
range, use check_for_missing_obs() instead.
list : |
list of variables to be tested for missing values. |
t1 : |
on entry, initial start of sample range; on exit, start of sample range adjusted for missing values. |
t2 : |
on entry, initial end of sample range; on exit, end of sample range adjusted for missing values. |
Z : |
data array. |
| Returns : | 1 if an adjustment was made, otherwise 0. |
int set_reference_missmask_from_list (const int *list,
const double **Z,
const DATAINFO *pdinfo);
list : |
|
Z : |
|
pdinfo : |
|
| Returns : |
int check_for_missing_obs (const int *list,
int *t1,
int *t2,
const double **Z);
Drops leading or trailing observations from the sample range
initially given by the values in t1 and t2, if missing values are
found among the variables given in list. Then checks for any
missing values within the adjusted range.
If you don't care about missing values inside the sample range,
use varlist_adjust_sample().
list : |
list of variables to be tested for missing values. |
t1 : |
on entry, intial start of sample range; on exit, start of sample range adjusted for missing values. |
t2 : |
on entry, initial end of sample range; on exit, end of sample range adjusted for missing values. |
Z : |
data array. |
| Returns : | E_MISSDATA if missing values are found inside the
(possible adjusted) sample range, else 0.
|
int set_miss (const int *list,
const char *param,
double **Z,
DATAINFO *pdinfo,
PRN *prn);
Set to "missing" each observation of each series in list that
has the value represented by param.
list : |
list of variables to process, or an empty list or NULL
to process all variables.
|
param : |
string representation of the numerical value to treat as missing. |
Z : |
data matrix. |
pdinfo : |
pointer to data information struct. |
prn : |
pointer to printing struct. |
| Returns : | 1 if at least one observation was set as missing, otherwise 0. |
double missing_obs_fraction (const double **Z,
const DATAINFO *pdinfo);
Z : |
data array. |
pdinfo : |
pointer to data information struct. |
| Returns : | the fraction of the observations in Z for which
all variables have missing values (empty rows).
|
int any_missing_user_values (const double **Z,
const DATAINFO *pdinfo);
Z : |
data array. |
pdinfo : |
pointer to data information struct. |
| Returns : | 1 if there are missing values for any non-hidden variables within the current sample range, otherwise 0. |