# How to remove the NA from summary of glm? [duplicate]

LogitModel<- glm(y~TimeBetweenStartRegAndEndReg+Age_wn+Train_Data[,1]+Train_Data[,2]+Train_Data[,3]+Train_Data[,4]
+Train_Data[,5]+Train_Data[,6]+Train_Data[,7]+Train_Data[,8]+Train_Data[,9]
+Train_Data[,10]+Train_Data[,11]+Train_Data[,12]+Train_Data[,13]+Train_Data[,14]
+Train_Data[,15]+Train_Data[,16]+Train_Data[,17]+Train_Data[,18]+Train_Data[,19]
+Train_Data[,20]+Train_Data[,21]+Train_Data[,22]+Train_Data[,23]+Train_Data[,24]
+Train_Data[,25]+Train_Data[,26]


all the variables are factor except TimeBetweenStartRegAndEndReg and Age_wn.

the output summary(LogitModel) is not understood for me. there are NA for some variables. what it means that the coefficiant is NA?

And the most important how to remove them NA from the summary?

And another thing how can i print a model just with the significant coefficiant ?

• Sorry for this off-center comment, but I would be surprised if the language you are using (which is what language?) didn't have a simpler syntax for summing an array of numbers. – rschwieb Dec 29 '14 at 11:25
• @rschwieb what? i don't understand you. The script is written in R. – Dima Ha Dec 29 '14 at 11:27
• Thanks for the added info. Doesn't sum(TrainData[,:]) compute that long sum you typed out? I can't test it and my R is a little rusty. – rschwieb Dec 29 '14 at 11:33
• Additional threads concerned with the appearance of NA in regression summaries can be found by searching our site. @rschwieb You are right to suggest there must be a simpler expression, but sum won't do it: the expression in the model is a formula, not an arithmetic summation. y ~ TimeBetweenStartRegAndEndReg + Age_wn + Train_Data[, 1:26] should work fine. – whuber Dec 29 '14 at 14:28