optimizeParameters: Optimize parameters of removal of unwanted variation.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/optimizeParameters.R

Description

optimizeParameters returns the optimal parameters to be used in the removal of unwanted variation procedure when using simulated data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
optimizeParameters(
  Y,
  kW.hat = seq(5, 25, 5),
  nu.hat = c(0, 10, 100, 1000, 10000),
  nc_index,
  methods = c("all", "fnorm", "wrong.sign"),
  cpus = 1,
  parallel = FALSE,
  check.input = FALSE
)

Arguments

Y

An object of the class simualteGEdata.

kW.hat

A vector of integers for kW in RUVNaiveRidge.

nu.hat

A vector of values for nu in RUVNaiveRidge.

nc_index

A vector of indices of the negative controls used in RUVNaiveRidge.

methods

The method used for quality assessment; if method="fnorm" the squared Frobenius norm is used; if method="wrong.sign" the percentage of wrongly estimated signs is calculated if method="all" both are calculated.

cpus

A number specifiying how many workers to use for parallel computing.

parallel

Logical: if TRUE parallel computing is used.

check.input

Logical; if TRUE all input is checked; not advisable for large simulations.

Details

The simulated data is cleaned using removal of unwanted variation with all combinations of the input parameters. The quality of each cleaning is judged by the Frobenius Norm of the correlation as estimated from the cleaned data and the known data or the percentage of correlations with estimated to have the wrong sign.

Value

optimizeParameters returns output of the class optimizeParameters. An object of class optimizeParameters is a list containing the following components:

All.results

A matrix of output of the quality assessment for all combinations of input parameters.

Compare.raw

A vector of the quality assessment for the uncorrected data.

Optimal.parameter

A matrix or a vector giving the optimal parameter combination.

Author(s)

Saskia Freytag

See Also

assessQuality, RUVNaiveRidge, funcPara

Examples

1
2
3
4
5
Y<-simulateGEdata(500, 500, 10, 2, 5, g=NULL, Sigma.eps=0.1, 
250, 100, intercept=FALSE, check.input=FALSE)
opt<-optimizeParameters(Y, kW.hat=c(1,5,10), nu.hat=c(100,1000), nc_index=251:500, 
methods=c("fnorm"), cpus=1, parallel=FALSE, check.input=TRUE)
opt

RUVcorr documentation built on Nov. 8, 2020, 5:10 p.m.