bpr_optim.matrix: Optimization method for the BPR NLL using matrix x

Description Usage Arguments Value See Also Examples

Description

bpr_optim.matrix minimizes the negative log likelihood of the BPR function. Since it cannot be evaluated analytically, an optimization procedure is used. The optim packages is used for performing optimization.

Usage

1
2
3
## S3 method for class 'matrix'
bpr_optim(x, w = NULL, basis = NULL, fit_feature = NULL,
  cpg_dens_feat = FALSE, opt_method = "CG", opt_itnmax = 100, ...)

Arguments

x

An L x 3 matrix of observations, where 1st column contains the locations. The 2nd and 3rd columns contain the total trials and number of successes at the corresponding locations, repsectively.

w

A vector of parameters (i.e. coefficients of the basis functions)

basis

A 'basis' object. See polynomial.object

fit_feature

Additional feature on how well the profile fits the methylation data.

cpg_dens_feat

Additional feature for the CpG density across the promoter region.

opt_method

The optimization method to be used. See optim for possible methods. Default is 'CG'.

opt_itnmax

Optional argument giving the maximum number of iterations for the corresponding method. See optim for details.

...

Additional parameters

Value

A list containing the following elements:

See Also

bpr_optim, bpr_optim.list

Examples

1
2
3
4
basis <- polynomial.object(M=2)
w <- c(0.1, 0.1, 0.1)
data <- bpr_data[[1]]
out_opt <- bpr_optim(x = data, w = w, basis = basis, fit_feature = "NLL")

andreaskapou/mpgex documentation built on May 12, 2019, 3:33 a.m.