Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Does anyone understand how the argument "span" is used in spec.pgram in R? From the help menu, it provides the following examples:

spectrum(ldeaths)
spectrum(ldeaths, spans = c(3,5)) gives bandwidth= 0.241
spectrum(ldeaths, spans = c(5,7)) gives bandwidth= 0.363
spectrum(ldeaths, spans = 3)      gives bandwidth= 0.127
  1. What do c(3,5) and c(3,7) or spans=3 represent?

  2. How the bandwidths are calculated?

Thanks!

share|improve this question

1 Answer

When in doubt, read the help files.

help(spec.pgram)

spans: vector of odd integers giving the widths of modified Daniell smoothers to be used to smooth the periodogram.

bandwidth: The equivalent bandwidth of the kernel smoother as defined by Bloomfield (1976, page 201).

share|improve this answer
Thanks for the reference to Bloomfield's book. But could you please elucidate the difference between span=3 vs span c(3,3)? I read the help file, but I don't get it. – econ Apr 24 '12 at 7:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.