Hello everyone, I am a beginner level and I have questions about the missing values. In this example, I do not understand why in the condition of the third line it establishes that condition for the missing values, if already in the first line and according to the indications, the missing values were considered in level 1.
"We wanted to split people into 3 achievement levels to best address each group's needs.
Generate a variable that divides the students into 3 tracked groups of different levels (call the variable level), those below 25, those above 80 and those in the middle. Assign the missings to the lowest level just for the purposes of this exercise."
gen level = 1 if math < 25 | math == .
replace level = 2 if math >=25 & math < 80
replace level = 3 if math >= 80 & math != .
Thanks
"We wanted to split people into 3 achievement levels to best address each group's needs.
Generate a variable that divides the students into 3 tracked groups of different levels (call the variable level), those below 25, those above 80 and those in the middle. Assign the missings to the lowest level just for the purposes of this exercise."
gen level = 1 if math < 25 | math == .
replace level = 2 if math >=25 & math < 80
replace level = 3 if math >= 80 & math != .
Thanks
Comment