MCdesign: Monte Carlo sampling for metrology applications

Description Usage Arguments Details Value Author(s) Examples

View source: R/MCdesign.R

Description

Creates Monte Carlo sampling designs for metrology applications

Usage

1
  MCdesign(N,k,distrib,distrib.pars,x)

Arguments

N

The number of design points.

k

The number of the input variables of the numerical code.

distrib

A named list of length k of names of distribution functions associated with the input variables of the code. See Details for defaults.

distrib.pars

A named list of lists of parameters describing the distributions associated with distrib. If distrib is present but distrib.pars is not the function uses the standardized versions of the distributions, see Details.

x

A named list containing the names of the input variables of the numerical code. See Details for defaults.

Details

This function creates a sampling design based on a Monte Carlo simulation.

If distrib or members of it are missing, an error message is displayed. Distributions have to be chosen among uniform(unif), triangular(triang), normal(norm), truncated normal(tnorm), student(t), location-scale student(t.scaled).

If distrib.pars is missing or misspecified, the standardized parameters of the associated distributions in distrib are used for all the variables in x:

unif : min=0, max=1

triang : min=0, max=1, mode=0.5

norm : mean=0, sd=1

tnorm : mean=0, sd=1, lower=0, upper=+Inf

t : nu=100

t.scaled : nu=100, mean=0, sd=1

If x or members of it are missing, arbitrary names of the form 'Xn' are applied to the columns of the output table. Names are automatically abbreviated to 15 characters.

Value

A table containing the MC design with margins in distrib.

Author(s)

Severine Demeyer severine.demeyer@lne.fr

Examples

1
2
3
4
5
6
7
  
  N<- 100
  k<- 4
  x<- list("X1","X2","X3","X4")
  distrib<- list("norm","norm","unif","t.scaled")
  distrib.pars<- list(list(0,2),list(0,1),list(20,150),list(2,0,1))
  MCdesign(N,k,distrib,distrib.pars,x)

ATmet documentation built on July 8, 2020, 5:55 p.m.