Learn R Programming

ciuupi (version 1.1.0)

cistandard: Compute the standard confidence interval

Description

Compute the standard confidence interval

Usage

cistandard(a, x, y, alpha, sig = NULL)

Arguments

a

A vector used to specify the parameter of interest

x

A known n by p matrix

y

A known n-vector of responses

alpha

1 - alpha is the nominal coverage probability of the confidence interval

sig

Standard deviation of the random error. If a value is not specified, sig will be estimated from the data.

Value

The standard confidence interval

Details

Suppose that $$Y = X \beta + \epsilon$$ is a random \(n\)-vector of responses, \(X\) is a known \(n\) by \(p\) matrix with linearly independent columns, \(\beta\) is an unknown parameter \(p\)-vector and \(\epsilon\) has a multivariate normal distribution with mean vector 0 and variance sig^2 times the \(n\) by \(n\) identity matrix. Then cistandard will compute the standard confidence interval for a' \(\beta\).

In the example below we use the data set described in Table 7.5 of Box et al. (1963). A description of the parameter of interest is given in Dicsussion 5.8, p.3426 of Kabaila and Giri (2009).

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

Run this code
# NOT RUN {
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)

# Calculate the standard 95% confidence interval when sigma = 0.8
res <- cistandard(a, x, y, 0.05, sig = 0.8)
res

# }

Run the code above in your browser using DataLab