Description Usage Arguments Details Value References See Also Examples
Compute the usual 1 - alpha
confidence interval
1 | cistandard2(X, a, y, alpha)
|
X |
A known n by p matrix |
a |
A p-vector used to specify the parameter of interest |
y |
The n-vector of observed responses |
alpha |
1 - |
Suppose that
Y = X β + ε
is a random n-vector
of responses, X is a known n by p matrix with linearly
independent columns, β is an unknown parameter p-vector and
ε is the random error with components that
are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is θ = a
'
β, where a
is a specified p-vector.
Then cistandard2
computes the usual 1 - alpha
confidence interval for θ,
for given n-vector of observed responses y
.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
, for the vector of observed
responses y = (-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0,
5.2, 6.2).
The design matrix X and the vector a
(denoted in
R by a.vec) are entered into R using the commands
in the following example.
The usual 1 - alpha
confidence interval.
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | col1 <- rep(1,4)
col2 <- c(-1, 1, -1, 1)
col3 <- c(-1, -1, 1, 1)
col4 <- c(1, -1, -1, 1)
X.single.rep <- cbind(col1, col2, col3, col4)
X <- rbind(X.single.rep, X.single.rep, X.single.rep)
a.vec <- c(0, 2, 0, -2)
y <- c(-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0, 5.2, 6.2)
# Calculate the usual 95% confidence interval
res <- cistandard2(X, a=a.vec, y, alpha = 0.05)
res
# The usual 1 - alpha confidence interval for theta is (-0.08185, 3.08185)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.