Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Mata Behaviour for Missing Data and Op. Logic

From   Matthew McKay <>
To   "<> (" <>
Subject   st: Mata Behaviour for Missing Data and Op. Logic
Date   Tue, 11 Jun 2013 09:53:35 +0000

Dear StataList,

I am debugging some MATA code that I have written and I have come across an issue:
I am iterating over a list of values: [0 0.2 0.1 .... Etc] and comparing each element with some cutoff level (ie 0.2).

I am finding that if there are any missing items in the original list: [0   0.1   .    0.2    0.3]; 
Then items that are missing evaluate to TRUE when greater than the cutoff.
(. > 0.2) -> 1
And evaluates to false when less than the cutoff 
(. < 0.2) -> 0 

I had assumed that if data was 'missing' it would either return 'missing' or return FALSE in both comparison cases!

Can anyone explain this to me?
(i.e. is missing (.) considered to be infinitely large?)

PhD Student

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index