Hi
I want to change the month number to a season for the variable camonth
month from 1 to 5 = spring
month from 9 to 12 = autumn
months from 6 to 8 others
in data HO
I did this code which results in missing data
if camonth = 1 then camonth = autumn;
if camonth = 2 then camonth = autumn;
if camonth = 3 then camonth = autumn;
if camonth = 4 then camonth = autumn;
if camonth = 5 then camonth= autumn;
if camonth = 6 then camonth = other;
if camonth = 7 then camonth = other;
if camonth = 8 then camonth = other;
if camonth = 9 then camonth = spring;
if camonth = 10 then camonth = spring;
if camonth = 11 then camonth = spring;
if camonth = 12 then camonth = spring;
Regards
camonth
1
2
3
4
5
6
7
8
9
10
11
12