simulateData: Create simulated data for testing.

Description Usage Arguments Value Examples

View source: R/simulate_data.R

Description

Create simulated data for testing.

Usage

1
simulateData(N, p, theta, sds, df = 10)

Arguments

N

number of observations

p

a vector indicating probability of membership to each component

theta

a vector of means, one per component

sds

a vector of standard deviations, one per component

df

length-1 numeric vector for the t-distribution degrees of freedom

Value

An object of class 'SingleBatchModel'

Examples

1
2
3
truth <- simulateData(N=2500, p=rep(1/3, 3),
                      theta=c(-1, 0, 1),
                      sds=rep(0.1, 3))

Example output

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb

Attaching package: 'CNPBayes'

The following object is masked from 'package:stats':

    sigma

Warning message:
system call failed: Cannot allocate memory 

CNPBayes documentation built on Nov. 1, 2018, 4:47 a.m.