Displaying 1 result from an estimated 1 matches for "mldose_asmatrix".
2009 Oct 12
1
Speed up and limit memory usage of lm()
...lt;- lm(RSSYS10 ~ RS_AGE + RS_AGESQ + SEX + RS_BMI + SNP_A1,data=data)
modelc <- lm(RSSYS10 ~ RS_AGESQ + SEX + RS_BMI + SNP_A1 * RS_AGE,data=data)
p1 <- anova(model,modelb)$P[2]
p2 <- anova(model,modelc)$P[2]
p3 <- anova(modelb,modelc)$P[2]
}
result_matrix <- apply(mldose_asmatrix[,2:ncol(mldose_asmatrix)],2,frssys)
Data frame sys_pheno has all variables except SNP_A1. In matrix mldose_asmatrix is a series of variables (columns), which are called SNP_A1 in the function frssys. Matrix mldose_asmatrix is very big with up to 50 000 columns and it happens that R runs out of...