plot.tpopt {rodd}R Documentation

Plot of \Psi function for resulting design

Description

Plots the \Psi(x,\xi) function for resulting approximation \xi^{**} of the T_{\mathrm{P}}-optimal design achieved with the help of tpopt. The definition of \Psi(x,\xi) can be found in the “details” section of function's tpopt specifications.

Usage

## S3 method for class 'tpopt'
plot(x, ...)

Arguments

x

an object of type "tpopt".

...

additional graphical parameters.

Details

We are interested in the shape of function \Psi(x,\xi^{**}) when we want to ensure the convergence of the algorithm. If algorithm had converged, then support points of \xi^{**} (which are represented by dots) will be near local maximums of the mentioned function. Furthermore, at all local maximums \Psi(x,\xi^{**}) should have the same value. Otherwise something went wrong and the algorithm should be restarted with another parameters.

See Also

tpopt, summary.tpopt, print.tpopt

Examples

#List of models
eta.1 = function(x, theta.1) 
    theta.1[1] + theta.1[2] * x + theta.1[3] * (x ^ 2) + 
    theta.1[4] * (x ^ 3) + theta.1[5] * (x ^ 4)

eta.2 = function(x, theta.2) 
    theta.2[1] + theta.2[2] * x + theta.2[3] * (x ^ 2)

eta <- list(eta.1, eta.2)

#List of fixed parameters
theta.1 <- c(1,1,1,1,1)
theta.2 <- c(1,1,1)
theta.fix <- list(theta.1, theta.2)

#Comparison table
p <- matrix(
    c(
        0, 1,
        0, 0
    ), c(length(eta), length(eta)), byrow = TRUE)

x <- seq(-1, 1, 0.1)
opt.1 <- list(method = 1, max.iter = 1)
opt.2 <- list(method = 1, max.iter = 2)
opt.3 <- list(method = 1)

res.1 <- tpopt(x = x, eta = eta, theta.fix = theta.fix, p = p, opt = opt.1)
res.2 <- tpopt(x = x, eta = eta, theta.fix = theta.fix, p = p, opt = opt.2)
res.3 <- tpopt(x = x, eta = eta, theta.fix = theta.fix, p = p, opt = opt.3)

plot(res.1)
plot(res.2)
plot(res.3)

[Package rodd version 0.2-1 Index]