How to determine the critical values of ACF? I have a sample of 1000 data points and I used it as the training sample to forecast with Timeseries. My lecture suggested me comparing the ACF with its critical values (upper and lower) numerically rather than looking at the graph. 
Here are my ACF values: 

Question: How do I come up with the upper and the lower critical values for the ACF? Is there any function in R to yield these values? 
 A: Based on this source, it looks like under the null the autocorrelation is asymptoticaly standard normal. The 5% critical values of the autocorrelation at any given lag $d$ ($d \neq 0$) are
$$\pm \frac{1.96}{\sqrt{T-d}}$$
where $T$ is the sample size.
In your case, $T=1000$, so the critical values for lag 1 are $\pm \frac{1.96}{\sqrt{1000-1}} \approx 0.06201$, for lag 2 are $\pm \frac{1.96}{\sqrt{1000-2}} \approx 0.06204$, and so on.
Mind also a note from another source:

Additionally, in small sample conditions ... this test may be overly conservative such that the null hypothesis is rejected (residuals indicated as non-white) less often than indicated by the chosen significance level (Lutkepohl, 2006).

However, it is not likely to be relevant for a sample as large as 1000.

Related question: "How is the confidence interval calculated for the ACF function?".
A: Since the standard deviation of the acf is approximately = 1/SQRT(NOB) it is so approximate that it is practically useless for large sample sizes . If your "reason" for obtaining critical values is to automatically identify the form of the ARIMA model , you can stop right now ! . Identification of a reasonable starting model for the ARIMA structure is better conducted via approaches like the Inverse Autocorrelation Function http://www.jstor.org/stable/2982488?seq=1#page_scan_tab_contents which is the basis of how AUTOBOX (a piece of software that I have helped develop) effectively solves the riddle.
