search for: snp1_add

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

2006 Aug 31
3
predict.lm within a function
...my.lm,(data.frame(predict_variable=y,rbind(mean(mydata, na.rm=T),mean(mydata, na.rm=T), mean(mydata,na.rm=T)), row.names=as.numeric(names(table(mydata$predict_variable)))))) } outside of the function, the following commands do exactly what I want: my.lm <- lm(LDL ~ AGE + SEX + factor(SNP1_add), data=testdata) predict.lm(my.lm,(data.frame(SNP1_add=y,rbind(mean(testdata, na.rm=T),mean(testdata, na.rm=T), mean(testdata,na.rm=T)), row.names=as.numeric(names(table(testdata$SNP1_add)))))) where SNP1_add is the variable to predict for, but when I run my.fun(formula=LDL ~ AGE + SEX + factor...