Suppose that y is a random n-vector of responses satisfying y=Xβ+ε where X is a known n×p matrix with linearly independent columns, β is an unknown parameter p-vector, and ε∼N(0,σ2I), with σ2 an unknown positive parameter. Suppose that the parameter of interest is θ=a⊤β and that there is uncertain prior information that τ=c⊤β takes the value t, where a and c are specified linearly independent nonzero p-vectors and t is a specified number. This package computes a confidence interval, with minimum coverage 1−α, for θ that utilizes the uncertain prior information that τ=t through desirable expected length properties.
Let ˆβ denote the least squares estimator of β. Then ˆθ=a⊤ˆβ and ˆτ=c⊤ˆβ−t are the least squares estimators of θ and τ, respectively. Let vθ=Var(ˆθ)/σ2 and vτ=Var(ˆτ)/σ2. Also let ˆσ2=(y−Xˆβ)⊤(y−Xˆβ)/m, where m=n−p. Note that ˆσ/σ has the same distribution as √Q/m, where Q∼χ2m. Now let γ=(τ−t)/(σv1/2τ) and ˆγ=(ˆτ−t)/(ˆσv1/2τ). The 1−α confidence interval for θ that utilizes the uncertain prior information that τ=t has the form CI(b,s)=[ˆθ−v1/2θˆσb(ˆγ)−v1/2θˆσs(ˆγ),ˆθ−v1/2θˆσb(ˆγ)+v1/2θˆσs(ˆγ)],
where b is an odd continuous function that takes the value 0 for |x|≥d, and s is an even continuous function that takes the value tm,1−α/2 for all |x|≥d, where d is a sufficiently large positive number, chosen by ciuupi2, and tm,1−α/2 is the 1−α/2 quantile of the tm distribution. The values of b(x) and s(x) for x∈[−d,d] are determined by the vector (b(d/6),b(2d/6),…,b(5d/6),s(0),s(d/6),…,s(5d/6)) through either natural (default) or clamped cubic spline interpolation.
The usual confidence interval for θ, with coverage 1−α, is [ˆθ−tm,1−α/2v1/2θˆσ,ˆθ+tm,1−α/2v1/2θˆσ]. Kabaila & Giri (2009) define the scaled expected length of the confidence interval CI(b,s) to be the expected length of this interval divided by the expected length of the usual confidence interval for θ, with coverage 1−α. The desired scaled expected length properties include the property that the gain when the prior information is correct, as measured by 1−(scaled expected length at γ=0), is equal to the maximum possible loss when the prior information happens to be incorrect, as measured by maximum of the scaled expected length −1.
The Kabaila & Giri (2009) confidence interval is found by computing the value of the vector (b(d/6),b(2d/6),…,b(5d/6),s(0),s(d/6),…,s(5d/6)) so that the confidence interval has minimum coverage probability 1−α and the desired expected length properties. This numerical nonlinear constrained optimization is carried out using slsqp
function in the nloptr package and the computationally convenient formulas derived by Kabaila & Giri (2009).
The objective function, used in the nonlinear constrained optimization, based on the first definition (put forward by Kabaila & Giri (2009)) of the scaled expected length of the confidence interval CI(b,s) is obj = 1
(default). A second (new) definition of the scaled expected length of the confidence interval CI(b,s) is the expected value of the ratio of the length of the confidence interval CI(b,s) divided by the length of the usual confidence interval for θ, with coverage 1−α, computed from the same data. The objective function, used in the nonlinear constrained optimization, based on the second definition of the scaled expected length of the confidence interval CI(b,s) is obj = 2
.
The function bsciuupi2
is used to compute the vector (b(d/6),b(2d/6),…,b(5d/6),s(0),s(d/6),…,s(5d/6)) that specifies the Kabaila and Giri (2009) confidence interval that utilizes the uncertain prior information. Once this vector has been computed, the functions b and s for this confidence interval can be evaluated using bsspline2
.
For given α, m, ρ, the coverage probability and scaled expected length of the Kabaila & Giri (2009) confidence interval are even functions of the unknown parameter γ. The coverage probability of this confidence interval can be evaluated using cpciuupi2
. The first and the second definitions of the scaled expected length of this confidence interval can be evaluated using sel1ciuupi2
and sel2ciuupi2
, respectively.
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.