Package 'ciuupi'

Title: Confidence Intervals Utilizing Uncertain Prior Information
Description: Computes a confidence interval for a specified linear combination of the regression parameters in a linear regression model with iid normal errors with known variance when there is uncertain prior information that a distinct specified linear combination of the regression parameters takes a given value. This confidence interval, found by numerical nonlinear constrained optimization, has the required minimum coverage and utilizes this uncertain prior information through desirable expected length properties. This confidence interval has the following three practical applications. Firstly, if the error variance has been accurately estimated from previous data then it may be treated as being effectively known. Secondly, for sufficiently large (dimension of the response vector) minus (dimension of regression parameter vector), greater than or equal to 30 (say), if we replace the assumed known value of the error variance by its usual estimator in the formula for the confidence interval then the resulting interval has, to a very good approximation, the same coverage probability and expected length properties as when the error variance is known. Thirdly, some more complicated models can be approximated by the linear regression model with error variance known when certain unknown parameters are replaced by estimates. This confidence interval is described in Mainzer, R. and Kabaila, P. (2019) <doi:10.32614/RJ-2019-026>, and is a member of the family of confidence intervals proposed by Kabaila, P. and Giri, K. (2009) <doi:10.1016/j.jspi.2009.03.018>.
Authors: Paul Kabaila [aut, cre], Rheanna Mainzer [aut], Ayesha Perera [ctb]
Maintainer: Paul Kabaila <[email protected]>
License: GPL-2
Version: 1.2.3
Built: 2024-11-16 04:50:01 UTC
Source: https://github.com/cran/ciuupi

Help Index


Computes the known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau} from the pp-vectors aa and cc and the design matrix XX

Description

Computes the known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau}. This correlation is computed from the pp-vectors aa and cc and the n×pn \times p design matrix XX, with linearly independent columns, using the formula ρ=a(XX)1c/(vθvτ)1/2\rho=a^{\top}(X^{\top} X)^{-1} c /(v_{\theta} \, v_{\tau})^{1/2}, where vθ=a(XX)1av_{\theta} =a^{\top}(X^{\top} X)^{-1}a and vτ=c(XX)1cv_{\tau} =c^{\top}(X^{\top} X)^{-1}c.

Usage

acX_to_rho(a, c, X)

Arguments

a

The pp-vector aa that specifies the parameter of interest θ=aβ\theta =a^{\top}\beta

c

The pp-vector cc used in the specification of the parameter τ=cβt\tau=c^{\top} \beta-t. The uncertain prior information is that τ=0\tau=0

X

The n×pn \times p design matrix XX, with linearly independent columns

Value

The known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau}.

Examples

a <- c(0, 2, 0, -2)
c <- c(0, 0, 0, 1)
x1 <- c(-1, 1, -1, 1)
x2 <- c(-1, -1, 1, 1)
X <- cbind(rep(1, 4), x1, x2, x1*x2)
rho <- acX_to_rho(a, c, X)
print(rho)

Computes the the functions bb and ss that specify the CIUUPI for all possible values of σ\sigma and the observed response vector

Description

Chooses the positive number dd and the positive integer qq, sets h=d/qh=d/q, and then computes the (2q1)(2q-1)-vector (b(h),...,b((q1)h),s(0),s(h)...,s((q1)h))\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h)\big) that determines, via cubic spline interpolation, the functions bb and ss which specify the confidence interval for θ\theta that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and the observed response vector. To an excellent approximation, this confidence interval has minimum coverage probability 1α1-\alpha.

Usage

bs_ciuupi(alpha, rho, natural = 1)

Arguments

alpha

The desired minimum coverage probability is 1α1-\alpha

rho

The known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau}

natural

Equal to 1 (default) if the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation in an interval [d,d][-d, d], where dd is computed by bs_ciuupi using a specified function of alpha and rho

Details

Suppose that

y=Xβ+εy = X \beta + \varepsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ε\varepsilon is the random error with components that are iid normally distributed with zero mean and known variance σ2\sigma^2. The parameter of interest is θ=aβ\theta = a^{\top} \beta. Also let τ=cβt\tau = c^{\top}\beta -t, where aa and cc are specified linearly independent vectors and tt is a specified number. The uncertain prior information is that τ=0\tau = 0.

