In Excel you can do the calculation of the standard deviation in two different ways in order to perform a Z-Transformation. Once as a formula for sample data and once as a formula for population data. The difference is divided by N or divided by N-1. So this brings minimally different results of the standard deviation and with this the Z-Scores afterwards.
In Stata, the default formula within egen newvar=std (oldvar) is set to a treatment as sample data. I learned this by comparing both Excel versions to the Stata version. The Stata Z transformation matches the Excel Z transformation for sample data. But I can’t find a way to change this within the egen command options. For my purposes, I need the Z-transformation for population data. A workaround would be to just import the calculated Excel values into stata or live with minimal differences, but both are not the perfect solution.
Maybe someone knows a solution for my problem. I would appreciate the help.
Best, Stephan
Related Posts with Z-Transformation for Population Data
Divide data into groups according to percentile rank AND another given variable (if tie exists)Hi experts! I have a four-year repeated cross-sectional data set. I want to divide my observations …
Return for previous year with daily dataHi everybody, i have panel data with gaps in the time variable (weekends, holidays). I want to calc…
calculate the difference between a date n and the first date of a long setPlease I need to calculate the difference between a date n and the first date of a long set. I do no…
How can I extract a part of a string variable which contains zipcode information?Hello, I'm working with Massachusetts zip code data and there are 3 kinds of formats the data is cur…
Calculate daily stock return relative to peak in the last 6 month periodI have daily stock market data and would like to calculate the return for each observation relative …
Subscribe to:
Post Comments (Atom)
0 Response to Z-Transformation for Population Data
Post a Comment