创建一个新变量并赋值,但指令错误,不明白问题在哪里,还请各位帮忙!谢谢大家!
指令如下:
gen modern1 = -0.8199071 if cohort <= 1954
replace modern1 = -0.5124775 if cohort > 1954 & <= 1959
replace modern1 = -0.7864658 if cohort>1959 & <= 1964
. replace modern1 = -0.5124775 if cohort > 1954 &<= 1959
<=1959 invalid name
r(198);
. replace modern1 = -0.7864658 if cohort>1959 & <= 1964
<=1964 invalid name
r(198);