Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Create a Dummy Based on Standard Deviation

From   Shan Ghimire <>
To   "" <>
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. 
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index