Last data update: 2014.03.03

R: Latin hypercube sampling for metrology applications
LHSdesignR Documentation

Latin hypercube sampling for metrology applications

Description

Creates latin hypercube sampling designs for metrology applications

Usage

  LHSdesign(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 contains a wrapper for the optimumLHS function in package lhs.

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

design.unif A table containing the LHS design in the uniform space.

design.phys A table containing the LHS design with margins in distrib.

Author(s)

Severine Demeyer severine.demeyer@lne.fr

Examples

   
  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))
  LHSdesign(N,k,distrib,distrib.pars,x)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ATmet)
Loading required package: DiceDesign
Loading required package: lhs
Loading required package: metRology

Attaching package: 'metRology'

The following objects are masked from 'package:base':

    cbind, rbind

Loading required package: msm
Loading required package: sensitivity
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ATmet/LHSdesign.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LHSdesign
> ### Title: Latin hypercube sampling for metrology applications
> ### Aliases: LHSdesign
> ### Keywords: ~kwd1 ~kwd2
> 
> ### ** Examples
> 
>    
>   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))
>   LHSdesign(N,k,distrib,distrib.pars,x)
$design.unif
             X1          X2          X3          X4
1   0.580579661 0.274133226 0.970354283 0.388991925
2   0.713391615 0.185081757 0.198690096 0.966783670
3   0.248190298 0.232758886 0.911101702 0.463426242
4   0.132421586 0.447875262 0.179721247 0.250834408
5   0.415445381 0.953895857 0.801033971 0.767838428
6   0.997033442 0.108744334 0.402108069 0.564400008
7   0.088709810 0.202556472 0.967990343 0.610412663
8   0.342278218 0.065111469 0.212416394 0.536190794
9   0.826111405 0.648542896 0.464645067 0.180295964
10  0.645293560 0.009271037 0.821795530 0.422304458
11  0.197049909 0.458134306 0.265214482 0.825040708
12  0.544623080 0.250005200 0.438998611 0.225391818
13  0.477934788 0.917389053 0.669593969 0.212992403
14  0.963285204 0.379339585 0.812113045 0.757107137
15  0.382785788 0.550263446 0.630828158 0.874935376
16  0.105096646 0.532401376 0.236050997 0.528700486
17  0.890949586 0.173885300 0.008558021 0.470504125
18  0.816427530 0.482345911 0.687926135 0.340862850
19  0.919288206 0.587419456 0.361230253 0.395709923
20  0.019149966 0.661315930 0.719603985 0.847412791
21  0.426318222 0.312624371 0.415800180 0.263736669
22  0.570598635 0.976466865 0.257757043 0.929788151
23  0.698236107 0.405006315 0.138864466 0.291957454
24  0.359065696 0.807427825 0.075276252 0.743572399
25  0.974842384 0.745904319 0.476800775 0.551754289
26  0.755288559 0.435270185 0.744865659 0.939058618
27  0.297714061 0.590850569 0.302406278 0.704934443
28  0.951270505 0.694445857 0.512017015 0.314663532
29  0.149298400 0.420656674 0.566219670 0.598817314
30  0.407448205 0.904410789 0.374903392 0.335259352
31  0.765929966 0.524503944 0.840107383 0.029195099
32  0.393377679 0.941241507 0.457284794 0.985487005
33  0.667214135 0.392036156 0.880003871 0.733178798
34  0.118483181 0.678452208 0.651389781 0.233397782
35  0.835429387 0.046527113 0.448353796 0.494973789
36  0.258820472 0.613878441 0.065134665 0.710940401
37  0.532080560 0.222685520 0.544213505 0.586785098
38  0.732067580 0.575052639 0.333479308 0.058669506
39  0.843905665 0.332196073 0.671742936 0.036477377
40  0.511543112 0.774031953 0.398084104 0.601560411
41  0.563442261 0.463072332 0.833825624 0.403114698
42  0.162793279 0.605701038 0.618509374 0.046823145
43  0.487045687 0.761748873 0.312470841 0.014832783
44  0.702933911 0.887169572 0.481324096 0.895119041
45  0.067803743 0.985019092 0.229651405 0.857892407
46  0.495925998 0.823201976 0.032370870 0.979130674
47  0.609855233 0.752808998 0.707693015 0.137102856
48  0.623068555 0.493320125 0.058576503 0.795961351
49  0.456863806 0.384410558 0.953566351 0.625824679
50  0.466858850 0.715443133 0.329789733 0.146060401
51  0.057691169 0.326678102 0.358596063 0.914256837
52  0.521816646 0.729566408 0.040624932 0.203595161
53  0.941011711 0.875271410 0.570171946 0.164103088
54  0.853656706 0.096209110 0.537769586 0.271697672
55  0.808979064 0.635730250 0.422195965 0.816931663
56  0.312209122 0.415069886 0.017065792 0.641729975
57  0.129550301 0.356920453 0.120192767 0.116473445
58  0.591468282 0.816296250 0.089502499 0.362151439
59  0.445441982 0.017850466 0.552069989 0.693003939
60  0.794275621 0.153061709 0.100208751 0.412263315
61  0.004429581 0.368395826 0.787454326 0.689282807
62  0.987504721 0.196428019 0.273046591 0.444162114
63  0.883165291 0.793944420 0.692479068 0.636767989
64  0.935365570 0.475132491 0.949270083 0.771710492
65  0.219103300 0.657964992 0.201962747 0.193345893
66  0.784927556 0.078692018 0.165924048 0.068256519
67  0.031337596 0.131511846 0.494154303 0.547304409
68  0.557665208 0.504127492 0.598797276 0.994818449
69  0.328756616 0.080364126 0.792086583 0.102026848
70  0.304212167 0.543452198 0.778773095 0.507991520
71  0.618718055 0.051491589 0.240247617 0.432907788
72  0.869814539 0.789622754 0.995219715 0.860728697
73  0.658304072 0.111217723 0.098533188 0.951139250
74  0.674999202 0.168076982 0.529121668 0.881505970
75  0.183477908 0.851008465 0.500606811 0.075971756
76  0.505685466 0.899028108 0.738658285 0.320815633
77  0.778212427 0.995444194 0.346424433 0.281885410
78  0.637639808 0.837935491 0.891874739 0.371246652
79  0.370680355 0.936955802 0.112930098 0.656867322
80  0.073370516 0.129704038 0.602575678 0.905572420
81  0.683464070 0.960588722 0.862033983 0.486115784
82  0.334095170 0.026412106 0.029480756 0.783372208
83  0.265553172 0.921474821 0.284916265 0.308486686
84  0.201056078 0.738112258 0.722464864 0.805914334
85  0.099681832 0.706110247 0.586832714 0.574434372
86  0.047048184 0.219210247 0.290248225 0.355223447
87  0.177682187 0.510381081 0.756158672 0.941659823
88  0.270719341 0.860368899 0.934271459 0.120477724
89  0.285652432 0.298101586 0.904905356 0.724932341
90  0.233972407 0.303104121 0.629892229 0.080570188
91  0.226937702 0.626361911 0.851878139 0.002573196
92  0.026927225 0.140979634 0.871969125 0.158632053
93  0.434868821 0.243919544 0.182143150 0.678955398
94  0.929882445 0.845784110 0.150527415 0.833761690
95  0.908229544 0.681156054 0.922000572 0.665014059
96  0.740922400 0.342095386 0.985074486 0.093994586
97  0.878438283 0.564382247 0.140110441 0.454202160
98  0.723798320 0.036626160 0.647815637 0.513252639
99  0.367866732 0.265896566 0.764928603 0.248199659
100 0.152665933 0.287947613 0.387506640 0.172676181

