Hi,

I have panel data and defined my variables accordingly:
xtset id q_date,q
if i want to standardize a variable by taking (v1-mean of v1)/(standard deviation of v1), can i do it as :

egen zv1=std(v1) ?? or should i standardize v1 for for each company(id)? in otherwords do we standardize at the aggregate level for all companies or for each company alone? if it is the latter how can i modify the codes?

thanks