Last data update: 2014.03.03

R: Simulate data and assess vsn's parameter estimation
sagmbSimulateDataR Documentation

Simulate data and assess vsn's parameter estimation

Description

Functions to validate and assess the performance of vsn through simulation of data.

Usage

sagmbSimulateData(n=8064, d=2, de=0, up=0.5, nrstrata=1,  miss=0, log2scale=FALSE)
sagmbAssess(h1, sim)

Arguments

n

Numeric. Number of probes (rows).

d

Numeric. Number of arrays (columns).

de

Numeric. Fraction of differentially expressed genes.

up

Numeric. Fraction of up-regulated genes among the differentially expressed genes.

nrstrata

Numeric. Number of probe strata.

miss

Numeric. Fraction of data points that is randomly sampled and set to NA.

log2scale

Logical. If TRUE, glog on base 2 is used, if FALSE, (the default), then base e.

h1

Matrix. Calibrated and transformed data, according, e.g., to vsn

sim

List. The output of a previous call to sagmbSimulateData, see Value

Details

Please see the vignette.

Value

For sagmbSimulateData, a list with four components: hy, an n x d matrix with the true (=simulated) calibrated, transformed data; y, an n x d matrix with the simulated uncalibrated raw data - this is intended to be fed into vsn; is.de, a logical vector of length n, specifying which probes are simulated to be differentially expressed. strata, a factor of length n.

For sagmbSimulateData, a number: the root mean squared difference between true and estimated transformed data.

Author(s)

Wolfgang Huber

References

Wolfgang Huber, Anja von Heydebreck, Holger Sueltmann, Annemarie Poustka, and Martin Vingron (2003) "Parameter estimation for the calibration and variance stabilization of microarray data", Statistical Applications in Genetics and Molecular Biology: Vol. 2: No. 1, Article 3. http://www.bepress.com/sagmb/vol2/iss1/art3

See Also

vsn

Examples

  sim <- sagmbSimulateData(nrstrata=4)
  ny  <- vsn(sim$y, strata=sim$strata)
  res <- sagmbAssess(exprs(ny), sim)
  res

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(vsn)
Loading required package: Biobase
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, xtabs

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

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, 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, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/vsn/sagmbSimulateData.Rd_%03d_medium.png", width=480, height=480)
> ### Name: sagmbSimulateData
> ### Title: Simulate data and assess vsn's parameter estimation
> ### Aliases: sagmbSimulateData sagmbAssess
> ### Keywords: datagen
> 
> ### ** Examples
> 
>   sim <- sagmbSimulateData(nrstrata=4)
>   ny  <- vsn(sim$y, strata=sim$strata)
Note: 
The function 'vsn' has been superseded by 'vsn2'.
The function 'vsn' remains in the package for backward compatibility,
but for new projects, please use 'vsn2'.
 
>   res <- sagmbAssess(exprs(ny), sim)
>   res
[1] 0.01501352
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>