I am trying to understand the role of [fweight] in the following command

Code:
cumul [fweight]
https://www.stata.com/help10.cgi?weight says that fweights, or frequency weights, are weights that indicate the number of duplicated observations. Given this explanation, let us consider the following:

Code:
set obs 150
set seed 12345

gen z = rnormal()
gen w = runiformint(1,100)

cumul z [fweight=w], gen(cum_z)

gen zw = z*w
cumul zw, gen(cum_zw)
I would expect that cum_z and cum_zw are identical, or a least very close. But they are very different, as can be seen from the graph attached.

What does the option [fweight] really do?

Your help would be much appreciated.

Stata/IC 16.1 for Mac (64-bit Intel)


Array