ci_standard {ciuupi} | R Documentation |
For given observed response vector y
, compute
the standard 1 - \alpha
confidence interval
Description
If \sigma
is provided then compute the standard 1 - \alpha
confidence interval for \theta
. If \sigma
is not provided
then, as long as n-p \ge 30
, replace \sigma
by its estimate
to compute an approximate 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
|
X |
The known |
y |
The |
alpha |
|
sig |
Standard deviation of the random error.
If a value is not specified then, provided that |
Details
Suppose that
y = X \beta + \varepsilon,
where y
is a random n
-vector of responses, X
is a known n \times p
matrix with linearly independent columns,
\beta
is an unknown parameter p
-vector, and
\varepsilon \sim N(0, \, \sigma^2 \, I)
, with \sigma^2
assumed known.
Suppose that the parameter of interest is \theta = a^{\top} \beta
.
The R function ci_standard
computes the standard 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 \times 2
factorial data set from the
2^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 - \alpha
confidence interval
for \theta
. If \sigma
is not provided then, as long as n-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)