Announcement

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

  • Z-Score Problem

    Hi there,

    I have 2 dependent variables, and they need to be z-transformed because i need to compare the coefficients.
    Therefore they need to have a mean of 0 and a sd of 1.

    I tried several things an all the time the mean was not 0 or it didn`t work at all.

    not with: zscore var (mean was not 0)

    not with: sum var; return list; gen z_var =(var-r(mean))/(r(ad)) --> this didn´t work at all, everything was missing

    not with: gen sd_var=1.497557613512159; gen mean_var=7.563358582616511; gen z_var =var-mean_var/sd_var (mean is not 0)

    I didn`t understand the zcalc command.

    Can sombody help me with the z-scores?
    Thank you
    Anna Hebel

  • #2
    Originally posted by Anna Hebel View Post
    I have 2 dependent variables, and they need to be z-transformed because i need to compare the coefficients.
    I will not comment on the (non-)sense of that popular approach. I recommend King (1986, pp. 669--674) for an illustrative discussion.

    Originally posted by Anna Hebel View Post
    not with: sum var; return list; gen z_var =(var-r(mean))/(r(ad)) --> this didn´t work at all, everything was missing
    There is no r(ad). Typing r(sd) should work.


    King, G. 1986. How not to lie with statistics: Avoiding common mistakes in quantitative political science. American Journal of Political Science, 30(3): 666--687.


    Last edited by daniel klein; 04 Jun 2020, 01:44.

    Comment


    • #3
      Ok thanks, sd did work
      this is the output


      . sum z_plh0182

      Variable | Obs Mean Std. Dev. Min Max
      -------------+---------------------------------------------------------
      z_plh0182 | 7,789 -1.85e-09 1 -5.050463 1.627077

      The mean is not 0

      about king, this is my master thesis and im nearly finished. My Prof said i should do this and thats what im doing

      Comment


      • #4
        The mean is 0.00000000185; I'd say that is close enough to 0 for any practical application. You could generate your variable in double precision to get even closer to 0.

        Do as your Professor says is a valid strategic choice in my view. You will later make similar choices if reviewers insist on it. Holding a masters' degree should, nevertheless, imply that you think for yourself and at least discuss your concerns with others. That includes Professors as well as reviewers.
        Last edited by daniel klein; 04 Jun 2020, 02:17. Reason: miscounted number of 0s ...

        Comment


        • #5
          ok thanks for the help. There was never a Problem i just cant read Numbers.
          To all of the people having Problems with z-scores:

          My favorite option is the findit z-score package https://www.reed.edu/psychology/stat...s/Zscores.html

          Comment

          Working...
          X