Am 27.09.2022 um 11:22 schrieb Riccardo (Jack) Lucchetti:
On Tue, 27 Sep 2022, Paolo Chirico wrote:
> Dears,
> in function reference about /mean/ function there is :
> Arguments: /x (series or list)//
> // partial (boolean, optional)/
>
> Can you give me an example including /*partial*/ (a boolean
> condition), please?
If you look at the help for 'mean', you see that the 'partial' parameter
only applies if the first argument is a gretl list (of series). Please
note the description "By default the mean is recorded as NA if there are
any missing values at t, but if you pass a non-zero value for partial
any non-missing values will be used to form the statistic." Say you have
a list with series x and y, and at obs number 5 the series y has an NA
entry. This will lead to a 'mean' of NA at obs 5 normally, but if
'partial' is non-zero, then the other variables' values will be used for
obs number 5 (in this example the value of x).
> Does this mean that I can calculate the mean of a variable in a
> subsample (defined by a boolean condition) without using the *smpl
> *command?
Not with the 'partial' parameter (at least not directly), and if I
interpret Jack's reply correctly, he was trying to show how that could
be achieved.
cheers
sven