$design.phys
             X1          X2        X3           X4
1    0.40675322 -0.60035983 146.14606  -0.32201478
2    1.12664068 -0.89616712  45.82971   3.68375021
3   -1.36039127 -0.72979129 138.44322  -0.10372407
4   -2.23003384 -0.13103133  43.36376  -0.81286907
5   -0.42711855  1.68386229 124.13442   0.89713499
6    5.50291013 -1.23323348  72.27405   0.18368068
7   -2.69748543 -0.83252452 145.83874   0.32019880
8   -0.81250676 -1.51322334  47.61413   0.10263223
9    1.87781908  0.38138956  80.40386  -1.17609276
10   0.74528945 -2.35461160 126.83342  -0.22245837
11  -1.70441182 -0.10513509  54.47788   1.20989187
12   0.22417547 -0.67447339  77.06982  -0.92943357
13  -0.11067503  1.38772141 107.04722  -0.99137251
14   3.58030261 -0.30721573 125.57470   0.84789697
15  -0.59634483  0.12632697 102.00766   1.60293602
16  -2.50606823  0.08130770  50.68663   0.08131130
17   2.46318777 -0.93892238  21.11254  -0.08357248
18   1.80366844 -0.04426669 109.43040  -0.47479796
19   2.80059942  0.22091183  66.95993  -0.30161073
20  -4.14326059  0.41605721 113.54852   1.36632568
21  -0.37151115 -0.48842513  74.05402  -0.75824486
22   0.35579689  1.98570338  53.50842   2.37887831
23   1.03866817 -0.24040974  38.05238  -0.64710938
24  -0.72191453  0.86845673  29.78591   0.78885841
25   3.91454852  0.66165654  81.98410   0.14717377
26   1.38245405 -0.16297214 116.83254   2.59558348
27  -1.06197304  0.22973350  59.31282   0.63547187
28   3.31459849  0.50849209  86.56221  -0.56441787
29  -2.07889441 -0.20021383  93.60856   0.28512138
30  -0.46822817  1.30710097  68.73744  -0.49351369
31   1.45101721  0.06146095 129.21396  -3.95489552
32  -0.54105268  1.56528122  79.44702   5.74101435
33   0.86446695 -0.27401602 134.40050   0.74557089
34  -2.36520681  0.46337501 104.68067  -0.89134403
35   1.95169022 -1.67950212  78.28599  -0.01421699
36  -1.29397218  0.28944205  28.46751   0.65805845
37   0.16100180 -0.76315487  90.74776   0.24924854
38   1.23815641  0.18925276  63.35231  -2.65583846
39   2.02128039 -0.43385719 107.32658  -3.49657761
40   0.05787666  0.75219119  71.75093   0.29337195
41   0.31940488 -0.09269652 128.39733  -0.27932714
42  -1.96608486  0.26813173 100.40622  -3.03365146
43  -0.06495471  0.71193948  60.62121  -5.67597066
44   1.06571514  1.21161221  82.57213   1.82370351
45  -2.98469946  2.17059478  49.85468   1.44958080
46  -0.02042437  0.92763671  24.20821   4.74017565
47   0.55788349  0.68335586 112.00009  -1.49209262
48   0.62709987 -0.01674475  27.61495   1.03859873
49  -0.21667592 -0.29391728 143.96363   0.36771972
50  -0.16633664  0.56935723  62.87267  -1.41730830
51  -3.14890965 -0.44910460  66.61749   2.09242946
52   0.10942702  0.61150217  25.28124  -1.04099733
53   3.12664653  1.15166884  94.12235  -1.28258534
54   2.10449249 -1.30345867  89.91005  -0.72581599
55   1.74828053  0.34706898  74.88548   1.15899389
56  -0.97919642 -0.21452231  22.21855   0.41801831
57  -2.25703893 -0.36670255  35.62506  -1.69078027
58   0.46264714  0.90134013  31.63532  -0.40561437
59  -0.27437153 -2.10031736  91.76910   0.59176179
60   1.64269360 -1.02339014  33.02714  -0.25206786
61  -5.23488340 -0.33610505 122.36906   0.57842200
62   4.48309727 -0.85444939  55.49606  -0.15892753
63   2.38191934  0.82018411 110.02228   0.40217659
64   3.03398277 -0.06237402 143.40511   0.91548499
65  -1.55045040  0.40691555  46.25516  -1.09812716
66   1.57788748 -1.41392462  41.57013  -2.42114354
67  -3.72297743 -1.11927300  84.24006   0.13439992
68   0.29010459  0.01034627  97.84365   9.74673334
69  -0.88669824 -1.40262647 122.97126  -1.85943012
70  -1.02464782  0.10913476 121.24050   0.02260632
71   0.60423133 -1.63056008  51.23219  -0.19149726
72   2.25102973  0.80511297 149.37856   1.47343754
73   0.81567806 -1.22007764  32.80931   2.95953510
74   0.90751995 -0.96179227  88.78582   1.66938102
75  -1.80438049  1.04076836  85.07889  -2.26329455
76   0.02850366  1.27603320 116.02558  -0.54286709
77   1.53234003  2.60783778  65.03518  -0.68559326
78   0.70431437  0.98600834 135.94372  -0.37687914
79  -0.66010390  1.52971053  34.68091   0.46728045
80  -2.90227891 -1.12779128  98.33484   1.96142809
81   0.95481532  1.75755911 132.06442  -0.03928564
82  -0.85726596 -1.93635520  23.83250   0.97281685
83  -1.25263611  1.41506186  57.03911  -0.58640206
84  -1.67570996  0.63753644 113.92043   1.09389000
85  -2.56673323  0.54205661  96.28825   0.21290460
86  -3.34834840 -0.77486321  57.73227  -0.42781676
87  -1.84846847  0.02602445 118.30063   2.66484528
88  -1.22127775  1.08197823 141.45529  -1.64882845
89  -1.13226161 -0.52986841 137.63770   0.71235815
90  -1.45165406 -0.51549346 101.88599  -2.17935417
91  -1.49793961  0.32223301 130.74416 -13.88568154
92  -3.85601086 -1.07592843 133.35599  -1.32144558
93  -0.32798349 -0.69374987  43.67861   0.54207140
94   2.94983214  1.01851815  39.56856   1.26784148
95   2.65986257  0.47093396 139.86007   0.49443276
96   1.29238344 -0.40675114 148.05968  -1.96756916
97   2.33443059  0.16208933  38.21436  -0.13008268
98   1.18832521 -1.79125540 104.21603   0.03749730
99  -0.67501738 -0.62527112 119.44072  -0.82436484
100 -2.05013276 -0.55939052  70.37586  -1.22472512

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>