Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Nonparametric estimate for spectral density and smoothing in r We\'ve just learn

ID: 3320792 • Letter: N

Question

Nonparametric estimate for spectral density and smoothing in r

We've just learned nonparametric estimate of spectral density, and the book doesn't explain it well. We have a r assignment that need to find a nonparametric estimate and find predominant periods. I am just confused in how much should I smooth, and what am I looking for in the smoothed graph.

Here is the priodogram of the data. And we need to smooth it using kernel and/or taper.

Then I try kernel("modified daniell", c(4,4)) and the graph looks like this.

The periodogram with modified daniell is smoother, but I don't know if I've oversmoothed it and I don't know what to look for in the graph. The original data has three peaks, so I found three predominant periods while the last smooth graph had one peak, meaning that I can only find one predominant period. Do we want to smooth the graph but keep the three peaks or just keep a general shape like the last smoothed periodogram? And since we are really just looking at the left portion of raw periodogram, would tapering help in this problem?

We've just learned nonparametric estimate of spectral density, and the book doesn't explain it well. We have a r assignment that need to find a nonparametric estimate and find predominant periods. I am just confused in how much should I smooth, and what am I looking for in the smoothed graph.

Here is the priodogram of the data. And we need to smooth it using kernel and/or taper.

The command for kernel smoothing is kernel("daniell",m). I am just confused on how should I choose m. The book just says try different values of m and find the better one. But I don't know what makes a good m-value. I use kernel("daniell", 4) and the graph looks like this.

Then I try kernel("modified daniell", c(4,4)) and the graph looks like this.

The periodogram with modified daniell is smoother, but I don't know if I've oversmoothed it and I don't know what to look for in the graph. The original data has three peaks, so I found three predominant periods while the last smooth graph had one peak, meaning that I can only find one predominant period. Do we want to smooth the graph but keep the three peaks or just keep a general shape like the last smoothed periodogram? And since we are really just looking at the left portion of raw periodogram, would tapering help in this problem?

0.0 0.2 0.4 0.6 0.8 1.0 frequency

Explanation / Answer

Yes, you are correct!

As you increase the m value, the peak values would disappear. So, reduce the m value and see how the graph changes in the kernel("daniell",m) and kernel("daniell",c(m,m)).

Also, to know where the peak values are located, assign a name to your program output.

These commands would represent a vertical dotted lines in your spectral density plot at the approximate points of the peak densities.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote