I am trying to automate logistic regression in R. Basically, my source code will generate a new equation everyday as the input data is updated, (Variables, data format etc are same) and print out te significant variables with corresponding coefficients. When I use step function, sometimes the resulting coefficients are not significant. Therefore, I want to update my set of coefficients and get rid of all the ones that are not significant enough. Is there a function or automated way of doing it? If not, the only way I can think of is writing a script on another language that takes the coefficients and corresponding P value and checking significance, and rerunning R accordingly. But even for that, do you know how can I get only P values and coefficients of variables. I can either print whole summary of regression result with "summary" function. I can't reach only P values.
Thank you very much