General characteristics - SAS vs Python
2020. 6. 11. 19:37
continuous -> categorical 변수로 만들기 [age] /***sas***/ DATA WORK.HD1; SET HD_origin; do i = 0 to 9; if age >= i*10 & age < (i+1)*10 then age_c = i; end; drop i; ### python hd["age_c"] = hd["age"].apply(lambda x: x//10) [BMI] (결측값 존재) /***sas***/ IF BMI='.' then bmi_c="NT"; /* BMI missing 처리-안할경우 'L'로 분류됨 */ else IF BMI 0.0001: print("{} :".format(i), stats.chi2_contingency(crosstab)..