Let rho denote the known correlation between the θ^\widehat{\theta} and τ^\widehat{\tau}. We can compute rho from given values of aa, cc and XX using the function acX_to_rho.

The confidence interval for θ\theta, with minimum coverage probability 1-alpha, that utilizes the uncertain prior information that τ=\tau = 0 belongs to a class of confidence intervals indexed by the functions bb and ss. The function bb is an odd continuous function and the function ss is an even continuous function. In addition, b(x)=0b(x)=0 and s(x)s(x) is equal to the 1-alpha/2/2 quantile of the standard normal distribution for all xd|x| \ge d, where dd is a given positive number. Extensive numerical explorations have been used to find a formula (in terms of alpha and rho) for a 'goldilocks' value of dd that is neither too large nor too small. Then let qq=ceiling(dd/0.75) and h=d/qh=d/q. The values of the functions bb and ss in the interval [d,d][-d,d] are specified by the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h))\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big).

The values of b(kh)b(kh) and s(kh)s(kh) for k=q,...,qk=-q,...,q are deduced from this vector using the assumptions made about the functions bb and ss. The values of b(x)b(x) and s(x)s(x) for any xx in the interval [d,d][-d, d] are then found using cube spline interpolation using the values of b(kh)b(kh) and s(kh)s(kh) for k=q,...,qk=-q,...,q. For natural=1 (default) this is 'natural' cubic spline interpolation and for natural=0 this is 'clamped' cubic spline interpolation.

The vector (b(h),...,b((q1)h),s(0),s(h)...,s((q1)h))\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h)\big) is found by numerical nonlinear constrained optimization so that the confidence interval has minimum coverage probability 1-alpha and utilizes the uncertain prior information through its desirable expected length properties. This optimization is performed using the slsqp function in the nloptr package.

Value

A list with the following components.

alpha, rho, natural: the inputs

d: a 'goldilocks' value of dd that is not too large and not too small

n.ints: number of equal-length consecutive intervals whose union is [0,d][0,d], this is the same as qq

lambda.star: the computed value of λ\lambda^*

bsvec: the vector (b(h),...,b((q1)h),s(0),s(h)...,s((q1)h))\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big) that determines the functions bb and ss that specify the CIUUPI for all possible values of σ\sigma and observed response vector

comp.time: the computation time in seconds

Examples

alpha <- 0.05
rho <- - 1 / sqrt(2)
bs.list <- bs_ciuupi(alpha, rho)

The list that specifies the CIUUPI for the example

Description

In this example, the dataset described in Table 7.5 of Box et al. (1963) is used. The design matrix X is specified by the command X <- cbind(rep(1,4), c(-1, 1, -1, 1), c(-1, -1, 1, 1), c(1, -1, -1, 1)). A description of the parameter of interest is given in Discussion 5.8, p.3426 of Kabaila and Giri (2009). The parameter of interest is θ=aβ\theta = a^{\top} \beta, where the column vector aa is specified by the command a <- c(0, 2, 0, -2). For this example, we have uncertain prior information that τ=cβ=0\tau = c^{\top} \beta = 0, where the column vector cc is specified by the command c <- c(0, 0, 0, 1). The known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau} is computed using the command rho <- acX_to_rho(a, c, X). The desired minimum coverage probability of the CIUUPI is 1α1 - \alpha, where α=0.05\alpha = 0.05, which is specified by the command alpha <- 0.05. The CIUUPI is determined by α\alpha and ρ\rho and is found using the command bs.list.example <- bs_ciuupi(alpha, rho), which takes about 5 minutes to run.

Usage

bs.list.example

Format

An object of class list of length 8.

References

Box, G.E.P., Connor, L.R., Cousins, W.R., Davies, O.L., Hinsworth, F.R., Sillitto, G.P. (1963) The Design and Analysis of Industrial Experiments, 2nd edition, reprinted. Oliver and Boyd, London.

Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.


Evaluate the functions bb and ss at x

Description

Evaluate the functions bb and ss, as specified by bsvec, alpha, d, n.ints and natural, at x.

Usage

bsspline(x, bsvec, alpha, d, n.ints, natural)

Arguments

x

