Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: standard deviation


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: standard deviation
Date   Sun, 26 Oct 2008 16:54:22 -0000

Steven's suggestion reduces your dataset to one observation for each
combination of code and period. 

An alternative tactic is to tag just one observation, but otherwise
leave the data as they were. 

egen tag = tag(indcode period) 

Then you can reduce your data on the fly to one each combination by
doing stuff 

... if tag 

Nick 
[email protected] 

Steven Samuels

bysort indcode period: keep if _n==1

Then drop the individual variables like iccl.  By the way, the log   
of the SD will probably be a much better response variable than the  
SD itself.

On Oct 25, 2008, at 4:29 AM, somsupa Nopprach wrote:

> By the way, if i want to use the sd variable as a new time series  
> variable . how i can do it? should i use the reshape command  
> because now sd is duplicate ?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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