missing_private

missing_private

Functions

Description

Functions

masked()

#define masked(m,t) (m != NULL && m[t] == '1')

set_reference_missmask_from_model ()

void
set_reference_missmask_from_model (const MODEL *pmod);

copy_to_reference_missmask ()

int
copy_to_reference_missmask (const char *mask);

apply_reference_missmask ()

int
apply_reference_missmask (MODEL *pmod);

reference_missmask_present ()

int
reference_missmask_present (void);

model_adjust_sample ()

int
model_adjust_sample (MODEL *pmod,
                     int n,
                     const double **Z,
                     int *misst);

Drops leading or trailing observations from the sample range initially given by the values in the t1 and t2 members of pmod , if missing values are found among the variables given in the list member of pmod .

Also checks for missing values within the adjusted sample range. If such values are encountered, either flag an error (if misst != NULL), or construct a "missing mask" and attach it to pmod .

Parameters

pmod

pointer to gretl model.

 

n

full length of data array.

 

Z

data array.

 

misst

location to receive the first observation with a missing value inside the sample range, or NULL.

 

Returns

if misst is not NULL, either the ID number of the variable for which a missing value is first found inside the adjusted sample range or 0 if there is no such variable. If misst is NULL, returns 1 if there is an error creating the missing obs mask, otherwise 0.

Types and Values