Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weighted geometric standard deviation

    Hi, I would like to calculate a weighted geometric mean and weighted geometric standard deviation for a set of observations. First, I have ln-transformed the observations (lnvar) and I am using weights representing the number of individuals represented by each observation (count). The weighted geometric mean and weighted geometric standard deviation will be added as scalars to the estimation results. Is it correct to use the following commands to do this?

    summarize lnvar [fweight=count]
    estadd scalar wtgeomean = exp(r(sum)/r(sum_w))
    estadd scalar wtgeosdev = exp(r(sd))

    Thanks, Jonathan

  • #2
    I am using weights representing the number of individuals represented by each observation (count)
    Whether your approach is correct depends on what you mean by the word "representing" here. If you mean that you originally had a larger data set with individual observations, and you then collapsed it down, grouping together observations having the same value of lnvar and keeping a count of how many of those were originally in the data, then your approach is correct.

    But if by "representing" a certain number of individuals you mean that the sampling scheme that led to the data set was such that the variable count represents the fact that this person was selected into the sample as the sole representative of a group of count people, then you should be using pweights, not fweights. And, unfortunately, -summarize- does not support -pweights-. If you have -pweights-, an appropriate weighted mean can be gotten from the -mean- command instead. But if you are using -pweights-, then that sampling scheme does not lend itself to a proper calculation of a standard deviation.

    Comment


    • #3
      Hi Clyde - thank you for your helpful response. The results in var are levels of a chemical in a pooled biological sample. Each pool is comprised of blood serum from a number of individuals in a specific demographic group. I want to use weights to estimate weighted summary results for the study population, and in this case the weights are the national census population counts for the demographic group for each pooled sample. For example, there are 9,571 male individuals in the population aged 35-49 so I am using 9,571 as the weight for the single pooled sample result I have for this demographic group. I think I have misunderstood the use of fweight - I have tried using -mean- as you suggest on svy data and that is equivalent to using -aweights- in the -summarize- command. Thanks again for your guidance. Cheers, Jonathan

      Comment

      Working...
      X