augment_design: Augment Design

View source: R/augment.R

augment_designR Documentation

Augment Design

Description

Augments a design. The user gives an initial design for which he would like to add points and specifies the weight of the new points. Then he is prompted to choose a minimum efficiency. After that, the candidate points region is calculated and the user can choose the points and weights to add.

Usage

augment_design(
  criterion,
  init_design,
  alpha,
  model,
  parameters,
  par_values,
  design_space,
  calc_optimal_design,
  par_int = NA,
  matB = NULL,
  distribution = NA,
  weight_fun = function(x) 1
)

Arguments

criterion

character variable with the chosen optimality criterion. Can be one of the following:

  • 'D-Optimality'

  • 'Ds-Optimality'

  • 'A-Optimality'

  • 'I-Optimality'

  • 'L-Optimality'

init_design

dataframe with "Point" and "Weight" columns that represents the initial design to augment

alpha

combined weight of the new points

model

formula that represents the model with x as the independent variable

parameters

character vector with the unknown parameters of the model to estimate

par_values

numeric vector with the initial values of the unknown parameters

design_space

numeric vector with the limits of the space of the design

calc_optimal_design

boolean parameter, if TRUE, the optimal design is calculated and efficiencies of the initial and augmented design are given

par_int

optional numeric vector with the index of the parameters of interest for Ds-optimality.

matB

optional matrix of dimensions k x k, for L-optimality.

distribution

character specifying the probability distribution of the response. Can be one of the following:

  • 'Homoscedasticity'

  • 'Gamma', which can be used for exponential or normal heteroscedastic with constant relative error

  • 'Poisson'

  • 'Logistic'

  • 'Log-Normal' (work in progress)

weight_fun

optional one variable function that represents the square of the structure of variance, in case of heteroscedastic variance of the response

Value

A dataframe that represents the D-augmented design

Examples

init_des <- data.frame("Point" = c(30, 60, 90), "Weight" = c(1/3, 1/3, 1/3))
augment_design("D-Optimality", init_des, 0.25, y ~ 10^(a-b/(c+x)), c("a","b","c"),
  c(8.07131,  1730.63, 233.426), c(1, 100), TRUE)
augment_design("D-Optimality", init_des, 0.25, y ~ 10^(a-b/(c+x)), c("a","b","c"),
  c(8.07131,  1730.63, 233.426), c(1, 100), FALSE)

Kezrael/optedr documentation built on Oct. 12, 2024, 8:40 p.m.