Learn R Programming

OptimalDesign (version 1.0.2.1)

infmat: Information matrix of a design

Description

Computes the information matrix of a design w in the model determined by the matrix Fx of candidate regressors.

Usage

infmat(Fx, w, echo=TRUE)

Value

The information matrix of the design w in the model with all candidate regresors given by the rows of Fx.

Arguments

Fx

the n times m matrix of candidate regressors (as rows), where n is the number of candidate design points and m (where m>=2, m<=n) is the number of parameters.

w

a non-negative vector of length n representing the design.

echo

Print the call of the function?

Author

Radoslav Harman, Lenka Filova

See Also

optcrit

Examples

Run this code

# Compute its information matrix for the design that is
# uniform on all the points with at most two levels equal to 1
# in the main effects model with 2 factors.

Fx <- Fx_cube(~x1 + x2 + x3 + x4 + x5, lower = rep(0, 5))
w <- rep(0, 2^5)
for (i in 1:(2^5)) if (sum(Fx[i, 2:6]) <= 2) w[i] <- 1
print(M <- infmat(Fx, w))

if (FALSE) {
# Visualize the correlation matrix of the parameter estimators

V <- solve(M); Y <- diag(1/sqrt(diag(V)))
library(corrplot); corrplot(Y %*% V %*% Y)
}

Run the code above in your browser using DataLab