Announcement

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

  • Microbiological data analysis related problem like GM, SD of GM

    Dear Altruistic,
    I have to manage a lot of microbiological data for which analysis method is not so common like central tendency measures evaluated in GM. But I faced several problems.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str8 Sample_ID byte Sample_Type double(Arsenic_microgm_L Mac_mtec Mac_Cip Mac_Cefo)
    "RH-001" 1   .  20000000   200000   200000
    "RH-001" 2   . 1.200e+08 30000000  2960000
    "RH-001" 3 458        21        0        1
    "RH-002" 1   .  17200000  9200000 10800000
    "RH-002" 2   . 7.200e+08  7200000  5800000
    "RH-002" 3 508        35       11        1
    "RH-003" 3 502       130      120       10
    "RH-003" 2   . 1.200e+08  3000000  4800000
    "RH-003" 1   . 1.000e+08 11400000   600000
    "RH-004" 3 506         9        0        0
    end
    label values Sample_Type Sample_Typel
    label def Sample_Typel 1 "MS", modify
    label def Sample_Typel 2 "CS", modify
    label def Sample_Typel 3 "WU", modify
    1. To calculate geometric mean I have to take log of the Mac_mtec Mac_Cip Mac_Cefo. Which log conversion command is perfect to find geometric mean of the variables (log, log10)? Different log conversion provide different results cause natural and 10 base log.
    2. Using means command 95% CI is available but how to find SD of GM?

  • #2
    You may wish to start with the - ameans - command.
    Best regards,

    Marcos

    Comment


    • #3
      To Marco's advice let me add that you misunderstand the use of logs in calculating the geometric mean through calculating the arithmetic mean. It is a three-step process.
      1) take the log of your data X; it doesn't matter whether you use log(X) or log10(X)
      2) take the mean of your logged data, call it M
      3) convert that mean to the geometric mean by taking the antilog of the mean: if you used log(X) on your data then use exp(M) on your mean; if you used log10(X) on your data then use 10^M on your mean.

      Comment

      Working...
      X