Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Issue with statsby


From   "Nuno" <[email protected]>
To   <[email protected]>
Subject   st: Issue with statsby
Date   Fri, 23 Nov 2007 22:03:44 -0000

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index