11-12-2014 11:06 AM
I have two different groups (for the purpose of this discussion, lets just say males vs. females) and I am trying to compare the number of missed days of school between the two groups. The problem is, in the data there are two separate variables for missed school days for the two groups (i.e. for males, the variable is missedschool_males and females, missedschool_females; there's a reason why there are separate variables in the dataset, but I won't go in to that). Obviously, the information is the same, I just need to combine the values into one general missed_days_school variable and determine group differences using this new variable. Can someone please help me to do this. Thanks.
11-12-2014 11:09 AM
Several ways I can think of right off the bat, however probably the easiest:
You could do it by and if statement. Or a rename. Its your choice.
11-12-2014 11:51 AM
Or create a temporary data set to analyze that issue:
keep type daysmissed;/* and any other identification variables of interest*/
Then you can run tests on DaysMissed classed by type for t-tests, comparison of distributions whatever.