I had set of binary variables. To apply logistic regression, I have checked association between dependent and independent variables and considered only those independent variables in the model which came to be associated with dependent variable. My query is whether it is an appropriate way of fitting logistic regression model.
(1) Do you really need a smaller model? If not, you're set.
(2) Can you honestly pre-specify your model? From your knowledge of the field can you choose a subset of predictors your interested in without using your knowledge of this dataset? If so, you're set.
(2.5) If all your data valid? Assess this without looking at outcomes.
(3) Consider using some form of shrinkage method. Ridge, lasso, elastic-net... Ameliorates some of the issues with model reduction.
(4) If none of the above apply to you, consider some traditional form of model reduction. Stepwise or the uni-variate screening mentioned in the post. Be aware that with EPV<50 this approach has limitations. Perform some form of internal validation. Bootstrap generally preferable (unless very large.? >10,000 obs if often quoted here, but no consensus that I'm aware of. in smaller datasets split sample unstable, also doesn't give you stability of variable selection provided by bootstrap). In each bootstrap include the whole model building process (univariate select or stepwise).