I'm trying to run a matched pairs t-test (SAS 9.3) on some gene expression data, matching the gene expression values for unaffected subjects to expression for affected subjects. The two affection states make the two variables unaffected_gene_x and affected_gene_x. There are at least 2500 genes so I've constructed a macro. Problem is, results come up with n=0. Here is the code: (I've set total=10 for the macro so I could check if it worked before doing all the genes) %macro runtime(total);
%do I=1 %to &total.;
proc ttest data=pairs;
paired unaffected_gene_&i.*affected_gene_&i.;
run;
%end;
%mend;
%runtime(10); I have double checked the pairs dataset to ensure it has all the appropriate data. Each variable has 3 observations and 3 missing values (n=6 total individuals). For example, the variable unaffected_gene_1 has 3 values for the unaffected individuals, and 3 missing values for the affected individuals. Log does not indicate any errors (ie. finding the variables).
... View more