Hi,

I want to calculate the standard deviation for a specific year group i.e.-
year variable SD_variable
1990 1 a
1991 2 a
1992 3 a
1993 4 b
1994 5 b
1995 6 b

There's countrycode also which implies I need to use egen

> bysort countrycode: egen SD_variable= sd(variable)

But the above command calculate SD from 1990-95

Where I want to calculate the same for a specific periods- 1990-92 & 1993-95


Can you please help?