These are represented internally as −999. In a native-format data file they should be represented the same way. When importing CSV data gretl accepts any of three representations of missing values: −999, the string NA, or simply a blank cell. Blank cells should, of course, be properly delimited, e.g. 120.6,,5.38, in which the middle value is presumed missing.
As for handling of missing values in the course of statistical analysis, gretl does the following:
In calculating descriptive statistics (mean, standard deviation, etc.) under the summary command, missing values are simply skipped and the sample size adjusted appropriately.
In running regressions gretl first adjusts the beginning and end of the sample range, truncating the sample if need be. Missing values at the beginning of the sample are common in time series work due to the inclusion of lags, first differences and so on; missing values at the end of the range are not uncommon due to differential updating of series and possibly the inclusion of leads.
If gretl detects any missing values "inside" the (possibly truncated) sample range for a regression it gives an error message and refuses to produce estimates.
Missing values in the middle of a data set are a problem. In a cross-sectional data set it may be possible to move the offending observations to the beginning or the end of the file, but obviously this won't do with time series data. For those who know what they are doing (!), the misszero function is provided under the genr command. By doing
genr foo = misszero(bar)
you can produce a series foo which is identical to bar except that any −999 values become zeros. Then you can use carefully constructed dummy variables to, in effect, drop the missing observations from the regression while retaining the surrounding sample range.[1]
[1] | genr also offers the inverse function to misszero, namely zeromiss, which replaces zeros in a given series with the missing observation code. |