missing

missing —

Synopsis




#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         check_for_missing_obs           (const int *list,
                                             int *t1,
                                             int *t2,
                                             const double **Z,
                                             int *misst);
int         set_miss                        (const int *list,
                                             const char *param,
                                             double **Z,
                                             DATAINFO *pdinfo,
                                             PRN *prn);

Description

Details

NADBL

#define NADBL DBL_MAX


na()

#define na(x) ((x) == NADBL)

x :

isfinite()

# define isfinite(x) (!isnan(x) && !isinf(x))

x :

xna()

#define     xna(x)

x :

model_missing()

#define model_missing(m,t) ((m)->missmask != NULL && (m)->missmask[t] == '1')

m :
t :

model_missval_count ()

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.

list_adjust_t1t2 ()

int         list_adjust_t1t2                (const int *list,
                                             const double **Z,
                                             DATAINFO *pdinfo);

list :
Z :
pdinfo :
Returns :

array_adjust_t1t2 ()

int         array_adjust_t1t2               (const double *x,
                                             int *t1,
                                             int *t2);

x :
t1 :
t2 :
Returns :

varlist_adjust_sample ()

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.

check_for_missing_obs ()

int         check_for_missing_obs           (const int *list,
                                             int *t1,
                                             int *t2,
                                             const double **Z,
                                             int *misst);

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 such are found, the return will be non-zero (see below). In addition, if misst is non-NULL it will receive the index number of the observation where the first such missing value was found.

If you don't care about missing values inside the sample range, use the simpler 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.
misst : return location for index of the first missing observation inside the (possibly reduced) sample range, or NULL.
Returns : the (non-zero) ID number of the first variable for which a missing value is first found inside the adjusted sample range or 0 if there is no such variable.

set_miss ()

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.