A value or vector of values at which the functions bb and ss are to be evaluated

bsvec

The (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q. This vector specifies the CIUUPI, for all possible values of the random error variance and the observed response vector

alpha

The desired minimum coverage probability is 1α1 - \alpha

d

The functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints

The number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions bb and ss. In the description of bsvec, n.ints is also called qq.

natural

Equal to 1 (default) if the bb and ss functions are obtained by natural cubic spline interpolation or 0 if obtained by clamped cubic spline interpolation

Value

A data frame containing x and the corresponding values of the functions bb and ss.

Examples

x <- seq(0, 8, by = 1)
alpha <- bs.list.example$alpha
natural <- bs.list.example$natural
d <- bs.list.example$d
n.ints <- bs.list.example$n.ints
bsvec <- bs.list.example$bsvec
bs <- bsspline(x, bsvec, alpha, d, n.ints, natural)

For given observed response vector yy, compute the standard 1α1 - \alpha confidence interval

Description

If σ\sigma is provided then compute the standard 1α1 - \alpha confidence interval for θ\theta. If σ\sigma is not provided then, as long as np30n-p \ge 30, replace σ\sigma by its estimate to compute an approximate 1α1 - \alpha confidence interval for θ\theta.

Usage

ci_standard(a, X, y, alpha, sig = NULL)

Arguments

a

The vector used to specify the parameter of interest θ=aβ\theta = a^{\top} \beta

X

The known n×pn \times p design matrix, with linearly independent columns

y

The nn-vector of observed responses

alpha

1α1 - \alpha is the coverage probability of the standard confidence interval

sig

Standard deviation of the random error. If a value is not specified then, provided that np30n-p \ge 30, sig is estimated from the data.

Details

Suppose that

y=Xβ+ε,y = X \beta + \varepsilon,

where yy is a random nn-vector of responses, XX is a known n×pn \times p matrix with linearly independent columns, β\beta is an unknown parameter pp-vector, and εN(0,σ2I)\varepsilon \sim N(0, \, \sigma^2 \, I), with σ2\sigma^2 assumed known. Suppose that the parameter of interest is θ=aβ\theta = a^{\top} \beta. The R function ci_standard computes the standard 1α1 - \alpha confidence interval for θ\theta.

The example below is described in Discussion 5.8 on p.3426 of Kabaila and Giri (2009). This example is obtained by extracting a 2×22 \times 2 factorial data set from the 232^3 factorial data set described in Table 7.5 of Box et al. (1963).

Value

If σ\sigma is provided then a data frame of the lower and upper endpoints of the standard 1α1 - \alpha confidence interval for θ\theta. If σ\sigma is not provided then, as long as np30n-p \ge 30, a data frame of the lower and upper endpoints of an approximation to this confidence interval.

References

Box, G.E.P., Connor, L.R., Cousins, W.R., Davies, O.L., Hinsworth, F.R., Sillitto, G.P. (1963) The Design and Analysis of Industrial Experiments, 2nd edition, reprinted. Oliver and Boyd, London.

Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.

Examples

y <- c(87.2, 88.4, 86.7, 89.2)
x1 <- c(-1, 1, -1, 1)
x2 <- c(-1, -1, 1, 1)
X <- cbind(rep(1, 4), x1, x2, x1*x2)
a <- c(0, 2, 0, -2)
ci_standard(a, X, y, 0.05, sig = 0.8)

For given observed response vector yy, compute the confidence interval that utilizes the uncertain prior information (CIUUPI)

Description

If σ\sigma is provided then, for given observed response vector yy, compute the confidence interval, with minimum coverage probability 1α1-\alpha, for the parameter θ=aβ\theta =a^{\top}\beta that utilizes the uncertain prior information that the parameter τ=cβt\tau=c^{\top} \beta-t (specified by the vector cc and the number tt) takes the value 0. If σ\sigma is not provided then, as long as np30n-p \ge 30, replace σ\sigma by its estimate to compute an approximation to the CIUUPI for θ\theta.

Usage

ciuupi_observed_value(a, c, X, alpha, bs.list, t, y, sig = NULL)

Arguments

a

The pp-vector aa that specifies the parameter of interest θ=aβ\theta =a^{\top}\beta

c

The pp-vector cc used in the specification of the parameter τ=cβt\tau=c^{\top} \beta-t. The uncertain prior information is that τ=0\tau=0

X

The n×pn \times p design matrix XX, with linearly independent columns

alpha

1α1 - \alpha is the desired minimum coverage probability of the confidence interval for θ\theta

bs.list

A list that includes the following components: natural, d, q and the vector bsvec (b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h)), where h=d/q, that specifies the CIUUPI for all possible values of the random error variance and the observed response vector

