Hi, I am trying to run a Newey-West regression, however I do not quite understand how should I choose the number of lags for the regression, do I have to base the lags on the dependent variable or the independent variable. Also, my regression involves multiple independent variables, hence different lags for autocorrelation may be indicated.

CSAD = alpha + beta1(variable1) + beta2(variable2) + beta3(variable4) + residual
I know that to identify the lags of autocorrelation I would have to use
Code:
ac(variable)
, but since I have multiple variables, what should I do, should I just choose the largest lag value from all the independent and the dependent variable?

The data I am looking at is time series.