GOptions Device=Win;
Data TR;
Infile 'X:\...' ExpandTabs;
Input Con Ct Class;
Run;
Title1 'Real-time PCR Data Analysis';
Title2 'Print out All the Data';
Data TR; set TR;
lcon=log(Con)/log(2);
Proc print data=TR;
run;
Title2 'Estimation of PCR Efficiency for Each Gene and Sample Combination.';
Proc mixed Data = TR;
By Class;
Model Ct = lcon /Cl Alpha=0.05;
Run;
/* The following program helps to analyze the data when the PCR efficiencies
for all reactions are equal, but not equal to 2.*/
Title2 'Testing Equal PCR Efficiency.';
Proc Glm Data=TR;
Class Class;
Model Ct = lcon Class lcon*Class;
lsmeans Class / stderr pdiff;
Run;
Title2 'Estimate the Grouped PCR Efficiency.';
Proc mixed Data=TR;
model Ct = lcon /CL solution Alpha=0.05;
Run;
Title2 'Calculate the deltaCt with Adjusted Efficiency';
PROC MIXED data=TR1 Order=Data;
CLASS Class Con;
MODEL Ct = Con Class Con*Class/SOLUTION NOINT;
Contrast 'Intercepts' Class 1 -1 -1 1;
Estimate 'Intercepts' Class 1 -1 -1 1/cl;
Run;
/*The following program can be used to analyzed the real-time PCR data with unequal
efficiency between the genes. The program can be used to test the equal PCR
efficiency and estimate the grouped efficiency for each gene. The program also derives
the delta Ct for each gene.*/
Title2 'For Gene 1, Test the Equal PCR Efficiency, Estimate the Grouped Efficiency';
Data TR1;
set TR;
if Class = 1 or Class = 2;
Run;
Proc Print Data=TR1;
Run;
Proc Glm Data=TR1 Order=Data;
Class Class;
Model Ct = lcon Class lcon*Class;
lsmeans Class / stderr pdiff;
Run;
Proc mixed Data=TR1 Order=Data;
model Ct = lcon /CL solution Alpha=0.05;
Run;
Title2 'For Gene2, Test the Equal PCR Efficiency, Estimate the Grouped Efficiency.';
Data TR2;
set TR;
if Class = 3 or Class = 4;
Run;
Proc Print Data=TR2;
Run;
Proc Glm Data=TR2;
Class Class;
Model Ct = lcon Class lcon*Class;
lsmeans Class / stderr pdiff;
Run;
Proc mixed Data=TR2;
model Ct = lcon /CL solution Alpha=0.05;
Run;
Title2 'Calculate the deltadeltaCt with Adjusted efficiency';
PROC MIXED data=TR2 Order=Data;
CLASS Class Con;
MODEL Ct = Con Class Con*Class/SOLUTION NOINT;
Contrast 'Intercepts' Class 0.925 -0.925 -0.987 0.987;
Estimate 'Intercepts' Class 0.925 -0.925 -0.987 0.987/cl;
Run;