Announcement

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

  • z score as outcome

    Dear Stata users,
    I have two questions. Thanks in advance for your opinion.

    One: Is there a command to directly get the z scores of a variable?

    Question number two: I have a set of predictors and four different outcomes (four different measurement scales).
    Would it make sense to you to transform each outcome value into a z score using the mean for that outcome, and then use a single multilevel model to model the z scores?

    Thanks again.

  • #2
    Can help with Q1: I believe there is a -zscore- program that you can download (use -help zscore- and start from there). But actually it's rather easy to compute it in two lines:

    Code:
    sum your_var
    * quietly sum your_var // use this if you don't want to see the output
    gen your_var_z = (your_var - r(mean))/r(sd)

    Comment


    • #3
      I do not think that transforming to unitless measures is a good idea.

      But if you want to do it anyways, check the user written -center-
      Code:
      net describe center, from(http://fmwww.bc.edu/RePEc/bocode/c)
      or the egen function -egen, std()-

      If you have multiple outcomes with the same predictors this sounds like a Multivariate regression exercise see -mvreg-.

      Comment


      • #4
        I would respond to #3 that it depends (as always): Transforming to unitless measures (and other alternatives such as z/2-scores or percent-of-maximum-possible (POMP) scores) can be a good idea -- perhaps less so in econometrics and more so in psychometrics. Illuminating discussions can be found in Cohen et al. (1999), Gelman (2008), and Smithson & Verkuilen (2006) (see below).

        If you want to transform variables into z-scores (or z/2-scores), think about the issue of listwise deletion of cases with missing values -- it may be that your regression model will use a different subset of cases depending on the missing values in some of the model's variables which will result in a mean and a SD of z-scores different from 0 and 1 in the subset of cases actually used (you can control this with the help of -mark- and -markout- and the -if- qualifier when transforming your variables).

        An .ado-program that offers many different methods of transforming variables (e.g. to z-scores, z/2-scores, POMP-scores, etc.) and simultaneously allows for listwise deletion of missing values (with the -if- qualifier over cases, but also over a user-specified number of variables when calculating scores "row-wise") is -scores- on SSC.

        References:
        Last edited by Dirk Enzmann; 25 Apr 2021, 08:20.

        Comment

        Working...
        X