Announcement

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

  • Data transformation after performing paired ttest on logarithmn values

    I am a newbie in STATA and currently struggling with data transformations. I am comparing the baseline weight and final weight in my dataset. Both are positively skewed so I converted it to ln values and ran the paired ttest (. ttest lnbweight = lnfweight). I then used my calculator (anti-log function) to convert back the avg baseline weight and final weight (as well as corresponding CIs for each variable) into its original form. I used the antilog baseline weight and minus off the final weight to calculate the average difference in weight. However, in STATA the results for "diff" are also presented and when I used the values (diff, SE, SD, CIs) and calculated the atilog the values are not the same. I need to report the average weight change including the SD and CIs. Hope someone can advise me.

  • #2
    Kat:
    welcome to the list-
    For different reasons, which are all well covered in any decent statistics textbook, when you antilog (i.e.., -exp-) the log mean to the original arithmetic metric of your data, often results let you down.
    A trick. which sometimes works (other times it doesn't), is to add to the log mean one half of the log variance and then exponentiate that sum (you may be interested to take a look at: http://www.ncbi.nlm.nih.gov/pubmed/15685641).
    However, you can avoid bothering yourself with log and antilog and do a bootstrapped tttest.
    Just take a look at -help bootstrap- and skim through the Example of the related entry in Stata .pdf manual.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Kat:
      if you ever end up using a log-linear regression model for your research purposes, another widely suggested back-transformation to the original metric is reported in: Duan N. Smearing estimate: a nonparametric retransformation method.J Am Stat Assoc. 1983;78:605– 610.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Although the baseline weight and the final weight each may be skewed, the difference needs not be skewed, so it may be perfectly valid to do a paired ttest on the untransformaed values. (A paired t-test is the same as a one-sample t-test of the difference).

        Comment


        • #5
          Thank you so much for the tips.
          Svend, when I inspected the weight loss values (baseline weight less final weight) the distribution approximates a normal distribution. So I have done a "ttest wloss = 0" to get the mean, SD, SE and CI. The weight loss variable is the one that I will be using for the regression analysis. So will stick to the untransformed values unless by supervisor insists.
          Carlo, thanks for the references and will give it a try, too.

          Comment

          Working...
          X