Hi everyone. This is my first time posting on this forum so my apologies if there is anything I miss or don't post correctly. I am trying to create a compliance variable to measure whether class sizes in an urban city are in compliance with a new class size mandate or not. The variable "MaximumClassSize has manyvalues ranging from 1-34, but it also has values that are listed "<15," ">15" "<34" and etc. How should I recode these while still keeping it as a non-categorical variable?
So far, I've done this:
destring MaximumClassSize, generate(MaximumClassSizenum) force
list MaximumClassSize MaximumClassSizenum if missing(MaximumClassSizenum)
destring MaximumClassSize, replace ignore("<15"|"<6"|">34"|">15")
What should I do from here? I want to retain these less than or greater values, but I don't know how.
So far, I've done this:
destring MaximumClassSize, generate(MaximumClassSizenum) force
list MaximumClassSize MaximumClassSizenum if missing(MaximumClassSizenum)
destring MaximumClassSize, replace ignore("<15"|"<6"|">34"|">15")
What should I do from here? I want to retain these less than or greater values, but I don't know how.
Comment