Hi, I have a database of grades organized by subject and exam year. I have calculated z scores for each grade relative to subject and year, using the following command:
The code seems to work, however the variable z_grade has missing values for about a third of the observations in the database, despite the fact that these observations are not missing grade, subject or year data. Does anyone know why this may be happening? I have tried various solutions to no avail. Thank you.
Code:
egen z_grade = std(grade), by(subject year)
Comment