Hi All, I am trying to fit my data with glm model, my data is a matrix of size n*100. So, I have n rows and 100 columns and my vector y is of size n which contains the labels (0 or 1)
My question is: instead of manually typing the model as glm.fit = glm(y~ x[,1]+x[,2]+...+x[,100], family=binomial()) I have a for loop as follows that concatenates the x variables as follows: final_str=NULL for (m in 1:100){ str = paste(x[,m],+,sep="") final_str= paste(final_str,str,sep="") } glm.fit = flm(y~final_str,family=binomial()) but final_str is treated as a string and it does not work. Could you please help me with fixing that? Thanks a lot, Andra ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.