BabySS              package:wavethresh              R Documentation

_P_h_y_s_i_o_l_o_g_i_c_a_l _d_a_t_a _t_i_m_e _s_e_r_i_e_s.

_D_e_s_c_r_i_p_t_i_o_n:

     Two linked medical time series containing 2048 observations
     sampled every 16 seconds recorded from 21:17:59 to 06:27:18. Both
     these time series were recorded from the same 66 day old infant by
     Prof. Peter Fleming, Dr Andrew Sawczenko and Jeanine Young of the
     Institute of Child Health, Royal Hospital for Sick Children,
     Bristol. 'BabyECG', is a record of the infant's heart rate (in
     beats per minute). 'BabySS' is a record of the infant's sleep
     state on a scale of 1 to 4 as determined by a trained expert
     monitoring EEG (brain) and EOG (eye-movement). The sleep state
     codes are 1=quiet sleep, 2=between quiet and active sleep,
     3=active sleep, 4=awake.

_F_o_r_m_a_t:

     The 'BabyECG' time series is a nice example of a non-stationary
     time series whose spectral (time-scale) properties vary over time.
     The function 'ewspec' can be used to anaylse this time series to
     inspect the variation in the power of the series over time and
     scales. 

     The 'BabySS' time series is a useful independent time series that
     can be associated with changing power in the 'BabyECG' series. See
     the discussion in Nason, von Sachs and Kroisandt.

_R_E_L_E_A_S_E:

     Version 3.9 Copyright Guy Nason 1998

_S_E_E _A_L_S_O:

     'ewspec'

_E_X_A_M_P_L_E_S:

     #

     # Plot the BabyECG data with BabySS overlaid

     #

     # Note the following code does some clever scaling to get the two

     # time series overlaid.

     #

     myhrs <- c(22, 23, 24, 25, 26, 27, 28, 29, 30)

     mylab <- c("22", "23", "00", "01", "02", "03", "04", "05", "06")

     initsecs <- 59 + 60 * (17 + 60 * 21)

     mysecs <- (myhrs * 3600)

     secsat <- (mysecs - initsecs)/16

     mxy <- max(BabyECG)

     mny <- min(BabyECG)

     ro <- range(BabySS)

     no <- ((mxy - mny) * (BabySS - ro[1]))/(ro[2] - ro[1]) + mny

     rc <- 0:4

     nc <- ((mxy - mny) * (rc - ro[1]))/(ro[2] - ro[1]) + mny

     plot(1:length(BabyECG), BabyECG, xaxt = "n", type = "l", xlab = 

     "Time (hours)", ylab = "Heart rate (beats per minute)")

     lines(1:length(BabyECG), no, lty = 3)

     axis(1, at = secsat, labels = mylab)

     axis(4, at = nc, labels = as.character(rc))

     #

     # Sleep state is the right hand axis

     # #

_S_o_u_r_c_e:

     Institute of Child Health, Royal Hospital for Sick Children,
     Bristol.

_R_e_f_e_r_e_n_c_e_s:

     Nason, G.P., von Sachs, R. and Kroisandt, G. (1998). Wavelet
     processes and adaptive estimation of the evolutionary wavelet
     spectrum. _Technical Report_, Department of Mathematics University
     of Bristol/ Fachbereich Mathematik, Kaiserslautern.

