POL232H1 Chapter 3: Chapter 3_ Transforming Variables
Document Summary
Many situations where variable transformations become desirable or necessary. May transform factor (ordered or unordered) into a numeric indicator variable (coded 1 for all cases having an attribute and 0 for all cases not having it) Collapse a numeric variable, combining value or codes into a smaller number of meaningful categories. A common use of mathematical operators is converting a variable encoded as a percentage to one encoded as a proportion by dividing by 100. Inverting variable values so that higher values correspond to more of the characteristic being measured. R is case sensitive, enter values matching the dataset desired. Indicator variables are numeric interpretations of logic statements. 1 for any case having a measured attribute. 0 for any case not having that attribute. Known as dummy variables or binary variables. As. numeric function translates true and false values into a series of 1s and 0s.