plot.tpopt: Plot of Psi function for resulting design

Description Usage Arguments Details See Also Examples

View source: R/plot.tpopt.R

Description

Plots the Psi(x,xi) function for resulting approximation xi^{**} of the T_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

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#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)

rodd documentation built on May 2, 2019, 8:16 a.m.