simu.curves: Simulate multiple curve data from a given model (either...

Description Usage Arguments Value Examples

View source: R/simulate.data.R

Description

Simulate multiple curve data from a given model (either Normal or Poisson). It checks if parameters are valid and calls sim.data to simulate data.

Usage

1
2
simu.curves(curve.length, model.mode, num.groups = 1, num.samples = 10,
  normal.sigma = 0.5, stretch = 5, offset = 15, curve.str = "mine")

Arguments

curve.length:

length of curve data

model.mode:

either Normal or Poisson; this function simulates num.samples number of curve data under a model provided as model.mode.

num.groups:

1 by default; how many groups of samples should be simulated; currently this function can simulate data from one group.

num.samples:

10 by default; how many curve data should be simulated.

normal.sigma:

0.5 by default; standard deviation in Normal model;

curve.str:

"mine" by default; curve type for true signal; used in the function simulate_true_curve.

stretch:

5 by default; parameter used to generate true signal; used in the function simulate_true_curve.

offset;

15 by default; parameter used to generate true signal; used in the function simulate_true_curve.

Value

simu.curves returns a list of the following elements

true.mean.curve

a vector of length curve.length-vector; it contains true mean curve generated by the function simulate_true_curve

data

a matrix of num.samples by curve.length; it contains num.samples curve data; each row contains simulated data under a given model model.mode with mean curve true.mean.curve

Examples

1
2
3
4
5
6
7
# set up parameters.
curve.length = 1024
model.mode = 'Poisson'
num.samples=10
set.seed(666)
res.pois = simu.curves(curve.length=curve.length, model.mode=model.mode, num.samples=num.samples)
str(res.pois)

shimlab/HMTree documentation built on May 29, 2019, 9:25 p.m.