Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: making new variables for each obs


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: making new variables for each obs
Date   Tue, 25 Jan 2005 14:40:38 -0000

-egen, rsd()- 

Nick 
[email protected] 

[email protected]

> In my dataset,
> each observaion has 23 variables ( year  name  fiscalyear  v1 
>  v2  v3  .........  v20 )
> 
> I'd like to make vars of standard deviation of sequential 10 
> variables.
> 
> in other words,
>                                                               
>                          new variables
>                                                               
>                            -----------
>    standard deviation of 10 variables  ( for v1 to v10 )  -->   std1
>    standard deviation of 10 variables  ( for v2 to v11 ) -->    std2
>    standard deviation of 10 variables  ( for v3 to v12 ) -->    std3
>     .
>     .
>     .
>     .
>    standard deviation of 10 variables  ( for v11 to v20 ) -->  std11

*
*   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