poly3 <- function(xi, theta){
matrix(c(1, xi, xi^2, xi^3), ncol = 1)
}
design_A <- data.frame(location = c(-1, -0.464, 0.464, 1),
weight = c(0.151, 0.349, 0.349, 0.151))
design_D = data.frame(location = c(-1, -0.447, 0.447, 1),
weight = rep(0.25, 4))
u <- seq(-1, 1, length.out = 201)
par(mfrow = c(2,2))
plot_dispersion(u, design_A, tt = 0, FUN = poly3, theta = rep(0, 4), criterion = "A")
plot_dispersion(u, design_A, tt = 0, FUN = poly3, theta = rep(0, 4), criterion = "D")
plot_dispersion(u, design_D, tt = 0, FUN = poly3, theta = rep(0, 4), criterion = "A")
plot_dispersion(u, design_D, tt = 0, FUN = poly3, theta = rep(0, 4), criterion = "D")
Run the code above in your browser using DataLab