mMdist: Computes the minimax (fill) distance of a design

Description Usage Arguments Value Examples

View source: R/criteria.R

Description

mMdist computes the minimax (fill) distance of a design (see Mak and Joseph (2018) for definition). Current design region options include the unit hypercube ("hypercube"), the unit simplex ("simplex"), the unit ball ("ball"), and user-defined constraints on the unit hypercube ("custom").

Usage

1
  mMdist(D,neval=1e5,method="lattice",region="hypercube",const=NA,eval_pts=NA)

Arguments

D

An N-by-p design matrix.

neval

Number of sample points for approximation.

method

Method for generating approximation points. Current options include "lattice" (lattice rule) and "sobol" (Sobol' sequence).

region

String for desired design region. Current options include "hypercube", "simplex", "ball", and "custom".

const

Function for desired constraints (inequalities) on design space.

eval_pts

Custom clustering points (used only if region == "custom").

Value

A list with two objects:

dist

Minimax (fill) distance.

dist.vec

Minimax (fill) distance for each design point.

far.pt

A p-vector for the farthest point in design region to design.

far.despt

A p-vector for the design point closest to far.pt.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  ## Not run: 
    #20-point minimax design on the hypercube [0,1]^2
    D <- minimax(N=20,p=2)
    plot(NULL,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2") #set up plot
    polygon(c(0,0,1,1),c(0,1,1,0),col="gray") #design space
    points(D,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2",pch=16) #design points
    mM <- mMdist(D)
    mM$dist #minimax (fill) distance
    lines(rbind(mM$far.pt,mM$far.despt),col="red",lty=2,lwd=2) #plot farthest point
  
## End(Not run)

minimaxdesign documentation built on July 13, 2021, 1:06 a.m.