davies.start: start value for Davies minimization routines

davies.startR Documentation

start value for Davies minimization routines

Description

Gives a “start” value for the optimization routines. Uses heuristics that seem to work.

Usage

davies.start(x, threeps=c(0.1,0.5,0.9), small = 0.01) 

Arguments

x

dataset to be used

threeps

a three-element vector representing the quantiles to be balanced. The default values balance the first and ninth deciles and the median. These seem to work for me pretty well; YMMV

small

a “small” value to be used for lambda1 and lambda1 because using exactly zero is inappropriate

Details

Returns a “start” value of the pararameters for use in one of the Davies fitting routines maximum.likelihood() or least.squares().

Uses three heuristic methods (one assuming lambda1=lambda2, one with lambda1=0, and one with lambda2=0). Returns the best one of the three, as measured by objective().

Author(s)

Robin K. S. Hankin

See Also

least.squares , maximum.likelihood, objective

Examples

d <- rchisq(40,1)
davies.start(d)
least.squares(d)

params <- c(10 , 0.1 , -0.1)
x <- rdavies(100 , params)
davies.start(x)

f <- function(threeps){objective(davies.start(x,threeps),x)}

(jj<-optim(c(0.1,0.5,0.9),f))
davies.start(x,jj$par)
least.squares(x)

#not bad at all.


Davies documentation built on March 18, 2022, 5:52 p.m.