t

The number tt used to specify the parameter τ=cβt\tau=c^{\top} \beta-t. The uncertain prior information is that τ=0\tau = 0

y

The nn-vector of observed responses

sig

Standard deviation of the random error. If a value is not specified then, provided that np30n-p \ge 30, sig is estimated from the data.

Details

Suppose that

y=Xβ+εy = X \beta + \varepsilon

where yy is a random nn-vector of responses, XX is a known n×pn \times p matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ε\varepsilon has components that are iid normally distributed with zero mean and known variance. Suppose that θ=\theta=a^{\top} β\beta is the parameter of interest, where a is a specified vector. Let τ=\tau=cβ^{\top} \beta -t, where c is a specified vector, t is a specified number and a and c are linearly independent vectors. Also suppose that we have uncertain prior information that τ=0\tau = 0. For given observed response vector y and a design matrix X, ciuupi_observed_value computes the confidence interval, with minimum coverage probability 1-alpha, for θ\theta that utilizes the uncertain prior information that τ=0\tau = 0.

The example below is described in Discussion 5.8 on p.3426 of Kabaila and Giri (2009). This example is obtained by extracting a 2×22 \times 2 factorial data set from the 232^3 factorial data set described in Table 7.5 of Box et al. (1963).

Value

If σ\sigma is provided then a data frame of the lower and upper endpoints of the confidence interval, with minimum coverage probability 1α1-\alpha, for the parameter θ\theta that utilizes the uncertain prior information that τ=0\tau = 0. If σ\sigma is not provided then, as long as np30n-p \ge 30, a data frame of the lower and upper endpoints of an approximation to this confidence interval.

References

Box, G.E.P., Connor, L.R., Cousins, W.R., Davies, O.L., Hinsworth, F.R., Sillitto, G.P. (1963) The Design and Analysis of Industrial Experiments, 2nd edition, reprinted. Oliver and Boyd, London.

Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.

Examples

a <- c(0, 2, 0, -2)
c <- c(0, 0, 0, 1)
x1 <- c(-1, 1, -1, 1)
x2 <- c(-1, -1, 1, 1)
X <- cbind(rep(1, 4), x1, x2, x1*x2)
alpha <- 0.05
t <- 0
y <- c(87.2, 88.4, 86.7, 89.2)
sig <- 0.8
ciuupi_observed_value(a, c, X, alpha, bs.list.example, t, y, sig=sig)

Compute the coverage probability of the CIUUPI

Description

Evaluate the coverage probability of the confidence interval that utilizes uncertain prior information (CIUUPI) at gam. The input bs.list determines the functions bb and ss that specify the confidence interval that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and observed response vector.

Usage

cpciuupi(gam, n.nodes, bs.list)

Arguments

gam

A value of γ\gamma or vector of values of γ\gamma at which the coverage probability function is evaluated

n.nodes

The number of nodes for the Gauss Legendre quadrature used for the evaluation of the coverage probability

bs.list

A list that includes the following components.

alpha: 1α1 - \alpha is the desired minimum coverage probability of the confidence interval

rho: The known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau}

natural: 1 when the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation

d: the functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints: number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions bb and ss. In the description of bsvec, n.ints is also called qq.

bsvec: the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h)\big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q.

Value

The value(s) of the coverage probability of the CIUUPI at gam.

Examples

gam <- seq(0, 10, by = 0.2)
n.nodes <- 10
cp <- cpciuupi(gam, n.nodes, bs.list.example)

Plot the graph of the odd function bb used in the specification of the CIUUPI

Description

The input bs.list determines the functions bb and ss that specify the confidence interval that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and observed response vector. The R function plot_b plots the graph of the odd function bb.

Usage

plot_b(bs.list)

