outputData {DIRECT} | R Documentation |
Write simulation parameters and simulated data to files with user-specified filenames.
outputData(datafilename, parfilename, meanfilename,
simudata, pars, nitem, ntime, nrep)
datafilename |
Name of text file containing simulated data. |
parfilename |
Name of text file containing simulation parameters, which include number of items, number of time points, number of replicates, true cluster-specific mean vectors, true standard deviations of three types of variability (random effects). |
meanfilename |
Name of text file containing sample means (averaged over replicates) of simulated data. |
simudata |
List produced by |
pars |
Matrix of simulation parameters. Same object as |
nitem |
Number of items. |
ntime |
Number of time points. |
nrep |
Number of replicates. |
Three files are generated and placed under the current working directory or directories specified in filenames:
Complete simulated data: Matrix of nitem
by ntime
*nrep
+1. The first column contains the true cluster labels. In the rest of the columns, data are stored as Replicates 1 through nrep
at Time 1, Replicates 1 through nrep
at Time 2, ..., Replicates 1 through nrep
at Time ntime
.
Simulated mean data: Matrix of nitem
by ntime
. Each row contains the sample means at Times 1 through ntime
.
Simulation parameters:
First row: nitem
.
Second row: ntime
.
Third row: nrep
.
Rest of file: Matrix. Each row corresponds to a cluster, and contains cluster label, true mean vector of length ntime
, standard deviations of within-cluster variability, variability across time points and residual variability.
Audrey Q. Fu
Fu, A. Q., Russell, S., Bray, S. and Tavare, S. (2013) Bayesian clustering of replicated time-course gene expression data with weak signals. The Annals of Applied Statistics. 7(3) 1334-1361.
simuDataREM
for simulating data.
plotSimulation
for plotting simulated data.
DIRECT
for clustering the data.
## See example for simuDataREM.