Announcement

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

  • Creating relative scale for two different variables for comparison

    Hi All,

    I am creating an index which investigates associations between ecological footprint (EF) and healthy life expectancy (HALE) and was instructed: "to avoid the index being excessively driven by differences in ecological footprint, transfer both measures to a relative scale" and then proceed with developing my index.

    Right now I have values for my log transformed EF variable "totallog" which range from 0.104 to 3.875 and values for HALE variable "val" ranging from 39.08 to 69.77, for countries in a given year.

    I was wondering if anyone had some advice on how to create new variables in stata where the values for both of these variables were on a relative scale with the same range (i.e. say 0-100) to allow for more direct comparison.

    Thanks!
    Connor

  • #2
    To create a new variable that ranges from 0 to 100 from an existing variable with arbitrary range:

    Code:
    sum existing_variable, meanonly
    gen new_variable =100* (existing_variable - `r(min)')/(`r(max)'-`r(min)')
    That said, putting all the variables on a scale with the same range isn't necessarily the best way to go about making an index out of them. If that's what you were specifically instructed to do, then the above code will help you do it. But better ways of creating an index can often be found, such as factor analysis or principal components analysis.

    Comment


    • #3
      Although Clyde Schechter answers the question asked admirably. I don't understand the underlying question. Given two variables, I would first plot them on a scatter plot.

      It's hard to say without seeing the data what would be a suitable index of association. It might be a Pearson or Spearman correlation, or something else, with or without transformation. Or the relationship could be so messy that no measure of association is much help.

      Further, I can't see that scaling anything to [0, 100] range makes anything more direct: you've just thrown away any information about units or variation relative to what is possible.

      It is hard also to put this on a spectrum from student question (please see our policy on homework or assignments) to researcher or research assistant question.

      Comment


      • #4
        Hello Nick Cox and Clyde Schechter ,

        I would firstly like to apologize to you both for the poor wording of the question. I have already performed multiple linear regression analyses looking at association between HALE and EF (while accounting for other factors aswell) for my dataset. These results coming from the multiple regression analyses are my primary findings for the research I am doing. The "index" I am looking to create is aimed at being a ranking system for countries based on their scores for HALE (units: healthy life years expected) and EF (units: global hectares per capita). The problem pointed out by my supervisor is that the scores for EF vary a substantially more than HALE scores (due to drastic differences in resource use around the world, compared to more similar life expectancy around the globe) causing the EF scores to dominate the ranking system ( index score = HALE / EF ). So my question was in effect, if there is a way in stata to produce relative values for both the EF scores and HALE scores to combat this issue. I believe the code provided by Clyde satisfies this request as I now have relative scores (out of 100) for both a country's HALE and EF to make up my ranking system. I thank you both for your time and commend Clyde on his correct interpretation of my poorly worded question.

        Thanks again,
        Connor

        Comment


        • #5
          Thanks for your very polite and detailed comment. Pleased on your behalf that Clyde understood what you wanted.

          Comment

          Working...
          X