welcome to SO. please don’t be discouraged by the downvoters, i think your question is perfectly reasonable. let’s say your survey design object is scf.design
.. that way, you could try a test case using the survey of consumer finances
# compute the cutoff point for the top percentile
y <- coef( svyquantile( ~ asset , scf.design , 0.99 ) )
# for this, you probably don't need the standard error,
# so immediately just extract the coefficient (the actual number)
# and discard the standard error term by using the `coef` function
# around the `svyquantile` call
# create a new flag in your survey design object
# that's a 1 if the individual is in the top percentile
# and a 0 for everybody else
scf.design <- update( scf.design , onepct = as.numeric( asset > y ) )
# calculate the aggregate of all assets
# held by the top percentile
# and also held by everybody else
svyby( ~asset , ~onepct , scf.design , svytotal )
# or, if you like, calculate them separately
svytotal( ~asset , subset( scf.design , onepct == 1 ) )
svytotal( ~asset , subset( scf.design , onepct == 0 ) )
# and divide each of those numbers by all assets
# held by everybody
svytotal( ~asset , scf.design )
2
solved Compute how much the one percent wealthier concentrates using survey data [closed]