How does the quantile function treats/handles nan values in a series (and/or matrix column if the treatment is different)?

I am asking motivated by the following. Consider

<hansl>

scalar bootquant95 = quantile(bootmom3Stat,0.95)
scalar bootquant90 = quantile(bootmom3Stat,0.90)
scalar bootquant85 = quantile(bootmom3Stat,0.85)
scalar bootquant80 = quantile(bootmom3Stat,0.80)


matrix bootRejmom3Stat[i,1] = (mom3Stat[i,1] > bootquant95)
matrix bootRejmom3Stat[i,2] = (mom3Stat[i,1] > bootquant90)
matrix bootRejmom3Stat[i,3] = (mom3Stat[i,1] > bootquant85)
matrix bootRejmom3Stat[i,4] = (mom3Stat[i,1] > bootquant80)

</hansl>

"bootmom3Stat" (whose quantiles I have to compute) is a column vector. Some of its values are nan. The value "mom3Stat[i,1]" is always a number.

What happens sometimes is that as regards the four elements of the i-row of matrix "bootRejmom3Stat", some values result as nan while others as "0" or "1". For example I have one case where

(mom3Stat[i,1] > bootquant95) = nan

(mom3Stat[i,1] > bootquant90) = 0

(mom3Stat[i,1] > bootquant85) = nan

(mom3Stat[i,1] > bootquant80) = nan


In another example, I got

(mom3Stat[i,1] > bootquant95) = 1

(mom3Stat[i,1] > bootquant90) = 1

(mom3Stat[i,1] > bootquant85) = nan

(mom3Stat[i,1] > bootquant80) = 0

It appears strange to have a proper number value for the 0.8-quantile and for the 0.9-quantile so that the inequality condition can be checked, but not for the 0.85-quantile.


--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
scholar:https://g.co/kgs/BqH2YU
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/

Reply via email to