svy command allows to get standard error estimates from two way contingency tables and the
tab(varname) option makes it easy to indicate which variable is the total when obtaining proportions, as the documentation here puts it:
tab(varname) specifies that counts be cell totals of this variable and that proportions (or percentages) be relative to (that is, weighted by) this variable. For example, if this variable denotes income, the cell “counts” are instead totals of income for each cell, and the cell proportions are proportions of income for each cell
Following the previous command, a coworker made this calculation, from which he then obtains the SE by making some calculations on the
e(V) (variance matrix) object from this table.
In R, using the survey package I can get the mean by groups and afterwards calculate the proportions of those means by their size and get to the same stata output for the proportions, but I'm having a lot of trouble obtaining the SE from said proportions. Note that the SE from the following image is from the mean and not the proportions, which is what i need.
So, how do I get the SE of the proportion estimation of an "aggregated" variable in R?