309 Spectral Analysis of Qualitative Time Series
if(j<8) { z[,j] = specenv; output2[,,j] = cbind(frequency, specenv, beta)}
if(j==8) { z[1:240,8] = specenv; output2[1:240,,j] = cbind(frequency, specenv,
beta)}
}
#--- output and graphics (results in output2)---#
zz = 100*t(z)
# zz is 8x250
rowss = rep(1:8, each=2)
zz = zz[rowss,]
# now it’s 16x250
# threshold
m = xspec$kernel$m
nuinv = sqrt(sum(xspec$kernel[-m:m]^2))
thresh=100*(2/num)*exp(qnorm(.995)*nuinv)
dev.new(height = 5)
par(mar=c(3,3,3,1), mgp=c(1.6,.6,0))
xa = 0:249/500
ya1 = 1736+500*0:8
rowss = c(1, rep(2:8, each=2), 9)
ya = ya1[rowss]
ya[seq(2,16,by=2)] = ya[seq(2,16,by=2)]-.5
levs = thresh*seq(0, 4.5, by=.5)
colr = gray(c(10,9,5,4.5,4,3,2,1,0)/10)
contour(ya, xa, zz, xlab="base pair", ylab="frequency", levels=levs, col=colr,
main="Epstein-Barr BNRF1", lwd=2, drawlabels=FALSE)
Acknowledgment
This work was supported, in part, by a grant from the U.S. National Science Foundation.
References
Brillinger, D. R. (1981). Time Series: Data Analysis and Theory, vol. 36. Society for Industrial and Applied
Mathematics, Philadelphia.
Buysse, D. J., Reynolds, C. F., Monk, T. H., Berman, S. R., and Kupfer, D. J. (1989). The Pittsburgh
sleep quality index: A new instrument for psychiatric practice and research. Psychiatry Research,
28(2):193–213.
Fan, J. and Gijbels, I. (1996). Local Polynomial Modelling and Its Applications, vol. 66. Chapman & Hall,
London.
Ioshikhes, I., Bolshoy, A., Derenshteyn, K., Borodovsky, M., and Trifonov, E. N. (1996). Nucleosome
DNA sequence pattern revealed by multiple alignment of experimentally mapped sequences.
Journal of Molecular Biology, 262(2):129–139.
Krafty, R. T., Xiong, S., Stoffer, D. S., Buysse, D. J., and Hall, M. (2012). Enveloping spectral surfaces:
Covariate dependent spectral analysis of categorical time series. Journal of Time Series Analysis,
33(5):797–806.
Magnus, J. and Neudecker, H. (1988). Matrix Differential Calculus with Applications in Statistics and
Econometrics. Wiley & Sons, New York.
R Core Team (2013). R: A Language and Environment for Statistical Computing. R Foundation for
Statistical Computing, Vienna, Austria.