I want to do regression analyses on particular groups of values of a single variable which need sub setting eg:
sdata = subset(data, variable X ==”1″ | variable X == “5”) which works fine
sdata1 = subset(data, variable X == “1,2,3” | variable X == “4, 5”) doesn’t work
It doesn’t like the “,” in the second example. I specifically want to be able to compare the first group to the second and not a series eg
sdata3 = subset(data, variable X ==”1″ | variable X == “2” | variable X == “3”)
Buttercup is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.