Announcement

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

  • Coefficient of Variation

    Dear Users,

    I am investigating the impact of Climate variability on farming practices using a fixed effects regression in Stata. I have annual rainfall data for each household_id in each year of my panel data set, with each wave differentiated by a WaveIndicator variable.

    I am looking to create a coefficient of variation (CV) for my AnnualRainfall variable to act as a value of climate variability in my study, but was unsure how to go about generating this variable in Stata?

    Any help would be greatly appreciated!

  • #2
    Code:
    egen m  = mean(AnnualRainfall), by(household_id)
    egen sd = sd(AnnualRainfall), by(household_id)
    gen cv = sd/m
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thanks Maarten, appreciate the quick reply!

      Is it beneficial to multiply the CV by 100 to get it as a percentage or is it better to leave it as above?
      Last edited by Samuel Welch; 11 Apr 2024, 05:36.

      Comment


      • #4
        There is no benefit from presentation in percent form unless your readers expect that.

        A deeper problem is that the coefficient of variation isn't necessarily a good measure of variability of precipitation. In unpublished work I found that a typical (although not universal) pattern is that SD of annual precipitation scales with about the 0.7 power of the mean, not with the mean, which would be ideal for the coefficient of variation to make most sense.

        Various general comments at https://stats.stackexchange.com/ques...t-of-variation carry over here.

        Comment


        • #5
          Thank you for the response!

          I will look into this and how it may be of use for my investigation.

          Comment

          Working...
          X