N: Number of design points
S: The design space
tt: The level of skewness
\(\theta\): The parameter vector
FUN: The function for calculating the derivatives of the given model
N <- 21
S <- c(-1, 1)
tt <- 0
theta <- rep(1, 4)
poly3 <- function(xi,theta){
matrix(c(1, xi, xi^2, xi^3), ncol = 1)
}
u <- seq(from = S[1], to = S[2], length.out = N)
res <- Aopt(N = N, u = u, tt = tt, FUN = poly3,
theta = theta)
Showing the optimal design and the support points
res$design
#> # A tibble: 8 × 2
#> location weight
#> <dbl> <dbl>
#> 1 -1 0.168
#> 2 -0.7 0.0113
#> 3 -0.6 0.0104
#> 4 -0.3 0.295
#> 5 0.3 0.295
#> 6 0.6 0.0104
#> 7 0.7 0.0113
#> 8 1 0.168
Or we can plot them