Stata - How to standardize your variables?

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Welcome to my classroom!
    This video is part of my Stata series. A series where I help you learn how to use Stata. In this video, we look at how to create standardized variables (also known as z-scores) in Stata.
    Note: What I show here is my take on the topic. I would be happy to receive comments!
    Useful links:
    ►Twitch: / steffens_classroom
    ►Twitter: / steff5001
    ►Workpage: www.rug.nl/sta...
    ►Subscribe: cutt.ly/Qfu9cmV

Комментарии • 21

  • @lukegardner4733
    @lukegardner4733 2 года назад +1

    you can just include ,beta in your regression to output the beta or "standardized coefficients"

    • @SteffensClassroom
      @SteffensClassroom  2 года назад

      Haha, guess you learn every day!
      Just a few small differences: You don't obtain the standard deviation of the coefficient this way (if you need it), and you still have to calculate them manually if you wish to get the summary statistics for the standardized variables. However, if all you need is just to produce the standardized coefficients, then this works perfectly. Thank you :)

  • @isabelm.6640
    @isabelm.6640 5 месяцев назад +1

    Again very helpful! 👏

  • @mast007Er
    @mast007Er 2 года назад +1

    Thank you, very well explained and useful for my Stata university project where I'm standardising an income variable :)

  • @sachursunny5974
    @sachursunny5974 2 года назад +1

    I was really confused seeing the mean being non-zero. Thank you for clearing it.

  • @arshadkhan-cy1do
    @arshadkhan-cy1do Год назад

    excellent sir

  • @aronibarkat8384
    @aronibarkat8384 9 месяцев назад

    thanks! great help

  • @sairamaroof5928
    @sairamaroof5928 2 месяца назад

    Sir, I have the data of six social media platforms from 2009 to 22, so how can I create an index for each country separately or combine the countries, which are 21 countries, so they are aggregated. Also tell me how to do normalization of data

    • @SteffensClassroom
      @SteffensClassroom  2 месяца назад

      This video is about how to standardize your variables. Other inquiries can be mailed, where a session can be booked.

  • @NathanCats777
    @NathanCats777 Год назад +1

    What if I want to standardize data on a 0-1 scale?

    • @SteffensClassroom
      @SteffensClassroom  Год назад +1

      Hello!
      I would try something like:
      sum var replace var = (var - `r(min)') / (`r(max)'-`r(min)')
      You can extend this to a loop if you need to do this for many variables at once.

    • @NathanCats777
      @NathanCats777 Год назад +1

      @@SteffensClassroom Thanks a lot! Very useful. On the same note, I am trying to rescale a 1 to 7 variable in an 11 point scale (0-10), plus I would like to reverse the variable so that the higher values become the lowest. Do you have any advise on that? I guess I should first subtract 1 from the variable, but then how do I "stretch" it to 10?

    • @SteffensClassroom
      @SteffensClassroom  Год назад

      @@NathanCats777 re-scaling: use basic math ;)
      For the reverse order, there is a Stata command called revrs I believe.

    • @NathanCats777
      @NathanCats777 Год назад +1

      @@SteffensClassroom Thanks a lot, actually revrs command did not work, but I managed to do it by abs(r(max)-var) and it worked

    • @SteffensClassroom
      @SteffensClassroom  Год назад +1

      @@NathanCats777 Happy it worked out :)

  • @mahdouch_Mahdi_FCB
    @mahdouch_Mahdi_FCB 2 года назад

    Is sd can help to reduce non normality distributed data ??? Thank you

    • @SteffensClassroom
      @SteffensClassroom  2 года назад +1

      Hi! Thanks for your question. In short: no. Standardization shifts and scales a given distribution. It does however not change its shape.

    • @mahdouch_Mahdi_FCB
      @mahdouch_Mahdi_FCB 2 года назад

      @@SteffensClassroom Thank you for your response, can you help me with any solutions to transform data to normal distribution?

    • @SteffensClassroom
      @SteffensClassroom  2 года назад

      Hi again,
      Please mail me. Then we can discuss this further.