Lag order for Granger causality test Suppose I'm considering several independent variables for possible inclusion in an ARIMAX model I'm developing. Before fitting different variables, I'd like to screen out variables that exhibit reverse causality by using a Granger test (I'm using the granger.test function from the MSBVAR package in R, although, I believe other implimentations work similarly). How do I determine how many lags should be tested?
The R function is: granger.test(y, p), where y is a data frame or matrix, and p is the lags. 

The null hypothesis is that the past $p$ values of $X$ do not help in
  predicting the value of $Y$.

Is there any reason not to select a very high lag here (other than the loss of observations)? 
Note that I have already differenced every time series in my data frame, based on the order of integration of my dependent time series. (E.g., differencing my dependent time series once made it stationary. Therefore, I also differenced all "independent" time series once.)
 A: The trade-off is between bias and power. Too few lags, you have a biased test because of the residual auto-correlation. Too many, you allow for potentially spurious rejections of the null - some random correlation might make it look like $X$ helps predict $Y$. Whether or not that's a practical concern depends on your data, my guess would be to lean higher, but lag length can always be determined as follows:
Granger causality always has to be tested in the context of some model. In the specific case of the granger.test function in R, the model has p past values of each of the two variables in the bivariate test. So the model it uses is:
$$
y_{i,t}=\alpha+\sum_{l=1}^p \beta_ly_{i,t-l} + \gamma_lx_{i,t-l}+\epsilon_{i,t}
$$
A conventional way to choose $p$ for this model would be to try this regression with various values of $p$ and use keep track of the AIC or BIC for each lag length. Then run the test again using the value of $p$ which had the lowest IC in your regressions.
In general the number of lag in the model can be different for $x$ and $y$ and a Granger test will still be appropriate. It's in the specific case of the implementation of granger.test that your constrained to the same number of lags for both. This is a matter of convenience not a theoretical necessity. With different lag lengths for the two variables, you can still use the AIC or BIC to select your model, you'll just have to compare many combinations $n$ lags of $x$ and $m$ lags of $y$. See this.
Just an extra word - because the Granger test is model dependent, omitted variables bias may be a problem for Granger causality. You may want to include all the variables in your model, and then use Granger causality to exclude blocks of them instead of using the granger.test function which only does pair-wise tests.
