Rnorm.exp: Rnorm.exp fits a normal+exponential distribution to a...

Description Usage Arguments Details Value Author(s)

View source: R/fitDistributions.R

Description

Distrubution function defined by: alpha*Normal(mean, variance)+(1-alpha) *Exponential(lambda).

Usage

1
2
Rnorm.exp(xi, wi = rep(1, NROW(xi)), guess = c(0.5, 0, 1, 1),
  tol = sqrt(.Machine$double.eps), maxit = 10000)

Arguments

xi

A vector of observations, assumed to be real numbers in the interval (-Inf,+Inf).

wi

A vector of weights. Default: vector of repeating 1; indicating all observations are weighted equally. (Are these normalized internally?! Or do they have to be [0,1]?)

guess

Initial guess for parameters. Default: c(0.5, 0, 1, 1).

tol

Convergence tolerance. Default: sqrt(.Machine$double.eps).

maxit

Maximum number of iterations. Default: 10,000.

Details

Fits nicely with data types that look normal overall, but have a long tail starting for positive values.

Value

Returns a list of parameters for the best-fit normal distribution (alpha, mean, variance, and lambda).

Author(s)

Charles G. Danko


coregenomics/groHMM documentation built on May 7, 2019, 7:57 a.m.