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?
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?
For example:
<hansl>
open mroz87
m = mean(WA) # overall mean age
me = mean(LFP ? WA : NA) # mean age for employed women only
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------