Hi,
you could try to select a joint sample with no-missings
<hansl>
list L = Y X
smpl L --no-missing
summary L
</hansl>
However, this will select a joint set of valid observations. Otherwise
you loop over L
<hansl>
list L = Y X
loop foreach i L -q
smpl $i --no-missing --replace
eval sd($i)
eval mean($i)
endloop
</hansl>
Best,
Artur
Am 03.06.2017 um 17:56 schrieb Filipe Rodrigues da Costa:
Dear All,
I'm trying to use the functions sd(x), and mean(x) in a list instead of
a series. From what I understood, these functions ignore NAs when used
in a series, but when used in a list they return NA if any missing value.
I need to compute the cross-sectional mean and standard deviation and I
want NAs to be ignored, as they are in a series. Is there a simple way
of doing this? Basically a I have a list with 10 series and I want to
compute the standard deviations of all first observations, the standard
deviation of all second observations and so on. In R there is a way of
skipping NAs. Is there anything in Gretl?
Thanks in advance
Filipe