geneARMAsim {geneARMA}R Documentation

Simulate a periodic model of time-course gene expression data.

Description

A function which generates data to test the geneARMAfit results.

Usage

geneARMAsim(n = 100, J = 2, K = 2, sigsq = 0.01, ars = numeric(0), mas = numeric(0), length.out = 21, fourier.coefs, tau)

Arguments

n simulated sample size.
J number of clusters.
K number of Fourier terms.
sigsq innovation variance.
ars a vector of AR coefficients, where the time series is parameterized as X[t] = ars[1] * X[t-1] + ars[2]*X[t-2] + ... + e[t]+ mas[1]*e[t-1] + ...
mas a vector of MA coefficients, where the time series is parameterized as X[t] = ars[1] * X[t-1] + ars[2]*X[t-2] + ... + e[t]+ mas[1]*e[t-1] + ...
length.out number of equally spaced time points at which each gene is obsered.
fourier.coefs A J by 2K+1 matrix with fourier coefficients. The rows are clusters, and the columns are constant term, cosine term, sine term, cosine term, sine term,... where lower frequency terms come first.
tau A vector of length J specifying the frequencies for the different clusters.

Value

Returns a list with two components

Y The simulated data
tm The corresponding time points

Author(s)

Timothy McMurry and Arthur Berg

References

Ning Li, et al. Functional clustering of periodic transcriptional profiles through ARMA(p,q)

Examples

set.seed(100)
Data <- geneARMAsim(400, ars=c(.5, .1))
f1 <- geneARMAfit(Data$Y, Data$tm, 2, 2, 2, 0, eps.conv = .001, max.iter = 15, tau.init=c(.25, .45))
plot(f1, y=NULL, "all.means")
plot(f1, y=NULL, "single.cluster", j=2)

[Package geneARMA version 1.0 Index]