search for: final_str

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

2011 Aug 23
3
GLM question
...*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