Learn R Programming

alR (version 2.2.0)

kappa4IntApprox: Sample arc length statistic.

Description

The arc length over a specified interval is calculated for use in non-linear estimation.

Usage

kappa4IntApprox(x, y, q1, q2, quantile)

kappa4IntApprox2(x, y, q1, q2, quantile)

Arguments

x

Numeric vector of independent outcomes.

y

Numeric vector of dependent outcomes \(y=F(x)\).

q1, q2

Quantiles (between 0 and 1) over which the arc length segment is to be computed.

quantile

Logical, TRUE/FALSE, whether q1 and q2 are quantiles, or actual points in the domain.

Value

kappa4IntApprox: The resultant arc length.

kappa4IntApprox2: A vector having length equal to that of the vector of lower quantile bounds, containing the discrete arc length segments over the specified intervals.

Examples

Run this code
# NOT RUN {
x <- rnorm(100)
y <- pnorm(x)
kappa4IntApprox(x, y, 0.025, 0.975, TRUE)
kappa4IntApprox(x, y, -1.96, 1.96, FALSE)

kappa4IntApprox2(x, y, c(0.025, 0.5), c(0.5, 0.975), TRUE)
kappa4IntApprox2(x, y, c(-1.96, 0), c(0, 1.96), FALSE)

# }

Run the code above in your browser using DataLab