search for: qtn_pre

Displaying 1 result from an estimated 1 matches for "qtn_pre".

2007 Jan 21
2
efficient code. how to reduce running time?
...lue depends on QTN genotype, pi, p, and z Y <- sqrt(10-(10*pi))*z + QTN*sqrt((10*pi)/(2*p*(1-p))); snp = data.frame(cbind(snp, Y)); # anova for QTN df=data.frame(Y=Y, QTN=factor(QTN)); QTN_a <- anova(lm(Y~QTN, data=df)); print (QTN_a); SSB <- QTN_a$`Sum Sq`[1]; SSW <- QTN_a$`Sum Sq`[2]; QTN_PRE <- SSB / (SSB + SSW); print (paste("var_QTN/var_tot:", QTN_PRE)); # anova for all sites F=numeric(S) #create an empty vector to store the F-values Pval=rep(1,S) #create an empty vector to store the Pval PRE=numeric(S) #create an empty vector to store the PRE for ( i in sites )...