OwenT: Owen T-function

Description Usage Arguments Value Examples

Description

Evaluates the Owen T-function by numerical integration.

Usage

1
OwenT(h, a)

Arguments

h

numeric scalar

a

numeric scalar

Value

A number between 0 and 1.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# theoretically 0:
a <- runif(1, -1000, 1000)
OwenT(0,a) - atan(a)/(2*pi)
h <- runif(1, -3, 3)
OwenT(h,1) - pnorm(h)*(1-pnorm(h))/2
a <- 1000 # a -> Inf
OwenT(h,a) - (1-pnorm(abs(h)))/2
# relation with noncentral t with 1 degree of freedom
delta <- 1; q <- 2
OwenT(delta/sqrt(1+q^2), q)
1/2*(pt(q, 1, delta) - pnorm(-delta/sqrt(1+q^2)))
h <- 0.5; a <- 2
OwenT(h, a)
1/2*(pt(a, 1, h*sqrt(1+a^2)) - pnorm(-h))

stla/OwenFunctions documentation built on May 30, 2019, 5:45 p.m.