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

st: Issue with statsby

From   "Nuno" <>
To   <>
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)?



*   For searches and help try:

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