The HAPLOTYPE Procedure |
This example uses the data from the example Testing for Marker-Trait Associations, with the data now in the tall-skinny format. When this format is used, BY groups can be created in order to estimate haplotype frequencies in nonoverlapping windows of marker loci instead of using a macro as shown in the other example; here four sets of three loci are examined, but in general, loci with the same value of the BY variable are included in the same analysis, so sets of varying sizes can be used as well. The following DATA step is used to input the data.
data gaw_tall; input hap_win markername $ id status $ allele1 allele2; datalines; 1 marker1 1 U 8 4 1 marker1 2 U 5 9 1 marker1 3 A 8 2 1 marker1 4 U 7 8 1 marker1 5 U 9 2 1 marker1 6 U 2 7 1 marker1 7 U 7 7 ... more lines ... 4 marker12 43 U 3 10 4 marker12 44 U 12 6 4 marker12 45 A 5 2 4 marker12 46 U 9 7 4 marker12 47 U 10 1 4 marker12 48 U 10 12 4 marker12 49 U 12 7 4 marker12 50 U 1 10 ;
Using the options TALL, MARKER=, and INDIV=, along with the BY statement to indicate the BY variable representing haplotype windows, the same analysis shown in Testing for Marker-Trait Associations can be performed on the 50 individuals typed at 12 markers by using the following code, where sets of three loci at a time are tested for an association with the trait.
proc haplotype data=gaw_tall tall marker=markername indiv=id noprint; var allele1 allele2; by hap_win; trait status; run;
This produces the same numerical results as those shown in Output 8.4.1.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.