Stepwise regression in R – Critical p-value What is the critical p-value used by the step() function in R for stepwise regression? I assume it is 0.15, but is my assumption correct? How can I change the critical p-value? 
 A: As said above, the step function in R is based on AIC criteria. But I guess by p-value you mean alpha to enter and alpha to leave. What you can do is to use the function stepwise written by Paul Rubin and available here. As you can see you have the arguments of alpha.to.enter and alpha.to.leave that you can change. Note that this function uses the F-test or equivalently t-test to select the models. Moreover, it can handle not only stepwise regression but also forward selection and backward elimination as well if you properly define the arguments.
A: As I explained in my comment on your other question, step uses AIC rather than p-values.
However, for a single variable at a time, AIC does correspond to using a p-value of 0.15 (or to be more precise, 0.1573):
Consider comparing two models, which differ by a single variable. Call the models $\cal{M}_0$ (smaller model) and $\cal{M}_1$ (larger model), and let their AIC's be $\text{AIC}_0$ and $\text{AIC}_1$ respectively.
Using the AIC criterion, you'd use the larger model if $\text{AIC}_1<\text{AIC}_0$. This will be the case if $-2\log\cal{L_0}-(-2\log\cal{L_1})>2$.
But this is simply the statistic in a likelihood ratio test. From Wilks' theorem, we'll reject the null if the statistic exceeds the upper $\alpha$ quantile of a $\chi^2_1$. So if we use a hypothesis test to choose between the smaller model and the larger, we choose the larger model when $-2\log\cal{L_0}-(-2\log\cal{L_1})>C_\alpha$.
Now $2$ lies at the 84.27 percentile of a $\chi^2_1$. Hence, if we choose the larger model when it has smaller AIC, this corresponds to rejecting the null hypothesis for a test of the additional term with a p-value of $1-0.843=0.157$, or $15.7\%$

So how do you modify it?
Easy. Change the k parameter in step from 2 to something else. You want 10% instead? Make it 2.7:
qchisq(0.10,1,lower.tail=FALSE)
[1] 2.705543

You want 2.5%? Set k=5:
qchisq(0.025,1,lower.tail=FALSE)
[1] 5.023886

and so on.

However, even though that solves your question, I advise you to pay close attention to Frank Harrell's answer on your other question, and to search out responses from a great many statisticians on other questions relating to stepwise regression here, which advice tends to be very consistently to avoid stepwise procedures in general.
