(defun assign_strata (g8ctrl g8regon g8urban g8minor) (case g8ctrl (1 (case g8regon (1 (setf h 1)) (2 (setf h 2)) (3 (setf h 3)) (4 (setf h 4)) (8 (setf h 5)))) (2 (case g8regon (1 (setf h 6)) (2 (setf h 7)) (3 (setf h 8)) (4 (setf h 9)) (8 (setf h 10)))) (3 (case g8regon (1 (setf h 11)) (2 (setf h 12)) (3 (setf h 13)) (4 (setf h 14)) (8 (setf h 15)))) (4 (case g8regon (1 (setf h 16)) (2 (setf h 17)) (3 (setf h 18)) (4 (setf h 19)) (8 (setf h 20)))) ) (case g8ctrl (1 (case g8urban (1 (case g8minor (0 (setf l 1)) (1 (setf l 1)) (2 (setf l 1)) (3 (setf l 1)) (4 (setf l 2)) (5 (setf l 2)) (6 (setf l 2)) (7 (setf l 2)) (8 (setf l 3)))) (2 (case g8minor (0 (setf l 1)) (1 (setf l 1)) (2 (setf l 1)) (3 (setf l 1)) (4 (setf l 2)) (5 (setf l 2)) (6 (setf l 2)) (7 (setf l 2)) (8 (setf l 3)))) (3 (case g8minor (0 (setf l 1)) (1 (setf l 1)) (2 (setf l 1)) (3 (setf l 1)) (4 (setf l 2)) (5 (setf l 2)) (6 (setf l 2)) (7 (setf l 2)) (8 (setf l 3)))))) (2 (case g8urban (1 (setf l 1)) (2 (setf l 2)) (3 (setf l 2)))) (3 (setf l 1)) (4 (setf l 1)) ) ) (setf h_list(repeat 0 1035)) (setf l_list(repeat 0 1035)) (dotimes (i 1035) (assign_strata (nth i g8ctrl) (nth i g8regon) (nth i g8urban) (nth i g8minor)) (setf (nth i h_list) h) (setf (nth i l_list) l) ) (def school_id(nth 15 data-nonmiss)) (def g8ctrl(nth 9 data-nonmiss)) (def bysc47b(nth 0 data-nonmiss)) (def bysc47c(nth 1 data-nonmiss)) (def bysc47d(nth 2 data-nonmiss)) (def bysc47g(nth 3 data-nonmiss)) (def bysc47j(nth 4 data-nonmiss)) (def bysc47m(nth 5 data-nonmiss)) (def bysc47n(nth 6 data-nonmiss)) (def bysc47o(nth 7 data-nonmiss)) (def g8type(nth 13 data-nonmiss)) (def byscenrl(nth 8 data-nonmiss)) (def g8enrol(nth 10 data-nonmiss)) (def g8urban(nth 14 data-nonmiss)) (def g8regon(nth 12 data-nonmiss)) (def g8minor(nth 11 data-nonmiss)) (length (select h_list (which (= 1 h_list))))