outputData: Writing Simulation Parameters and Data to Files

outputDataR Documentation

Writing Simulation Parameters and Data to Files

Description

Write simulation parameters and simulated data to files with user-specified filenames.

Usage

outputData(datafilename, parfilename, meanfilename, 
    simudata, pars, nitem, ntime, nrep)

Arguments

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 simuDataREM. Contains simulated data.

pars

Matrix of simulation parameters. Same object as pars.mtx in simuDataREM.

nitem

Number of items.

ntime

Number of time points.

nrep

Number of replicates.

Value

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.

Author(s)

Audrey Q. Fu

References

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.

See Also

simuDataREM for simulating data.

plotSimulation for plotting simulated data.

DIRECT for clustering the data.

Examples

## See example for simuDataREM.

DIRECT documentation built on Sept. 8, 2023, 5:45 p.m.