estimate: estimate

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

Description

The 'estimate' method computes the fraction Lambda of probes with significant effect in the local surrounding of the genome.

Usage

1
2
3
4
5
6
7
8
estimate(object, win, weighting = triangWeight, grenander = TRUE,
se = FALSE, minProbes = 3, method = "la", nCores = NULL, verbose =
FALSE, ...)

## S4 method for signature 'Les'
estimate(object, win, weighting = triangWeight,
grenander = TRUE, se = FALSE, minProbes = 3, method = "la", nCores =
NULL, verbose = FALSE, ...)

Arguments

object

Object of class 'Les' containing experimental data, as returned by 'Les'.

win

Integer specifying window size for the weighting function. This value is directly passed to the function specified by 'weighting'. For details see the description for the used window function 'weighting'.

weighting

Function specifying the shape of the weighting window. If not specified the supplied 'triangWeight' function with a triangular window will be used. For details on other window functions and how to specify own functions please see the 'Details' section.

grenander

Logical specifying if the Grenander correction for the cumulative density should be used (default: TRUE). For details see the 'Details' section.

se

Logical indicating whether the standard error (SE) from the final linear model should be computed and stored (default: FALSE). The standard error displays the goodness of fit for every probe, but is not needed for further computation. If computation time is a critical factor computation of the SE can be omitted to save some time.

minProbes

Integer specifying the minimal number of unqiue p-values that must be present for each fit (default: 3). For very small number of p-values the cumulative density is not well defined and therefore estimation has a high uncertainty. If the number of unique p-values is smaller than 'minProbes' no estimation is performed for this probe and Lambda=NA is returned.

method

Character string specifying the method used for linear regression (default: 'la'). Possible options are 'la' for a method based on linear algebra or 'qr' for a method based on qr decomposition. 'la' will be faster for few probes, 'qr' for many probes in a window. The best choice varies between data sets, parameters and machines. However this option only influences computation time but not the results.

nCores

Integer indicating the number of cores to use for computation. This feature requires the 'multicore' package which is only available for certain platforms. The package is used only if 'library(multicore)' has been called manually by the user before and if 'nCores' is an integer unequal NULL specifying the number of cores to use. The value is passed directly to 'mclapply' as argument 'n.cores'. For details and benefits please see the 'Details' section.

verbose

Logical indicating whether the progress of the computation should be printed on screen (default: FALSE).

...

Further arguments passed to subsequent functions.

Details

This function estimates Lambda(i) for all probes i. This is normally the first step in the analysis after storing the experimental data with 'Les'.

The 'win' argument influences the number of neighboring probes taken into account by the weighting function. The value is passed to the function specified in 'weighting'. Larger values result in a smoother features. Details on a reasonable choice for this value can be found in the references.

With the 'weighting' argument the applied weighting function can be specified from a predefined set or a custom function can be used. In the 'les' package the four functions 'triangWeight', 'rectangWeight', 'epWeight' and 'gaussWeight' are already supplied and offer a triangular, rectangular, Epanechnikov and Gaussian weighting function respectively. For details on the functions itself and how to use custom ones please see the documentation of the single functions or the vignette of this package.

The Grenander correction for the cumulative density includes the general knowledge about the concave shape of the cumulative density. This reduces the variance of the estimates and leads to a conservative estimation. Please note that using this feature may significantly increase computation time.

The 'multicore' package can be used to spread the computation over several cores in a simple way. This can be useful on multi-core machines for large datasets. The 'multicore' package is not available on all platforms. To use multicore processing 'library(multicore)' has to be called beforehand and a number of cores to use has to be specified in 'nCores'. For details see the documentation of the 'multicore package.

Please note that calling 'estimate' with an object returned by the methods 'ci' and 'regions' will overwrite data stored by these two methods. This ensures that no inconsistent data is stored.

Value

Object of class 'Les' with additionally filled slots: lambda, win, weighting, grenander, nProbes, se (se only if computed)

Author(s)

Julian Gehring

Maintainer: Julian Gehring <julian.gehring@fdm.uni-freiburg.de>

See Also

Package: les-package

Class: Les

Methods and functions: Les estimate threshold regions ci chi2 export plot weighting

Examples

1
2
3
4
5
data(spikeInStat)

x <- Les(pos, pval)
x <- estimate(x, win=200)
x

les documentation built on Nov. 8, 2020, 5:17 p.m.