Hi everyone,
I have a file with over 5 million daily observations for a set of firms. The
format is the following:
id date var1
I'm trying to produce a file that records the variance for each individual
(id) using the following statsby command:
statsby var=r(var), by(id) saving(c:\temp\var.dta, replace): sum var1
The command goes through all the individuals (id) but records var as
missing. Does anyone have an idea why this happens? If I use r(sd) instead
of r(var) everything works fine (still have to transform the sd into var),
but with r(var) I get the missing values...
Additionally, is it possible to increase the number of decimal points of the
output, ie, r(var) or r(sd)?
Best,
Nuno
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/