Skip to contents

This function adds measured data columns that can be functions of unmeasured data columns.

Usage

declare_measurement(..., handler = measurement_handler, label = NULL)

measurement_handler(data, ...)

Arguments

...

arguments to be captured, and later passed to the handler

handler

a tidy-in, tidy-out function

label

a string describing the step

data

A data.frame.

Value

A function that returns a data.frame.

Details

It is also possible to include measured variables in your declare_model call or to add variables using declare_step. However, putting latent variables in declare_model and variables-as-measured in declare_measurement helps communicate which parts of your research design are in M and which parts are in D.

Examples


# declare_measurement in use
## Two-arm randomized experiment
design <-
  declare_model(
    N = 500,
    X = rep(c(0, 1), each = N / 2),
    U = rnorm(N, sd = 0.25),
    potential_outcomes(Y ~ 0.2 * Z + X + U)
  ) +
  declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) +
  declare_sampling(S = complete_rs(N = N, n = 200)) +
  declare_assignment(Z = complete_ra(N = N, m = 100)) +
  declare_measurement(Y = reveal_outcomes(Y ~ Z)) +
  declare_estimator(Y ~ Z, inquiry = "ATE")
  
run_design(design)
#>   inquiry estimand estimator term  estimate  std.error statistic   p.value
#> 1     ATE      0.2 estimator    Z 0.1343672 0.08278017  1.623181 0.1061418
#>      conf.low conf.high  df outcome
#> 1 -0.02887678 0.2976111 198       Y

# Reveal potential outcomes according to treatment assignment
design <-
  declare_model(N = 100,
                potential_outcomes(Y ~ rbinom(
                  N, size = 1, prob = 0.1 * Z + 0.5
                ))) +
  declare_assignment(Z = complete_ra(N, m = 50)) +
  declare_measurement(Y = reveal_outcomes(Y ~ Z))
  
head(draw_data(design))
#>    ID Y_Z_0 Y_Z_1 Z Y
#> 1 001     1     0 0 1
#> 2 002     1     1 0 1
#> 3 003     0     0 0 0
#> 4 004     1     1 1 1
#> 5 005     1     1 0 1
#> 6 006     1     0 0 1

# Generate observed measurement from a latent value
design <- 
  declare_model(N = 100, latent = runif(N)) +
  declare_measurement(observed = rbinom(N, 1, prob = latent))
  
head(draw_data(design))
#>    ID     latent observed
#> 1 001 0.85799465        1
#> 2 002 0.65768689        1
#> 3 003 0.04111667        0
#> 4 004 0.08502660        0
#> 5 005 0.67294424        0
#> 6 006 0.37739894        0

# Index creation
library(psych)

design <-
  declare_model(
    N = 500,
    X = rep(c(0, 1), each = N / 2),
    Y_1 = 0.2 * X + rnorm(N, sd = 0.25),
    Y_2 = 0.3 * X + 0.5 * rnorm(N, sd = 0.50),
    Y_3 = 0.1 * X + 0.4 * rnorm(N, sd = 0.75)) +
  declare_measurement(
    index = fa(
      r = cbind(Y_1, Y_2, Y_3),
      nfactors = 1,
      rotate = "varimax"
    )$scores
  )