Arguments

bs.list

A list that includes the following components.

alpha: the desired minimum coverage is 1α1 - \alpha.

rho: the known correlation between θ^\widehat{\theta} and τ^\widehat{\tau}. This correlation is computed from the pp-vectors aa and cc and the n×pn \times p design matrix XX using the formula ρ=a(XX)1c/(vθvτ)1/2\rho=a^{\top}(X^{\top}X)^{-1}c /(v_{\theta} \, v_{\tau})^{1/2}, where vθ=a(XX)1av_{\theta} =a^{\top}(X^{\top}X)^{-1} a and vτ=c(XX)1cv_{\tau} =c^{\top}(X^{\top}X)^{-1} c.

natural: 1 when the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation

d: the functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints: number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions b and s. In the description of bsvec, n.ints is also called qq.

bsvec: the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q.

Value

A plot of the graph of the odd function bb used in the specification of the CIUUPI.

Examples

plot_b(bs.list.example)

Plot the graph of the coverage probability of the CIUUPI

Description

The input bs.list determines the functions bb and ss that specify the confidence interval that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and observed response vector. The coverage probability of the CIUUPI is an even function of the unknown parameter γ=τ/(σvτ1/2)\gamma = \tau \big/ \big(\sigma \, v_{\tau}^{1/2} \big). The R function plot_cp plots the graph of the coverage probability of the CIUUPI, as a function of γ|\gamma|. To provide a stringent assessment of this coverage probability, we use a fine equally-spaced grid seq(0, (d+4), by = 0.01) of values of γ\gamma and Gauss Legendre quadrature using 10 nodes in the relevant integrals. By contrast, for the computation of the CIUUPI, implemented in bs_ciuupi, we require that the coverage probability of this confidence interval is greater than or equal to 1α1-\alpha for the equally-spaced grid seq(0, (d+2), by = 0.05) of values of γ\gamma and we use Gauss Legendre quadrature with 5 nodes in the relevant integrals.

Usage

plot_cp(bs.list)

Arguments

bs.list

A list that includes the following components.

alpha: the desired minimum coverage is 1α1 - \alpha.

rho: the known correlation between θ^\widehat{\theta} and τ^\widehat{\tau}. This correlation is computed from the pp-vectors aa and cc and the n×pn \times p design matrix XX using the formula ρ=a(XX)1c/(vθvτ)1/2\rho=a^{\top}(X^{\top}X)^{-1}c /(v_{\theta} \, v_{\tau})^{1/2}, where vθ=a(XX)1av_{\theta} =a^{\top}(X^{\top}X)^{-1} a and vτ=c(XX)1cv_{\tau} =c^{\top}(X^{\top}X)^{-1} c.

natural: 1 when the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation

d: the functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints: number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions b and s. In the description of bsvec, n.ints is also called qq.

bsvec: the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q.

Value

A plot of the graph of the coverage probability of the CIUUPI as a function of γ|\gamma|, where γ\gamma denotes the unknown parameter τ/(σvτ1/2)\tau \big/ \big(\sigma \, v_{\tau}^{1/2} \big).

Examples

plot_cp(bs.list.example)

Plot the graph of the even function ss used in the specification of the CIUUPI

Description

The input bs.list determines the functions bb and ss that specify the confidence interval that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and observed response vector. The R function plot_s plots the graph of the odd function ss.

Usage

plot_s(bs.list)

Arguments

bs.list

A list that includes the following components.

alpha: the desired minimum coverage is 1α1 - \alpha.

rho: the known correlation between θ^\widehat{\theta} and τ^\widehat{\tau}. This correlation is computed from the pp-vectors aa and cc and the n×pn \times p design matrix XX using the formula ρ=a(XX)1c/(vθvτ)1/2\rho=a^{\top}(X^{\top}X)^{-1}c /(v_{\theta} \, v_{\tau})^{1/2}, where vθ=a(XX)1av_{\theta} =a^{\top}(X^{\top}X)^{-1} a and vτ=c(XX)1cv_{\tau} =c^{\top}(X^{\top}X)^{-1} c.

natural: 1 when the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation

d: the functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints: number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions b and s. In the description of bsvec, n.ints is also called qq.

