Need to recode responses to no based on skip patterns There are a number of

Need to recode responses to no based on skip patterns

This preview shows page 4 - 6 out of 20 pages.

2. Need to recode responses to "no" based on skip patterns ; 7 . ) ; ;
Image of page 4
4. Need to collapse response categoriesIf a variable has many response categories, it can be difficult to interpret the statistical analyses in which it is used. Alternatively, there may be too few subjects or observations identified by one or more response categories to allow for a successful analysis. In these cases, you would need to collapse across categories. For example, if you have the following categories for geographic region, you may want to collapse some of these categories: Region: New England=1, Middle Atlantic=2, East North Central=3, West North Central=4, South Atlantic=5, East South Central=6, West South Central=7, Mountain=8, Pacific=9.New_Region: East=1, West=2.SPSSCOMPUTE new_region=2IF (region=1| region=2|region=3| region=5|region=6) new_region=1STATAgenerate new_region =2replace new_region=1 if region==1| region==2|region==3| region==5|region==6OR by using the recode commandrecode region (1/3 5 6=2)gen(new_regionSASif region=1 or region=2 or region=3 or region=5 or region=6 thennew_region=1else if region=4 or region=7 or region=8 or region=9thennew_region=2RmyData$new_region[myData$region == 1 | myData$region == 2 | myData$region == 3 | myData$region == 5 | myData$region == 6] <-1myData$new_region[myData$region == 4 | myData$region == 7 | myData$region == 8 | myData$region == 9] <- 5. Need to aggregate variables . . ) ; ; 2
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 20 pages?

  • Summer '16
  • naveen rathi
  • Statistics

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture