Displaying 1 result from an estimated 1 matches for "rs_bmi".
2009 Oct 12
1
Speed up and limit memory usage of lm()
...dels lm(). In this case the execution time and memory usage becomes a huge issue. I have therefore been trying to speed the process and limit the memory usage.
Here follows part of the code do give better understanding of what I am doing:
modela <- lm(RSSYS10 ~ RS_AGE + RS_AGESQ + SEX + RS_BMI)
frssys <- function(SNP_A1,data=sys_pheno, model=modela){
modelb <- 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)...