Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Create a Dummy Based on Standard Deviation


From   Shan Ghimire <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Create a Dummy Based on Standard Deviation
Date   Mon, 10 Sep 2012 23:43:52 -0400

Dear Listers,
I have a panel data on 'X', say i=100 and t=5, giving N = 500, with mean=18 and sd = 4. Now, I want to create a dummy variable 'Y' for each observation where Y =1 {if the observation 'X' is within 1 standard deviation from the mean of X}, otherwise give it a value 0. It sounds like it's not too difficult but I am really spending too much time trying to figure it out. Could somebody help me, please? 
Thank you. 
Shan 		 	   		  
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index