[R] Units

Prof Brian D Ripley ripley at stats.ox.ac.uk
Sat Sep 23 08:57:49 CEST 2000

On Sat, 23 Sep 2000, Michael Hart wrote:

> I used the AR modelling written for R (S) on blood pressure and heart rate
> signals.  I used 60 one second samples and a model order of 20.  I used the
> "ar" finction in the "ts" package.
> Given that blood pressure is measured in mmHg would the spectral density (on
> the graph displayed be [mmHg]sq/Hz ?
> And the heart rate is measured in Beats Per Minute (bpm) - so would the
> displayed spectral density be in (bpm)sq/Hz ?

Well, ar() does not produce spectral densities!  I assume you are using
spectrum() or its helpers spec.pgram and spec.ar. The y-axis there is by
default on *log scale*.  I don't think the units are relevant (essentially
they are determined by its being a spectral density), but the different
definitions of spectral densities in use are pertinent: see the help pages,
and Venables & Ripley for the exact definitions used by S-PLUS (and
followed here).

> I'm sorry if this seems a trivial question, however the resultant values
> seem inconsistent with published data (although the spectral shape seems
> correct).

As ever, read the details!  There is no universally accepted definition of
`spectral density' (nor of `AR process' come to that).

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list