Description Usage Arguments Details Value Examples

View source: R/10-UserEfficiency.R

Given a parameter space for the unknown parameters, this function calculates the D-efficiency of a design *ξ_1* with respect to a design *ξ_2*.
Usually, *ξ_2* is an optimal design.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |

`formula` |
A linear or nonlinear model |

`predvars` |
A vector of characters. Denotes the predictors in the |

`parvars` |
A vector of characters. Denotes the unknown parameters in the |

`family` |
A description of the response distribution and the link function to be used in the model.
This can be a family function, a call to a family function or a character string naming the family.
Every family function has a link argument allowing to specify the link function to be applied on the response variable.
If not specified, default links are used. For details see |

`lp` |
Vector of lower bounds for the model parameters. Should be in the same order as |

`up` |
Vector of upper bounds for the model parameters. Should be in the same order as |

`fimfunc` |
A function. Returns the FIM as a |

`x2` |
Vector of design (support) points of the optimal design ( |

`w2` |
Vector of corresponding design weights for |

`x1` |
Vector of design (support) points of |

`w1` |
Vector of corresponding design weights for |

`standardized` |
Maximin standardized design? When |

`localdes` |
A function that takes the parameter values as inputs and returns the design points and weights of the locally optimal design.
Required when |

`crt.minimax.control` |
Control parameters to optimize the minimax or standardized maximin criterion at a given design over a |

`npar` |
Number of model parameters. Used when |

See Masoudi et al. (2017) for formula details.

The argument `x1`

is the vector of design points.
For design points with more than one dimension (the models with more than one predictors),
it is a concatenation of the design points, but **dimension-wise**.
For example, let the model has three predictors *(I, S, Z)*.
Then, a two-point optimal design has the following points:
*{point1 = (I1, S1, Z1), point2 = (I2, S2, Z2)}*.
Then, the argument `x`

is equal to
`x = c(I1, I2, S1, S2, Z1, Z2)`

.

A value between 0 and 1.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ```
# Relative D-efficiency with respect to the minimax criterion
meff(formula = ~1/(1 + exp(-b * (x-a))), predvars = "x",
parvars = c("a", "b"), family = "binomial",
lp = c(-3, .5), up = c(3, 2),
x2 = c(-3, -1.608782, 0, 1.608782, 3),
w2 = c(0.22291601, 0.26438449, 0.02539899, 0.26438449, 0.22291601),
x1 = c(-1, 1), w1 = c(.5, .5))
# A function to calculate the locally D-optimal design for the 2PL model
Dopt_2pl <- function(a, b){
x <- c(a + (1/b) * 1.5434046, a - (1/b) * 1.5434046)
return(list(x = x, w = c(.5, .5)))
}
# Relative D-efficiency with respect to the standardized maximin criterion
meff (formula = ~1/(1 + exp(-b * (x-a))), predvars = "x",
parvars = c("a", "b"), family = "binomial",
lp = c(-3, .5), up = c(3, 2),
x2 = c(-3, -1.611255, 0, 1.611255, 3),
w2 = c(0.22167034, 0.26592974, 0.02479984, 0.26592974, 0.22167034),
x1 = c(0, -1), w1 = c(.5, .5),
standardized = TRUE,
localdes = Dopt_2pl)
``` |

ICAOD documentation built on Oct. 23, 2020, 6:40 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.