bsvec: the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q.

Value

A plot of the graph of the even function ss used in the specification of the CIUUPI.

Examples

plot_s(bs.list.example)

Plot the graph of the squared scaled expected length of the CIUUPI

Description

The input bs.list determines the functions bb and ss that specify the confidence interval that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and observed response vector. The scaled expected length of the CIUUPI is an even function of the unknown parameter γ=τ/(σvτ1/2)\gamma = \tau \big/ \big(\sigma \, v_{\tau}^{1/2} \big). The R function plot_squared_sel plots the graph of the squared scaled expected length (i.e. squared SEL) of the CIUUPI, as a function of γ|\gamma|. To provide a stringent assessment of this squared SEL, we use a grid seq(0, (d+4), by = 0.01) of values of γ\gamma and Gauss Legendre quadrature with 10 nodes in the relevant integrals. By contrast, for the computation of the CIUUPI, implemented in bs_ciuupi, we use Gauss Legendre quadrature with 5 nodes in the relevant integrals.

Usage

plot_squared_sel(bs.list)

Arguments

bs.list

A list that includes the following components.

alpha: the desired minimum coverage is 1α1 - \alpha.

rho: the known correlation between θ^\widehat{\theta} and τ^\widehat{\tau}. This correlation is computed from the pp-vectors aa and cc and the n×pn \times p design matrix XX using the formula ρ=a(XX)1c/(vθvτ)1/2\rho=a^{\top}(X^{\top}X)^{-1}c /(v_{\theta} \, v_{\tau})^{1/2}, where vθ=a(XX)1av_{\theta} =a^{\top}(X^{\top}X)^{-1} a and vτ=c(XX)1cv_{\tau} =c^{\top}(X^{\top}X)^{-1} c.

natural: 1 when the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation

d: the functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints: number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions b and s. In the description of bsvec, n.ints is also called qq.

bsvec: the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h) \big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q.

Value

A plot of the graph of the squared scaled expected length (i.e. squared SEL) of the CIUUPI as a function of γ|\gamma|, where γ\gamma denotes the unknown parameter τ/(σvτ1/2)\tau \big/ \big(\sigma \, v_{\tau}^{1/2} \big).

Examples

plot_squared_sel(bs.list.example)

Compute the scaled expected length of the CIUUPI

Description

Evaluate the scaled expected length of the confidence interval that utilizes uncertain prior information (CIUUPI) at gam. This scaled expected length is defined to be the expected length of the CIUUPI divided by the expected length of the standard 1α1 - \alpha confidence interval. The input bs.list determines the functions bb and ss that specify the confidence interval that utilizes the uncertain prior information (CIUUPI), for all possible values of σ\sigma and observed response vector.

Usage

selciuupi(gam, n.nodes, bs.list)

Arguments

gam

A value of γ\gamma or vector of γ\gamma values at which the coverage probability function is evaluated

n.nodes

The number of nodes for the Gauss Legendre quadrature used for the evaluation of the scaled expected length

bs.list

A list that includes the following components.

alpha: 1α1 - \alpha is the desired minimum coverage probability of the confidence interval

rho: The known correlation ρ\rho between θ^\widehat{\theta} and τ^\widehat{\tau}

natural: 1 when the functions bb and ss are specified by natural cubic spline interpolation or 0 if these functions are specified by clamped cubic spline interpolation

d: the functions bb and ss are specified by cubic splines on the interval [d,d][-d, d]

n.ints: number of equal-length intervals in [0,d][0, d], where the endpoints of these intervals specify the knots, belonging to [0,d][0, d], of the cubic spline interpolations that specify the functions bb and ss. In the description of bsvec, n.ints is also called qq.

bsvec: the (2q1)(2q-1)-vector

(b(h),...,b((q1)h),s(0),s(h)...,s((q1)h)),\big(b(h),...,b((q-1)h), s(0),s(h)...,s((q-1)h)\big),

where qq=ceiling(dd/0.75) and h=d/qh=d/q.

Value

The value(s) of the scaled expected length at gam.

Examples

gam <- seq(0, 10, by = 0.2)
n.nodes <- 10
sel <- selciuupi(gam, n.nodes, bs.list.example)