Statalist The Stata Listserver


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

st: generating one measure standard deviation for two time series variables


From   "Seth Binder" <seth.binder@yale.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: generating one measure standard deviation for two time series variables
Date   Fri, 14 Jul 2006 13:49:09 -0400

Dear all,

I have daily time series data on minimum and maximum values for a given
variable, such that my dataset has three variables: date, maxvar, minvar.

I'm trying to calculate the overall standard deviation of my observations
for var. So far, I have tried to -reshape- my data from this wide form to a
long form such that the set of variables appears to be: date, min/max, var.
The idea is to then simply use -egen- sd(var), but I haven't been able to
reshape my data. 

Does anyone have any advice on how to properly -reshape- for my purposes, or
simply a quicker/better way to calculate the sd of var? 

Thanks,
Seth


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index