draw_data(design)
#>      ID X           Y_1          Y_2           Y_3          MR1
#> 1   001 0 -0.2432641846  0.022031261  0.3338628478 -0.426159570
#> 2   002 0  0.1489107558  0.017082577 -0.1876286329 -0.427686004
#> 3   003 0  0.2347926889 -0.183423370  0.3127436184 -1.138190355
#> 4   004 0 -0.0934134497  0.379648159  0.3717280497  0.783825034
#> 5   005 0  0.3949096222 -0.444719430 -0.0770785600 -2.011565075
#> 6   006 0 -0.0201315515  0.117211641 -0.1201636863 -0.085547075
#> 7   007 0 -0.5973338081  0.212894794  0.1899633847  0.241086878
#> 8   008 0 -0.0269761478 -0.696345090  0.2139565749 -2.869940085
#> 9   009 0  0.0353797438  0.329510636  0.2587229311  0.615292275
#> 10  010 0 -0.1048781306  0.102563417  0.2834044157 -0.153750907
#> 11  011 0  0.0846300701  0.207896370  0.1594165609  0.205299669
#> 12  012 0 -0.3154070644 -0.252194598  0.1420986094 -1.346839453
#> 13  013 0 -0.2177552048  0.210856786  0.2435492791  0.220041588
#> 14  014 0 -0.6315128641 -0.461433297  0.0109882529 -2.042323911
#> 15  015 0  0.1472454940  0.109873512  0.2358991370 -0.133954608
#> 16  016 0  0.0087485309 -0.107978151  0.0414175595 -0.860756981
#> 17  017 0  0.2935792319 -0.175911097  0.2718136272 -1.112272718
#> 18  018 0  0.1549847490  0.060897782 -0.2252405859 -0.276882720
#> 19  019 0 -0.1123285835  0.250603393  0.0371781464  0.362782021
#> 20  020 0 -0.0095894937  0.086326046  0.7062239648 -0.233734651
#> 21  021 0 -0.1683284051  0.148834427  0.0683696971  0.016674711
#> 22  022 0  0.5037635202 -0.867327398 -0.3030993504 -3.440592632
#> 23  023 0 -0.1024661726 -0.154567972  0.3265619601 -1.030682867
#> 24  024 0  0.5202312761  0.108766578 -0.3327058337 -0.119399321
#> 25  025 0 -0.0195100735  0.391454722 -0.0152032563  0.841824924
#> 26  026 0 -0.5945966907  0.016738913 -0.3520235515 -0.398131411
#> 27  027 0  0.2759267899 -0.249137440  0.0276357294 -1.348171243
#> 28  028 0 -0.2697786530  0.139347660  0.0459415162 -0.011402205
#> 29  029 0  0.0136957799  0.378076904  0.2049357836  0.783923237
#> 30  030 0 -0.1404540513  0.011149694  0.5677756536 -0.478362820
#> 31  031 0  0.1363860535 -0.169846845 -0.2094408925 -1.062016021
#> 32  032 0 -0.2685274187  0.219661655 -0.5179873106  0.290963814
#> 33  033 0 -0.2515770632 -0.085126810 -0.2760843019 -0.758803622
#> 34  034 0  0.4417453270 -0.208338061 -0.2079909242 -1.202137767
#> 35  035 0 -0.1913080888 -0.233411772 -0.0789359470 -1.275204568
#> 36  036 0  0.0708053726  0.769350651  0.4164150782  2.102165142
#> 37  037 0 -0.0317078241 -0.115268338  0.0700673459 -0.885830404
#> 38  038 0  0.0083360888  0.262782079  0.2526761353  0.389438302
#> 39  039 0 -0.2202999595 -0.010630455 -0.0523811539 -0.517931286
#> 40  040 0 -0.0796833786  0.303205095 -0.4387286919  0.565387417
#> 41  041 0  0.0738873065 -0.081507480  0.0960110202 -0.775491912
#> 42  042 0 -0.1984017761  0.392411810 -0.4403904041  0.872452897
#> 43  043 0  0.5170559792 -0.184617408  0.0678544250 -1.137993990
#> 44  044 0 -0.0311323812 -0.400396076  0.0678277977 -1.855584074
#> 45  045 0 -0.0132521365  0.265555088 -0.1085810783  0.418232650
#> 46  046 0  0.0606858607 -0.295939907 -0.0353787955 -1.497674893
#> 47  047 0  0.0698126733  0.132669764  0.0403500626 -0.043969567
#> 48  048 0 -0.0955417446  0.428606007  0.0760894958  0.965734571
#> 49  049 0 -0.0723655633  0.103399594  0.3172202074 -0.153629767
#> 50  050 0  0.1454499684  0.021187540 -0.1457777170 -0.415788107
#> 51  051 0 -0.0729511621  0.303833496  0.3474835171  0.526588985
#> 52  052 0  0.7710605845  0.199838046  0.0776134676  0.161626577
#> 53  053 0  0.0905161753 -0.116516419 -0.5276775939 -0.862756047
#> 54  054 0 -0.4725337905 -0.042623817 -0.3461426281 -0.604002059
#> 55  055 0 -0.2683945086  0.475666954 -0.1056303751  1.140388516
#> 56  056 0 -0.0811096778  0.222048158 -0.2085385685  0.277450896
#> 57  057 0 -0.1132267930 -0.130678565 -0.1472371565 -0.924554211
#> 58  058 0 -0.2871366947  0.200083763  0.4707912529  0.173695945
#> 59  059 0 -0.2240969970 -0.569352650 -0.1054157075 -2.415545041
#> 60  060 0  0.0212834894  0.199347355  0.3574364171  0.167852714
#> 61  061 0  0.4173543910  0.614421734 -0.0434261600  1.588654431
#> 62  062 0  0.0696536978  0.134068455  0.1262643304 -0.043658569
#> 63  063 0  0.5140058055 -0.165547162 -0.4510057450 -1.046153150
#> 64  064 0  0.2874584130  0.241336774  0.2433525065  0.308639457
#> 65  065 0 -0.6164292389  0.011791750  0.1054996743 -0.438011930
#> 66  066 0 -0.0474594339 -0.540941264 -0.6653118852 -2.295171144
#> 67  067 0 -0.0851273648  0.016414623 -0.5851532047 -0.402371766
#> 68  068 0 -0.0997664663 -0.157135308 -0.0844976968 -1.018198585
#> 69  069 0 -0.0983699426 -0.304792004  0.7131326498 -1.561816071
#> 70  070 0 -0.2942987228 -0.168517558 -0.0707559913 -1.051816899
#> 71  071 0 -0.2342953794 -0.045385099  0.1242561241 -0.644881901
#> 72  072 0 -0.5123561370  0.069302252  0.2964247804 -0.255392295
#> 73  073 0 -0.2426594185  0.453790120 -0.2066297880  1.070439506
#> 74  074 0 -0.0690292650 -0.177225841  0.0275570683 -1.093259605
#> 75  075 0 -0.6387459809  0.345692036  0.4345831137  0.681354999
#> 76  076 0  0.2763092782  0.028714059 -0.1068702001 -0.396111077
#> 77  077 0  0.0489900471  0.093693706  0.5239981823 -0.200981976
#> 78  078 0 -0.1192567524 -0.235080531  0.1854386242 -1.296730371
#> 79  079 0  0.2255709237 -0.183730652 -0.0615159649 -1.119569187
#> 80  080 0 -0.2884415655 -0.012879349  0.4095408200 -0.547478547
#> 81  081 0 -0.6453887094  0.247168315  0.3375409542  0.351456137
#> 82  082 0  0.2600110357  0.073200568 -0.1804908717 -0.240490526
#> 83  083 0  0.3949402890 -0.420532787 -0.1511829025 -1.925456471
#> 84  084 0  0.1286301468 -0.381277600 -0.2503943635 -1.778837197
#> 85  085 0  0.1353611952  0.023974553  0.0367585946 -0.415464341
#> 86  086 0  0.0897180621 -0.045632180 -0.7209797190 -0.611606553
#> 87  087 0  0.2287571752 -0.374234328 -0.6660429977 -1.736334804
#> 88  088 0 -0.1332201734 -0.045494798  0.0552149433 -0.644696678
#> 89  089 0  0.2224241195 -0.202808719 -0.5667552870 -1.158191399
#> 90  090 0 -0.1559644002 -0.196531754 -0.0514437638 -1.152238418
#> 91  091 0  0.1840198955 -0.426234333 -0.2369293494 -1.934107970
#> 92  092 0  0.2512064258 -0.043170352 -0.1568731358 -0.637283049
#> 93  093 0 -0.1641797320  0.037187748  0.1171273978 -0.365737873
#> 94  094 0  0.1907086883  0.302498320  0.1035237761  0.526812744
#> 95  095 0 -0.0670205117 -0.146414806 -0.0415227071 -0.984937760
#> 96  096 0 -0.1218226072 -0.417609555 -0.1977882719 -1.897664573
#> 97  097 0 -0.2680359686  0.031977751  0.2407701514 -0.386763794
#> 98  098 0 -0.1142622085 -0.045346195  0.4771787999 -0.666620008
#> 99  099 0  0.2951934220 -0.063142496  0.0820890862 -0.718912366
#> 100 100 0 -0.4823802482 -0.304824429  0.0227840180 -1.514689289
#> 101 101 0  0.2607981818  0.138236842 -0.2852521843 -0.013867472
#> 102 102 0 -0.3572808209 -0.111722109  0.0654732976 -0.863806256
#> 103 103 0 -0.0731736238  0.387690677  0.1419009314  0.822484588
#> 104 104 0  0.0836641757 -0.355477268  0.0629604086 -1.705970633
#> 105 105 0  0.2056274841 -0.092421816 -0.5811465577 -0.781466729
#> 106 106 0 -0.2317792220 -0.111207278 -0.0540676430 -0.859609778
#> 107 107 0  0.4236045535 -0.062396334  0.2141005548 -0.727049232
#> 108 108 0  0.0812596502 -0.144754781 -0.1834958583 -0.976364014
#> 109 109 0 -0.2755698120  0.039448330  0.1460251507 -0.356218977
#> 110 110 0 -0.0409975046 -0.463817583 -0.2294889317 -2.055611153
#> 111 111 0 -0.0220115249  0.377600807  0.1346015336  0.787014390
#> 112 112 0  0.1844273021 -0.083722843 -0.2669583961 -0.767522849
#> 113 113 0 -0.3781345036  0.002755259  0.2424905931 -0.482964005
#> 114 114 0 -0.0533830958 -0.304191991  0.2350916237 -1.536350720
#> 115 115 0  0.1087758491  0.207899344 -0.1897824368  0.222681163
#> 116 116 0 -0.0470473274 -0.345699811  0.2871595080 -1.680425130
#> 117 117 0  0.1202415211  0.278454646  0.5877737710  0.422043870
#> 118 118 0 -0.1441681760 -0.186076572 -0.2531701849 -1.106576026
#> 119 119 0 -0.0140115743  0.161866732  0.0753204366  0.056034622
#> 120 120 0  0.1181808960 -0.032746717  0.0693756742 -0.609576679
#> 121 121 0  0.2043206229  0.401634765  0.5415188759  0.840922332
#> 122 122 0 -0.1774226090  0.571524634  0.2294509771  1.446367134
#> 123 123 0 -0.0904940733 -0.125807932  0.0121260527 -0.916922714
#> 124 124 0  0.2091946119  0.383946059  0.3058262488  0.792820808
#> 125 125 0  0.1037604494  0.249149256  0.1880949257  0.343562760
#> 126 126 0  0.2376159216 -0.426018073  0.1810748767 -1.956630534
#> 127 127 0 -0.3898660249  0.250191139  0.2626834781  0.357985067
#> 128 128 0 -0.0233386256  0.167798484 -0.3821198093  0.100190519
#> 129 129 0 -0.3691236231 -0.108322267  0.0673425697 -0.851984951
#> 130 130 0  0.2716136333  0.314981399  0.5252857084  0.545005044
#> 131 131 0 -0.1901646538  0.052567041 -0.0008245592 -0.306538370
#> 132 132 0  0.5093533894  0.427280977  0.0630824538  0.943835307
#> 133 133 0  0.1797906466  0.076680549 -0.1864558320 -0.225948526
#> 134 134 0 -0.0286613594  0.125003024  0.1146778371 -0.070957683
#> 135 135 0  0.0161415053  0.172566250 -0.4990294025  0.121286042
#> 136 136 0 -0.0200841842 -0.240679495  0.2272998849 -1.320905896
#> 137 137 0 -0.2413515702 -0.313661328  0.2154885301 -1.561930717
#> 138 138 0 -0.3318736259 -0.457855454  0.3560732682 -2.056982564
#> 139 139 0 -0.4739405084  0.213149997 -0.0532274436  0.250869695
#> 140 140 0  0.1480106082 -0.332057806  0.2318806105 -1.636983930
#> 141 141 0  0.2429479877 -0.044078496 -0.0675368388 -0.644754067
#> 142 142 0 -0.4760243389  0.107913985 -0.1890875327 -0.099985745
#> 143 143 0 -0.1278134026 -0.122933788 -0.3048457485 -0.889609021
#> 144 144 0  0.2613777644  0.228972505 -0.0823365645  0.284236193
#> 145 145 0 -0.5184815250 -0.292921090  0.2325449489 -1.483990288
#> 146 146 0  0.0607670058 -0.017567445 -0.2870004174 -0.537765750
#> 147 147 0 -0.3142871302  0.061471980 -0.2528280492 -0.259484720
#> 148 148 0 -0.3784020578 -0.094234634 -0.0390891155 -0.798274834
#> 149 149 0  0.5259169721  0.281405852 -0.1807915290  0.459786704
#> 150 150 0 -0.0541422351 -0.083099876  0.0050217808 -0.772370305
#> 151 151 0 -0.0466024832 -0.109702459  0.1921678898 -0.872779613
#> 152 152 0 -0.0963853294  0.237731550 -0.4579318412  0.344175104
#> 153 153 0 -0.2718316041 -0.146723336 -0.1888939683 -0.972234687
#> 154 154 0  0.2379167542  0.054758764 -0.1090647400 -0.306260525
#> 155 155 0 -0.0617328124  0.200979072 -0.1166123589  0.200443543
#> 156 156 0 -0.0413231673 -0.014589069 -0.4977584557 -0.513666128
#> 157 157 0 -0.0563923906 -0.317197986 -0.0644815745 -1.564978960
#> 158 158 0 -0.3185076449 -0.170623388 -0.0296824265 -1.060384857
#> 159 159 0 -0.1082837103 -0.416218160 -0.0773302895 -1.899577260
#> 160 160 0 -0.3358075756  0.527442148 -0.0474801269  1.315500659
#> 161 161 0  0.0835596907  0.153317829 -0.3926599625  0.048288466
#> 162 162 0 -0.2102432394 -0.014573333  0.1393730537 -0.541578289
#> 163 163 0 -0.4010660809 -0.587136300 -0.1699604193 -2.467405921
#> 164 164 0 -0.0539029905  0.187902267 -0.2670973636  0.163526233
#> 165 165 0 -0.2553365922  0.309373565 -0.3065501887  0.584767050
#> 166 166 0  0.4228436633  0.280195984  0.6358522900  0.416438267
#> 167 167 0 -0.0326226631 -0.167671531  0.0378559497 -1.062381879
#> 168 168 0 -0.3095759618  0.187638637 -0.2230462598  0.167983220
#> 169 169 0  0.4013729592 -0.099002987  0.2448520212 -0.852494843
#> 170 170 0  0.3461798111  0.082135945  0.3651116432 -0.240939197
#> 171 171 0  0.1168837322  0.176969583 -0.3613905204  0.126123730
#> 172 172 0  0.0248471635 -0.124311299  0.4983247974 -0.940467505
#> 173 173 0  0.0716114127 -0.089219502 -0.1757609742 -0.787575209
#> 174 174 0 -0.1875101601  0.013692036  0.2378760715 -0.451217126
#> 175 175 0 -0.0630743470 -0.491682717  0.3021436791 -2.177278812
#> 176 176 0 -0.3100002065  0.055661165  0.1469937224 -0.300093424
#> 177 177 0  0.0317536188 -0.185455400 -0.2232815498 -1.111265884
#> 178 178 0 -0.5431924308 -0.285405515 -0.0272845020 -1.444226123
#> 179 179 0 -0.5595913602  0.202391762  0.1562062325  0.205982935
#> 180 180 0 -0.0636263437 -0.146589107  0.3816170322 -1.007555522
#> 181 181 0  0.0185278985 -0.120917914  0.3912404906 -0.923188084
#> 182 182 0 -0.1696928832 -0.114192250 -0.3290685947 -0.857369149
#> 183 183 0  0.0832050300  0.129764596 -0.1642270131 -0.043651935
#> 184 184 0  0.1546306927  0.279416462 -0.0400549943  0.456817129
#> 185 185 0  0.1029862366  0.390808427 -0.1265559880  0.841737383
#> 186 186 0 -0.0821388772 -0.401375183  0.3729959031 -1.873202307
#> 187 187 0  0.0445414149 -0.003285305 -0.3733273364 -0.484228195
#> 188 188 0  0.0603081560 -0.340085039 -0.2989459765 -1.634165996
#> 189 189 0  0.1857185107 -0.101877820  0.3534083961 -0.861457110
#> 190 190 0  0.2910911086  0.002579157  0.1332933359 -0.497892796
#> 191 191 0  0.2136166741  0.114040863 -0.2215556755 -0.098060352
#> 192 192 0  0.0575021742 -0.071602702 -0.0619650122 -0.733126796
#> 193 193 0 -0.0543361452 -0.058561466  0.1270959793 -0.695222777
#> 194 194 0 -0.2661579486  0.176601464 -0.0068203284  0.117940903
#> 195 195 0  0.1779116866 -0.114013636  0.8954267688 -0.930586315
#> 196 196 0 -0.2538252029  0.084005901 -0.5233933832 -0.170623728
#> 197 197 0  0.1422292940 -0.519543040 -0.3178724231 -2.246052511
#> 198 198 0  0.4591911270  0.520897966 -0.2344292550  1.279183086
#> 199 199 0  0.2038105628 -0.110650255 -0.1117148939 -0.867737859
#> 200 200 0  0.0219724039  0.142213669 -0.1340709228 -0.001040454
#> 201 201 0  0.2726744950 -0.383882452 -0.4902696970 -1.779571317
#> 202 202 0 -0.0974905084  0.038404953  0.6333590430 -0.390336111
#> 203 203 0 -0.0355597159  0.048883963 -0.1270976692 -0.317141351
#> 204 204 0  0.3225628545 -0.204216893  0.7415683668 -1.233758287
#> 205 205 0  0.2949746842 -0.258727337 -0.1205413989 -1.373682571
#> 206 206 0 -0.3271238540 -0.254794621 -0.1738809548 -1.338962024
#> 207 207 0  0.3136961986  0.162641789  0.3405360995  0.035142223
#> 208 208 0 -0.0354329910 -0.075181136  0.6116029876 -0.777421644
#> 209 209 0  0.4180261846  0.006968354 -0.0709555654 -0.476171758
#> 210 210 0 -0.2831444641  0.096774614 -0.2519445066 -0.140379889
#> 211 211 0 -0.4138448975  0.185700013 -0.5848785507  0.183250288
#> 212 212 0 -0.2152984839 -0.186693783 -0.0390143130 -1.117646772
#> 213 213 0 -0.3685816100  0.285010395  0.1257759217  0.482879304
#> 214 214 0  0.0623505553 -0.402785710 -0.0168621766 -1.862116431
#> 215 215 0 -0.0882554143  0.313268163  0.1075779870  0.571567649
#> 216 216 0  0.2669185908 -0.115698536 -0.0002343905 -0.892570211
#> 217 217 0 -0.1456739816 -0.388566674 -0.1696310703 -1.799622689
#> 218 218 0  0.5216697290  0.311713435  0.1164035729  0.547605663
#> 219 219 0  0.0994954072  0.009722920  0.4994346505 -0.486841557
#> 220 220 0 -0.6886046772 -0.405339164 -0.1794730577 -1.839948357
#> 221 221 0  0.1543226964  0.257739696 -0.6584671717  0.415134401
#> 222 222 0  0.0609892148  0.114604572  0.1017218857 -0.108333957
#> 223 223 0  0.1029010253  0.109160220 -0.0067478224 -0.122484524
#> 224 224 0  0.0357271852  0.229890228  0.7034329324  0.253385292
#> 225 225 0 -0.1939283996 -0.052977087 -0.1699763380 -0.656666789
#> 226 226 0  0.0016104320 -0.095257841 -0.3164796194 -0.798732881
#> 227 227 0 -0.0346081293  0.090877026 -0.4498953850 -0.157607128
#> 228 228 0 -0.2797764064  0.345342832 -0.1916749124  0.701893385
#> 229 229 0 -0.2287553633 -0.405187428  0.4618547939 -1.886394517
#> 230 230 0  0.4448788100  0.363815441 -0.2278413841  0.744958236
#> 231 231 0 -0.7275336202 -0.106429877  0.2890671390 -0.846331465
#> 232 232 0  0.0413238623 -0.098324624  0.3868529004 -0.846791269
#> 233 233 0 -0.3722740619  0.117650625 -0.4215426794 -0.057921698
#> 234 234 0 -0.3085991657 -0.503622169  0.4610580821 -2.218791075
#> 235 235 0  0.0894068353  0.313009582 -0.1486247503  0.578656187
#> 236 236 0 -0.0234636258 -0.055697163 -0.5479247177 -0.651428153
#> 237 237 0  0.1923076109 -0.256029470 -0.2549892659 -1.354473606
#> 238 238 0 -0.5166391076 -0.255216279  0.0172086426 -1.344636754
#> 239 239 0  0.5352492092  0.113003812  0.3848102899 -0.142610643
#> 240 240 0  0.2435816158  0.417943396  0.1215197578  0.916983798
#> 241 241 0  0.1331844526 -0.074915946 -0.0618418389 -0.746663436
#> 242 242 0  0.0130989674  0.009400854 -0.1008362061 -0.454255746
#> 243 243 0 -0.0021818839  0.317690232 -0.0915512285  0.594355636
#> 244 244 0 -0.0296685680 -0.078462079  0.5563983784 -0.785893594
#> 245 245 0  0.0106386042  0.578209714 -0.1924819266  1.485350456
#> 246 246 0  0.1096071781 -0.314863601  0.2326459069 -1.577391085
#> 247 247 0 -0.0444065053 -0.085133521 -0.0777473374 -0.775290058
#> 248 248 0 -0.1974911023  0.262673304 -0.1986924585  0.418601748
#> 249 249 0 -0.0996352647 -0.324126044  0.1829995484 -1.600075375
#> 250 250 0 -0.0165747043 -0.082968035 -0.5350340787 -0.745062749
#> 251 251 1  0.4201774907  0.242278373  0.0306896264  0.318896802
#> 252 252 1  0.3343056543  0.570017547  0.5475292150  1.409477153
#> 253 253 1 -0.1985105110  0.165349091 -0.2682642035  0.091191738
#> 254 254 1  0.2389177794 -0.060729445 -0.2975623719 -0.689353377
#> 255 255 1  0.0372200717  0.599885747  0.0724151132  1.544562148
#> 256 256 1  0.7359494612  0.082074378  0.2235004486 -0.245452600
#> 257 257 1 -0.0145494605 -0.330673651  0.6474606469 -1.648952494
#> 258 258 1  0.1882297186  0.421415280  0.4184715386  0.915060944
#> 259 259 1 -0.2432286330  0.416909902  0.3262437458  0.917400688
#> 260 260 1  0.1247823357  0.469559604 -0.2492091338  1.115310764
#> 261 261 1 -0.0139885114  0.236660127 -0.1095342165  0.320018779
#> 262 262 1  0.2621205850 -0.244360952 -0.2560570980 -1.316813277
#> 263 263 1  0.1255820513  0.959444701  0.4414202406  2.745832184
#> 264 264 1  0.3288863037  0.424776313  0.2063982066  0.933280297
#> 265 265 1  0.3789390714  0.489296580 -0.2640233242  1.175622190
#> 266 266 1 -0.0392076895  0.224700103  0.0237520403  0.273184601
#> 267 267 1  0.6312483020  0.348409946 -0.5797705464  0.705224724
#> 268 268 1  0.0660616345  0.542392563  0.1956799914  1.341753054
#> 269 269 1  0.4241095144 -0.100005963  0.3280897526 -0.860898170
#> 270 270 1  0.3990294554  0.228193407 -0.4626923056  0.297181742
#> 271 271 1  0.7726749484  0.336523528  0.1412480070  0.623212479
#> 272 272 1 -0.4023128488  0.453599713  0.1289250496  1.057174536
#> 273 273 1  0.3589985600  0.630769934 -0.3783849123  1.663359900
#> 274 274 1  0.9087049395  0.035368783 -0.0576954431 -0.394910555
#> 275 275 1 -0.2654573333  0.562849223  0.2205457730  1.419948701
#> 276 276 1 -0.0003217162  0.070000423  0.2268898384 -0.264707484
#> 277 277 1 -0.1016828234 -0.002065021 -0.0351279017 -0.493232850
#> 278 278 1 -0.0177666483  0.250130255  0.1042082842  0.354875487
#> 279 279 1  0.3813421023  0.530807467 -0.2482997789  1.315933661
#> 280 280 1  0.2753524703 -0.278595058  0.2181986407 -1.458226549
#> 281 281 1  0.7710111142  0.640319403  0.0557213595  1.661045000
#> 282 282 1  0.3109186663  0.518991623  0.2447360419  1.252300831
#> 283 283 1  0.6041032240  0.104599009  0.3088082963 -0.169317952
#> 284 284 1  0.0090904675 -0.063303213 -0.0578337814 -0.703664515
#> 285 285 1 -0.2232560664  0.475745841  0.0262292919  1.132476868
#> 286 286 1  0.3460211433  0.312279939 -0.2613471701  0.574350463
#> 287 287 1 -0.0630659419  0.509890286 -0.3267772855  1.262123540
#> 288 288 1  0.2798693603  0.583101536 -0.2537170231  1.497121514
#> 289 289 1 -0.1415327043  0.360590109  0.5729190405  0.710012855
#> 290 290 1 -0.0974734079  0.185295748  0.0082087026  0.141697517
#> 291 291 1  0.3650202852  0.353219758 -0.0926970685  0.704300441
#> 292 292 1 -0.0339300414  0.086266474  0.1624167167 -0.205034835
#> 293 293 1 -0.2940944272  0.469208789  0.4662961011  1.089556471
#> 294 294 1  0.2061629611  0.287099577  0.3882817042  0.459219124
#> 295 295 1  0.3366545823 -0.372237665  0.2060753546 -1.777951519
#> 296 296 1  0.2083673305  0.133933680 -0.3206191663 -0.025106186
#> 297 297 1 -0.0027241830  0.684089825  0.3386765880  1.818377103
#> 298 298 1  0.1727873756  0.458257116  0.4637772173  1.038491078
#> 299 299 1 -0.2409965704  0.600465653  0.3470468898  1.540614962
#> 300 300 1 -0.0976269650  0.027064135 -0.1932949397 -0.386077254
#> 301 301 1  0.0390114096  0.236320893 -0.2830607261  0.326272631
#> 302 302 1  0.4432234342  0.196766755  0.3451192624  0.147111166
#> 303 303 1  0.4111708887  0.801599022 -0.0286227109  2.224749442
#> 304 304 1  0.0279832805  0.207528839  0.1195961954  0.207804524
#> 305 305 1  0.3615268692  0.094267730 -0.0623271973 -0.177985442
#> 306 306 1  0.0783273786  0.281530988  0.1353693210  0.457199536
#> 307 307 1  0.4026038233  0.572296593 -0.0622696292  1.446784023
#> 308 308 1 -0.1118072509  0.267127116  0.4392224274  0.398140820
#> 309 309 1  0.1387051348  0.580560418  0.4915772349  1.454079247
#> 310 310 1  0.3965315057  0.152383920  0.3256355047 -0.001451559
#> 311 311 1  0.0603442416  0.362299414  0.0155043584  0.738678130
#> 312 312 1 -0.0460863716  0.414734813  0.1789907737  0.911743634
#> 313 313 1  0.4118550747  0.572326714 -0.2117142107  1.454353126
#> 314 314 1  0.2374834506  0.182190239 -0.3215935511  0.138217780
#> 315 315 1  0.2805748345  0.518644754  0.0403783369  1.262615315
#> 316 316 1  0.5508471595  0.087419409  0.1646390148 -0.218693588
#> 317 317 1 -0.0891805832  0.193059953  0.0426195287  0.166076648
#> 318 318 1  0.6048424813  0.377850528 -0.1431917124  0.783534725
#> 319 319 1  0.1912411693  0.363225207  0.4715147388  0.714291156
#> 320 320 1  0.4622344464  0.053305003  0.2236980579 -0.335145988
#> 321 321 1  0.3727242531  0.604174510 -0.3054482222  1.568707547
#> 322 322 1 -0.0992718913  0.817239229  0.1319326884  2.284875636
#> 323 323 1  0.3433037026  0.074644857  0.4852894563 -0.272560580
#> 324 324 1 -0.0972831528  0.206181510  0.2225026495  0.201631165
#> 325 325 1  0.4478772560  0.143237819  0.1922167795 -0.027182613
#> 326 326 1  0.1235976523  0.445468021  0.0378053526  1.018528772
#> 327 327 1  0.0003496112  0.585177642  0.4232494186  1.477456952
#> 328 328 1 -0.0080449824  0.179945159 -0.1399563152  0.128503403
#> 329 329 1  0.0626727321  0.388722629  0.7741996191  0.789177122
#> 330 330 1  0.1003763144  0.195727964  0.4750736428  0.147084282
#> 331 331 1  0.3266331109  0.531699162 -0.1737474130  1.316738027
#> 332 332 1  0.3817990712  0.506917611  0.0719248497  1.218068137
#> 333 333 1  0.1860540013  0.155282378  0.1331587123  0.024666202
#> 334 334 1  0.6086558536  0.330832814 -0.0694392532  0.619670415
#> 335 335 1  0.6919354175  0.048982862 -0.4397968746 -0.322331304
#> 336 336 1 -0.4769046654 -0.146526720  0.2132373138 -0.986276109
#> 337 337 1  0.6731658800 -0.032811039 -0.0836898296 -0.618440402
#> 338 338 1  0.0703343795  0.300079548 -0.0951232604  0.532472741
#> 339 339 1  0.0967898079  0.259124648  0.1771159645  0.378270752
#> 340 340 1  0.0375614845  0.633682643 -0.5514187028  1.691832742
#> 341 341 1  0.6599826797  0.316878435 -0.3173988846  0.583519268
#> 342 342 1  0.2103504295  0.531899545  0.3258826122  1.295005999
#> 343 343 1 -0.2686018991  0.362807802 -0.2488391325  0.763927921
#> 344 344 1 -0.3012662703  0.381031778  0.5460429640  0.785707695
#> 345 345 1 -0.1142656977  0.349609859  0.4403225407  0.678719555
#> 346 346 1  0.4281144828  0.106569938  0.1453920256 -0.148890881
#> 347 347 1  0.4901700052  0.534872060 -0.1993996984  1.323975335
#> 348 348 1  0.3104715105  0.389977397 -0.2235719868  0.837740336
#> 349 349 1 -0.1760194576  0.624224771  0.4671396385  1.613267981
#> 350 350 1  0.2041638817  0.294495360 -0.2312831379  0.516535933
#> 351 351 1  0.0514881994 -0.173449547  0.1922582277 -1.092547524
#> 352 352 1  0.2502525492  0.451444833  0.3928257204  1.016681808
#> 353 353 1  0.1422380295  0.099393801  0.5525144701 -0.185855761
#> 354 354 1  0.1473963537  0.465451134 -0.0475010684  1.090209734
#> 355 355 1 -0.1977522075  0.039393753  0.2042799503 -0.361747031
#> 356 356 1  0.3803168801  0.417552774 -0.1894386459  0.927682523
#> 357 357 1  0.7868657599  0.103969618  0.0266922174 -0.162300434
#> 358 358 1  0.1906957108 -0.046949029 -0.0372848877 -0.654524893
#> 359 359 1 -0.0205748134  0.339498224 -0.1151739211  0.670308056
#> 360 360 1  0.4223998465  0.257569657  0.3421828523  0.354704283
#> 361 361 1  0.0955086388  0.075757217  0.5077930079 -0.262542081
#> 362 362 1  0.3505240336  0.175152491  0.2497918798  0.081298635
#> 363 363 1  0.1491318094  0.562197651  0.1662815431  1.408161560
#> 364 364 1  0.6387360644 -0.166008540 -0.1645705402 -1.066288418
#> 365 365 1  0.2189349747  0.466940971  0.1828196416  1.081207490
#> 366 366 1  0.1575158960  0.282612221  0.0652252395  0.462146499
#> 367 367 1  0.1243366872  0.791638440 -0.0139910422  2.198677512
#> 368 368 1 -0.3282974430  0.600612350 -0.0127526122  1.562363082
#> 369 369 1  0.6281564638 -0.074542581  0.2002497383 -0.773755916
#> 370 370 1  0.2004401036 -0.368462267 -0.0774005370 -1.746354057
#> 371 371 1 -0.1012565896  0.368730828  0.3401512237  0.748560385
#> 372 372 1  0.3217257813  0.453256608  0.3257819959  1.024183480
#> 373 373 1  0.1837079572  0.508504741  0.1502508178  1.225324821
#> 374 374 1 -0.4223512102  0.100070148 -0.0945398544 -0.133167985
#> 375 375 1 -0.1137105388  0.274889966 -0.0110503942  0.447932059
#> 376 376 1  0.0413736159  0.343226884 -0.4038852896  0.696099357
#> 377 377 1  0.1482958744  0.346670592 -0.1980571382  0.693955346
#> 378 378 1  0.3518909718  0.595235957  0.0545953373  1.520271174
#> 379 379 1 -0.2994535334  0.149731908  0.3965630278  0.006639523
#> 380 380 1  0.1962777886  0.268518331  0.2586191881  0.403028881
#> 381 381 1  0.1001780876  0.542195559 -0.2257938976  1.361901211
#> 382 382 1 -0.0310673514 -0.036334059  0.6185636561 -0.645775633
#> 383 383 1  0.2775479520  0.130810305  0.4800833622 -0.079282042
#> 384 384 1  0.2615816068  0.294797508  0.1723659035  0.494935142
#> 385 385 1 -0.1287841927  0.466299593  0.7341689393  1.060844795
#> 386 386 1  0.5646390663  0.372785291 -0.3172207885  0.776522937
#> 387 387 1 -0.3333586912  0.398953828 -0.3272282536  0.892872949
#> 388 388 1 -0.1186823752 -0.066043597  0.3608129240 -0.730860423
#> 389 389 1  0.3246531168  0.504502924  0.6322063588  1.182532380
#> 390 390 1  0.0298898133 -0.143262335 -0.0606279580 -0.976119242
#> 391 391 1 -0.1960609602  0.323418797  0.0726712321  0.611123042
#> 392 392 1 -0.0314770779  0.091469643  0.2265001311 -0.190729951
#> 393 393 1  0.2280969404  0.344225670 -0.1017006521  0.678263267
#> 394 394 1  0.1487889617  0.151439911 -0.0054834760  0.019892417
#> 395 395 1  0.6762736518  0.134104147 -0.2517278356 -0.042070463
#> 396 396 1  0.2063878807 -0.047136634 -0.3065433103 -0.641681008
#> 397 397 1  0.3325303798  0.548997067  0.1993696322  1.356068386
#> 398 398 1 -0.0234015714  0.049897129  0.4264722430 -0.342739520
#> 399 399 1  0.2968671962  0.237446944  0.1524553697  0.299836842
#> 400 400 1 -0.2166274973  0.322411957  0.0699198760  0.608455115
#> 401 401 1  0.2491490254  0.136772313 -0.1154005150 -0.027301368
#> 402 402 1 -0.2349305296  0.420376573  0.4248382480  0.923836286
#> 403 403 1  0.6454583796  0.031917337 -0.3215968677 -0.385115132
#> 404 404 1  0.2607196341  0.265642750 -0.3824956631  0.424540165
#> 405 405 1  0.4293251358  0.571329491  0.3534255366  1.421158587
#> 406 406 1  0.3909866944  0.388715784  0.0725303098  0.815702782
#> 407 407 1 -0.1912289438  0.346350415 -0.1863051689  0.702397824
#> 408 408 1  0.2052609533  0.265240303  0.3280141856  0.388015022
#> 409 409 1  0.1267292495  0.833230046  0.2242133261  2.327736791
#> 410 410 1  0.5577430810  0.363326047  0.2685400292  0.714204436
#> 411 411 1  0.5294065014  0.179803848  0.4562467464  0.081080729
#> 412 412 1 -0.0410532353  0.602972844 -0.2026822047  1.571653769
#> 413 413 1  0.2343103539  0.435976045  0.3028554535  0.969202875
#> 414 414 1  0.2231317330  0.269721836  0.4998460938  0.393822199
#> 415 415 1  0.2119122973  0.619117235 -0.2080666022  1.619292140
#> 416 416 1  0.2676529479 -0.151151421  0.2058661648 -1.023862334
#> 417 417 1  0.1250750273  0.589582707  0.2250506406  1.498984495
#> 418 418 1  0.0061314729 -0.081150178  0.0237981213 -0.768511471
#> 419 419 1 -0.2799802731  0.316580136  0.1650665086  0.585580808
#> 420 420 1 -0.0134770500  0.436672266  0.3233289261  0.977910845
#> 421 421 1  0.4888972006  0.396998651 -0.2598097911  0.858171475
#> 422 422 1  0.1301173457  0.343278808  0.0455504370  0.670339558
#> 423 423 1  0.4477274636  0.176044867  0.0107872134  0.093814083
#> 424 424 1  0.0344819841  0.297322038  0.7663977384  0.479527240
#> 425 425 1 -0.1076721478  0.051418573  0.0838782701 -0.317297192
#> 426 426 1  0.2161145425  0.287793828 -0.2670999862  0.495239696
#> 427 427 1 -0.0803189813  0.040296584  0.3571191968 -0.370102241
#> 428 428 1  0.4969035399  0.480235949  0.2036910266  1.117046573
#> 429 429 1  0.1525429690 -0.013843070  0.4623474305 -0.566663292
#> 430 430 1 -0.0776768124 -0.097744141  0.3097232770 -0.837266431
#> 431 431 1  0.2125311136  0.080371739  0.1093513615 -0.229697130
#> 432 432 1  0.1468083721  0.520260507  0.2590508689  1.260776633
#> 433 433 1  0.1622768538  0.631328838 -0.0676076477  1.655034550
#> 434 434 1  0.1215887815  0.312204501 -0.0072584988  0.567632167
#> 435 435 1  0.3330823425 -0.045402590 -0.3433114361 -0.637661630
#> 436 436 1  0.1416324821  0.198440923 -0.1223503565  0.186033585
#> 437 437 1 -0.1695852991 -0.300612539 -0.1240708395 -1.502096019
#> 438 438 1  0.4466413670  0.487371917 -0.1790392666  1.162650326
#> 439 439 1  0.4373319525  0.347237943  0.3116587877  0.660843504
#> 440 440 1  0.5648241546  0.602983195 -0.4415175541  1.565967925
#> 441 441 1 -0.0331606505  0.504240721  0.4010526320  1.204303592
#> 442 442 1  0.1246065682  0.209910208 -0.0916081905  0.223961684
#> 443 443 1  0.3175277787  0.071021366  0.1333256189 -0.265880146
#> 444 444 1  0.0673250707  0.459309535 -0.1853278252  1.078851756
#> 445 445 1 -0.0025885577  0.488968620  0.3277546829  1.155240645
#> 446 446 1  0.4407298100  0.407097778 -0.5599304930  0.909511620
#> 447 447 1  0.0664786681  0.215601241  0.4954406895  0.214639733
#> 448 448 1 -0.3636494463  0.353649884  0.0461956460  0.720330112
#> 449 449 1  0.0397021747  0.164235026  0.5408253324  0.038367534
#> 450 450 1 -0.1080914522  0.382757733  0.2943629070  0.798848931
#> 451 451 1  0.2144645820  0.490143086  0.5098567209  1.143317940
#> 452 452 1  0.4510173893  0.556200330  0.0443327224  1.385063944
#> 453 453 1  0.2894250368  0.452563802  0.6188420672  1.007607750
#> 454 454 1  0.3523487783  0.052422781  0.2735535794 -0.337448018
#> 455 455 1 -0.0257008348  0.764237723  0.7282028078  2.071501802
#> 456 456 1 -0.0547466390  0.875822632  0.1195018313  2.483459376
#> 457 457 1  0.0429866389  0.302616392  0.0219687051  0.535851803
#> 458 458 1  0.3557597099  0.318559578  0.3900215374  0.561671189
#> 459 459 1 -0.0200445810  0.295579054 -0.2747348791  0.529169718
#> 460 460 1  0.4238651781  0.335311550  0.5685769075  0.607367163
#> 461 461 1  0.2925209049  0.355987728  0.2256102273  0.699388921
#> 462 462 1 -0.2290040176  0.332509642 -0.0863990650  0.651270818
#> 463 463 1  0.4109159996  0.199816150  0.2589381000  0.162913672
#> 464 464 1  0.0832235551  0.530836923  0.3067680247  1.296178724
#> 465 465 1  0.1360449267  0.176458592 -0.0153849077  0.105886260
#> 466 466 1 -0.0337444225 -0.238540263  0.3149229135 -1.317761267
#> 467 467 1 -0.2299227832  0.182363274  0.2867358246  0.121247697
#> 468 468 1  0.1087016534  0.076013108  0.5113031467 -0.262247571
#> 469 469 1 -0.0503419853  0.397113327  0.2383024360  0.848858809
#> 470 470 1  0.3373625540  0.514819859 -0.0212931262  1.251104303
#> 471 471 1  0.0837868777  0.817744799  0.3184427238  2.271464612
#> 472 472 1  0.1021840284 -0.279174883  0.6731290641 -1.478597495
#> 473 473 1  0.3448079729  0.134851808  0.2932444851 -0.057863425
#> 474 474 1 -0.0485449516  0.300206546  0.2829754789  0.516865369
#> 475 475 1  0.1298449072  0.445379101  0.0889426862  1.015390225
#> 476 476 1  0.2853609138  0.071288052 -0.3182992485 -0.240612938
#> 477 477 1  0.0876669301  0.403586763  0.2370091924  0.866823139
#> 478 478 1  0.0499438202  0.304133853  0.5338345796  0.514285062
#> 479 479 1  0.0216252407  0.103374614 -0.1077563535 -0.134503236
#> 480 480 1  0.3025331304  0.527459256 -0.0347833864  1.295835975
#> 481 481 1  0.0074845123  0.446439578  0.5560300403  0.998451382
#> 482 482 1  0.0927795067  0.076395728 -0.2910026588 -0.218901884
#> 483 483 1  0.4909810727  0.392907555 -0.2271685452  0.842502316
#> 484 484 1 -0.2378756899  0.171018724  0.3730965545  0.078422634
#> 485 485 1  0.7555187226  0.324538468 -0.1848242969  0.599852393
#> 486 486 1  0.3240247770  0.354547735 -0.0954172735  0.710182843
#> 487 487 1  0.1098398176  0.327731848  0.3156905852  0.604066341
#> 488 488 1  0.0660641826  0.349617778 -0.1525237537  0.704076923
#> 489 489 1  0.0347062807 -0.037198399 -0.8495396436 -0.574615432
#> 490 490 1  0.7486671376  0.195557458 -0.0959580629  0.156728117
#> 491 491 1  0.5892582283  0.550019134  0.1881355228  1.352459393
#> 492 492 1  0.3903510001  0.394928342 -0.3037078947  0.856347051
#> 493 493 1 -0.2501269669  0.413744014 -0.2490886358  0.936646897
#> 494 494 1  0.3297015855  0.177710738  0.3994417719  0.082868733
#> 495 495 1  0.1355836963  0.170377407  0.1575036441  0.076257468
#> 496 496 1  0.5992158146  0.666538911 -0.1660310013  1.766850045
#> 497 497 1  0.2932911317  0.412117811 -0.2571940622  0.915305349
#> 498 498 1  0.3633587945 -0.021891595 -0.0275181186 -0.574955748
#> 499 499 1  0.1518543343  0.331943433  0.1077452390  0.627911042
#> 500 500 1  0.1309996830  0.191635339  0.0546244899  0.154032850