CREATE_INPUT: Function to define the input variables (imprecise, random or...

Description Usage Arguments Details Value See Also Examples

Description

Function to define the input variables (imprecise, random or fixed). Five types are accounted for:

Usage

1
2
CREATE_INPUT(name, type, distr = NULL, param, 
		monoton = "dunno", quser = NULL, ruser = NULL)

Arguments

name

String of the name of the input variable.

type

String to specify the type of input variable:

  • "proba": probability distribution.

  • "possi": possibility distribution.

  • "impr proba": imprecise probability distribution

  • "fixed": fixed scalar value.

distr

String to specify the type of distribution:

  • If type="proba" or type="impr proba", distr should be: "normal", "lognormal", "triangle", "beta", "gumbel","user".

  • If type="possi", distr should be: "trapeze", "triangle", "interval".

param

Vector of parameter values. This depends on the choice of distr and type.

  • If type="proba" and distr="normal", param should be a vector of two values. For example c(0,1) corresponds to a normal distribution with mean=0 and standard deviation of 1.

  • If type="proba" and distr="lognormal", param should be a vector of two values. For example c(0,1) corresponds to a lognormal distribution with meanlog=0 and standard deviation of sdlog=1.

  • If type="proba" and distr="triangle", param should be a vector of three values. For example c(0,2,1) corresponds to a traingle distribution with apex=1 and support[0,2]. See help from package triangle.

  • If type="proba" and distr="beta", param should be a vector of two values. For example c(1,1) corresponds to a beta distribution with parameters shape1 and shape2 equal to 1 (see help of qbeta in stats package).

  • If type="proba" and distr="gumbel", param should be a vector of two values. For example c(0,1) corresponds to a gumbel distribution with location=0 and scale parameter=1.

  • If type="possi" and distr="trapeze", param should be a vector of four values. For example c(0,1,2,3) corresponds to a possibility distribution with core=[1,2] and support=[0,3].

  • If type="possi" and distr="triangle", param should be a vector of three values. For example c(0,1,2) corresponds to a possibility distribution with core=1 and support=[0,2].

  • If type="possi" and distr="interval", param should be a vector of two values. For example c(0,1) corresponds to the interval [0,1].

  • If type="impr proba", param should be a vector of integers; each integer points to the rank of the input, which represents the uncertainty on the corresponding parameter of chosen distribution For example, if type="impr proba" and distr="normal", c(2,3) corresponds to an imprecise normal distribution, whose imprecise mean is input[[2]] and standard deviation is input[[3]].

monoton

String to specify the monotony of the model function regarding the input variable.

  • "decr" for decreasing.

  • "incr" for increasing.

  • "dunno" for unknown monotony or known no-monotony.

quser

If distr="user", this string specifies the quantile function of a probability distribution non listed in the pre-defined ones. The vector of param should be updated according to this law.

ruser

If distr="user", string to specify the random sampling function of a probability distribution non listed in the pre-defined ones. The vector of param should be updated according to this law.

Details

Details of the theory and the example in Dubois & Guyonnet (2011) Available at: https://hal-brgm.archives-ouvertes.fr/file/index/docid/578821/filename/Uncertainties_RA_09_l_dg.pdf

Value

list with the afore-described arguments.

See Also

CREATE_DISTR PLOT_INPUT

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
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
#################################################
#### EXAMPLE 1 of Dubois & Guyonnet (2011)
#### Probability and Possibility distributions
#################################################

ninput<-5 #Number of input parameters
input<-vector(mode="list", length=ninput) # Initialisation

input[[1]]=CREATE_INPUT(
		name="UER",
		type="possi",
		distr="triangle",
		param=c(2.e-2, 5.7e-2, 1.e-1),
		monoton="incr"
		)
input[[2]]=CREATE_INPUT(
		name="EF",
		type="possi",
		distr="triangle",
		param=c(200,250,350),
		monoton="incr"
		)
input[[3]]=CREATE_INPUT(
		name="I",
		type="possi",
		distr="triangle",
		param=c(1,1.5,2.5),
		monoton="incr"
		)
input[[4]]=CREATE_INPUT(
		name="C",
		type="proba",
		distr="triangle",
		param=c(5e-3,20e-3,10e-3)
		)
input[[5]]=CREATE_INPUT(
		name="ED",
		type="proba",
		distr="triangle",
		param=c(10,50,30)
		)
		
#################################################
#### EXAMPLE 2 of Sch\"obi & Sudret (2016)
#### Imprecise Probability distributions
#################################################

ninput<-6 #Number of input parameters
input<-vector(mode="list", length=ninput) # Initialisation

# Imprecise normal probability 
# whose parameters are described by the 3rd and 5th parameters
input[[1]]=CREATE_INPUT(
		name="A",
		type="impr proba",
		distr="normal",
		param=c(3,5),
		monoton="dunno"
		)

# Imprecise normal probability
# whose parameters are described by the 4th and 6th parameters
input[[2]]=CREATE_INPUT(
		name="B",
		type="impr proba",
		distr="normal",
		param=c(4,6),
		monoton="dunno"
		)

# imprecise paramters of afore-described probability distribution
# mean of input number 1 as an interval
input[[3]]=CREATE_INPUT(
		name="mu_A",
		type="possi",
		distr="interval",
		param=c(-0.5,0.5)
		)

# mean of input number 2 as an interval
input[[4]]=CREATE_INPUT(
		name="mu_B",
		type="possi",
		distr="interval",
		param=c(-0.5,0.5)
		)

# standard deviation of input number 1  as an interval
input[[5]]=CREATE_INPUT(
		name="s_A",
		type="possi",
		distr="interval",
		param=c(0.7,1)
		)

# standard deviation of input number 2  as an interval
input[[6]]=CREATE_INPUT(
		name="s_B",
		type="possi",
		distr="interval",
		param=c(0.7,1)
		)
		

HYRISK documentation built on May 2, 2019, 12:54 p.m.