You could use the value labels:
tsline var_X, ylabel(1/26, valuelabel)
Question
I have a time series dataset where each data point contains a categorical rating. To use the dataset in regression analysis, I linearly transformed my dataset by replacing each category string with a corresponding number drawn from a linear sequence (say, A = 1, B = 2, C = 3, ..., Z = 26).
However, I would still like to have some plots that depict the development of the rating over time. Ideally, I would want the y-axis to be labeled with the original category, rather than the number I applied in the transformation. Is that possible?
EDIT: The observations are labeled. So, essentially I would like to use the labels, rather than the values on the y-axis.
Solution
You could use the value labels:
tsline var_X, ylabel(1/26, valuelabel)
OTHER TIPS
Found an answer. The y-axis can be manuall replace by using the plot option ylabel
. E.g.
global ylabels 1 "A" 2 "B" 3 "C"
tsline var_X, ylabel($ylabel)
would replace values 1-3 on the y-axis by A, B, C.