The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

smoothPLS_ScalarFD_02

library(SmoothPLS)
library(ggplot2)

This notebook present a way of performing the SmoothPLS algorithm for a Scalar Functional Data.

It shows that Smooth PLS over perform FPLS with a time vector regul_time without a lot of points, and even with a lot of points.

Parameters

nind = 100 # number of individuals (train set)
start = 0 # First time
end = 100 # end time

lambda_0 = 0.2 # Exponential law parameter for state 0 
lambda_1 = 0.1 # Exponential law parameter for state 1
prob_start = 0.5 # Probability of starting with state 1

curve_type = 'num'

TTRatio = 0.2 # Train Test Ratio means we have floor(nind*TTRatio/(1-TTRatio))
# individuals in the test set
NotS_ratio = 0.2 # noise variance over total variance for Y
beta_0_real=5.4321 # Intercept value for the link between X(t) and Y

nbasis = 10 # number of basis functions
norder = 4 # 4 for cubic splines basis

regul_time = seq(start, end, 5)
regul_time_0 = seq(start, end, 1)

beta_real_func = beta_4_real_func # link between X(t) and Y

int_mode = 2 # in case of integration errors.

Synthetic SFD data

We can also generate synthetic Scalar Functional Data SFD. The important input is type=‘num’.

Generate_X_df

For SFD for X_df two new arguments are important: the noise added to the signal and the seed for repeatability.

df = generate_X_df(nind = nind, start = start,end =  end, curve_type = 'num',
                   noise_sd = 0.15, seed = 123)
head(df)
#>   id time     value
#> 1  1    0 1.2591356
#> 2  1    1 0.7193661
#> 3  1    2 1.0470795
#> 4  1    3 0.7297674
#> 5  1    4 0.6105385
#> 6  1    5 0.5351208
# Visualisation
ggplot(df, aes(x = time, y = value, group = id, color = factor(id))) +
  geom_line(alpha = 0.8) +
  labs(title = "Noised cosinus curves",
       x = "Time", y = "Value",
       color = "Individual") +
  theme_minimal() +
  theme(legend.position = "none")

Data manipulation

regularize_time_series

df_regul = regularize_time_series(df, time_seq = regul_time,
                                     curve_type = 'num')
df_regul
#>       id time         value
#> 1      1    0  1.2591356058
#> 2      1    5  0.5351207804
#> 3      1   10  0.2642695075
#> 4      1   15 -0.6025342230
#> 5      1   20 -1.3168846512
#> 6      1   25 -1.8577736968
#> 7      1   30 -2.0244393652
#> 8      1   35 -2.4807905328
#> 9      1   40 -1.7434094354
#> 10     1   45 -1.4872290083
#> 11     1   50 -0.8271237339
#> 12     1   55 -0.2641780101
#> 13     1   60 -0.0009657591
#> 14     1   65  0.8215195183
#> 15     1   70  1.1315289749
#> 16     1   75  1.5800859428
#> 17     1   80  1.8865890447
#> 18     1   85  2.0962514088
#> 19     1   90  1.7692432166
#> 20     1   95  1.5935932108
#> 21     1  100  1.0862570388
#> 22     2    0  0.9378618266
#> 23     2    5  0.6455078797
#> 24     2   10 -0.0370698945
#> 25     2   15 -0.8799845182
#> 26     2   20 -0.9900684367
#> 27     2   25 -1.6936381825
#> 28     2   30 -2.2424851992
#> 29     2   35 -2.2132760824
#> 30     2   40 -2.1036663913
#> 31     2   45 -1.7408282981
#> 32     2   50 -1.0985225027
#> 33     2   55 -0.5638455170
#> 34     2   60  0.0524523369
#> 35     2   65  0.7817098787
#> 36     2   70  1.1554473231
#> 37     2   75  1.6141871697
#> 38     2   80  1.8990561806
#> 39     2   85  1.9217983057
#> 40     2   90  1.6668157353
#> 41     2   95  1.3699517140
#> 42     2  100  1.0184536195
#> 43     3    0  1.0798334185
#> 44     3    5  0.4383151798
#> 45     3   10  0.2912442676
#> 46     3   15 -0.8721678297
#> 47     3   20 -1.5021680660
#> 48     3   25 -1.8288790360
#> 49     3   30 -1.8305280202
#> 50     3   35 -1.9232728029
#> 51     3   40 -1.7840912242
#> 52     3   45 -1.7585617966
#> 53     3   50 -1.1202938975
#> 54     3   55 -0.7749669486
#> 55     3   60  0.2502846840
#> 56     3   65  0.6375337377
#> 57     3   70  1.4490852733
#> 58     3   75  1.5572768287
#> 59     3   80  1.9055420533
#> 60     3   85  1.9460774356
#> 61     3   90  1.6873656325
#> 62     3   95  1.4769868377
#> 63     3  100  1.4495398133
#> 64     4    0  1.3862407145
#> 65     4    5  0.4548514199
#> 66     4   10  0.0217277187
#> 67     4   15 -0.8048020561
#> 68     4   20 -1.2655542240
#> 69     4   25 -1.6263337737
#> 70     4   30 -1.9497806043
#> 71     4   35 -2.0044893942
#> 72     4   40 -1.8904219000
#> 73     4   45 -1.6817548622
#> 74     4   50 -0.6948858899
#> 75     4   55 -0.3850094714
#> 76     4   60  0.0458252243
#> 77     4   65  0.8028850817
#> 78     4   70  0.9981055519
#> 79     4   75  1.7543619614
#> 80     4   80  1.9864136589
#> 81     4   85  1.9106580677
#> 82     4   90  1.8102546048
#> 83     4   95  1.6483781220
#> 84     4  100  1.1146984000
#> 85     5    0  1.4356594782
#> 86     5    5  0.5954593512
#> 87     5   10 -0.2912823356
#> 88     5   15 -0.6410984717
#> 89     5   20 -1.2784589448
#> 90     5   25 -1.6726335208
#> 91     5   30 -2.0908706871
#> 92     5   35 -1.9791599689
#> 93     5   40 -1.8317834667
#> 94     5   45 -1.5189291948
#> 95     5   50 -0.9208314522
#> 96     5   55 -0.4710667657
#> 97     5   60  0.0837581049
#> 98     5   65  0.4704048911
#> 99     5   70  1.1045849630
#> 100    5   75  1.5907515095
#> 101    5   80  1.9831297071
#> 102    5   85  1.9587557227
#> 103    5   90  2.0211248586
#> 104    5   95  1.5504049667
#> 105    5  100  1.0405641227
#> 106    6    0  0.9881392353
#> 107    6    5  0.4800120580
#> 108    6   10  0.0522163067
#> 109    6   15 -0.8101337365
#> 110    6   20 -0.9747700549
#> 111    6   25 -1.7132780979
#> 112    6   30 -1.8045431962
#> 113    6   35 -2.0802744306
#> 114    6   40 -1.6156486566
#> 115    6   45 -1.6422105381
#> 116    6   50 -1.2585355995
#> 117    6   55 -0.4957330891
#> 118    6   60  0.0482636784
#> 119    6   65  0.7302802334
#> 120    6   70  1.1108042715
#> 121    6   75  1.4854654094
#> 122    6   80  2.0101170542
#> 123    6   85  2.2756787375
#> 124    6   90  1.9819937669
#> 125    6   95  1.4204145564
#> 126    6  100  1.2418463733
#> 127    7    0  1.1142373544
#> 128    7    5  0.4851049780
#> 129    7   10 -0.5720259605
#> 130    7   15 -0.8841496568
#> 131    7   20 -1.2416482794
#> 132    7   25 -1.5788710918
#> 133    7   30 -1.7802454338
#> 134    7   35 -1.8495685735
#> 135    7   40 -1.9708957715
#> 136    7   45 -1.6027043283
#> 137    7   50 -1.0358275702
#> 138    7   55 -0.6092822180
#> 139    7   60 -0.1794844779
#> 140    7   65  0.7024246055
#> 141    7   70  1.3099390562
#> 142    7   75  1.4678595562
#> 143    7   80  1.8876150865
#> 144    7   85  1.9956087125
#> 145    7   90  1.7148619524
#> 146    7   95  1.7720582253
#> 147    7  100  1.2071216417
#> 148    8    0  1.1410981614
#> 149    8    5  0.5079109416
#> 150    8   10  0.0329739039
#> 151    8   15 -0.7347735916
#> 152    8   20 -1.1137741771
#> 153    8   25 -1.6518347960
#> 154    8   30 -1.8783015808
#> 155    8   35 -2.0246102132
#> 156    8   40 -1.8928193526
#> 157    8   45 -1.4924624180
#> 158    8   50 -0.8574289370
#> 159    8   55 -0.4657142090
#> 160    8   60  0.0731201495
#> 161    8   65  0.5286320905
#> 162    8   70  1.1685807638
#> 163    8   75  1.6573460269
#> 164    8   80  2.0316251197
#> 165    8   85  2.0381332918
#> 166    8   90  1.8396918610
#> 167    8   95  1.5893045955
#> 168    8  100  0.8993382037
#> 169    9    0  1.3185827460
#> 170    9    5  0.4629034735
#> 171    9   10 -0.0603813954
#> 172    9   15 -0.6274078032
#> 173    9   20 -1.3330837729
#> 174    9   25 -1.5105012723
#> 175    9   30 -1.7063035995
#> 176    9   35 -1.8252200624
#> 177    9   40 -1.9361720048
#> 178    9   45 -1.3182435129
#> 179    9   50 -1.4633157230
#> 180    9   55 -0.4607217469
#> 181    9   60  0.1134147409
#> 182    9   65  0.7648043675
#> 183    9   70  1.3098583262
#> 184    9   75  1.8297805054
#> 185    9   80  2.0004325925
#> 186    9   85  2.0707662500
#> 187    9   90  2.0320682204
#> 188    9   95  1.4258057457
#> 189    9  100  1.1945851367
#> 190   10    0  1.1803785931
#> 191   10    5  0.5723232276
#> 192   10   10 -0.1166378496
#> 193   10   15 -0.5211453024
#> 194   10   20 -1.3353118175
#> 195   10   25 -1.8650336402
#> 196   10   30 -1.8811599742
#> 197   10   35 -1.8533872623
#> 198   10   40 -1.8489480902
#> 199   10   45 -1.6349338338
#> 200   10   50 -0.9326958786
#> 201   10   55 -0.4856958116
#> 202   10   60  0.3418402891
#> 203   10   65  0.9746415720
#> 204   10   70  1.3136320533
#> 205   10   75  1.6455633680
#> 206   10   80  1.5520966998
#> 207   10   85  1.9296482120
#> 208   10   90  1.8317489275
#> 209   10   95  1.8101608312
#> 210   10  100  0.8333303890
#> 211   11    0  0.9331176832
#> 212   11    5  0.6546308056
#> 213   11   10 -0.1528723330
#> 214   11   15 -0.9116440930
#> 215   11   20 -1.5559733957
#> 216   11   25 -1.4135116863
#> 217   11   30 -1.9366976400
#> 218   11   35 -2.1134180841
#> 219   11   40 -2.0190805275
#> 220   11   45 -1.7946432616
#> 221   11   50 -1.2291100526
#> 222   11   55 -0.4273251054
#> 223   11   60  0.0872057561
#> 224   11   65  0.7134863400
#> 225   11   70  1.4884126811
#> 226   11   75  1.3694656844
#> 227   11   80  1.7493179415
#> 228   11   85  1.7519147194
#> 229   11   90  1.9205069179
#> 230   11   95  1.8282478341
#> 231   11  100  1.1876505988
#> 232   12    0  0.8453409186
#> 233   12    5  0.3542108121
#> 234   12   10 -0.1385147681
#> 235   12   15 -0.6828600415
#> 236   12   20 -1.2211908832
#> 237   12   25 -1.4729744662
#> 238   12   30 -2.0598822240
#> 239   12   35 -2.0942690011
#> 240   12   40 -1.6410755575
#> 241   12   45 -1.5627758205
#> 242   12   50 -1.1972478282
#> 243   12   55 -0.4166188679
#> 244   12   60 -0.2148575130
#> 245   12   65  0.5968238570
#> 246   12   70  1.3225844768
#> 247   12   75  1.7774779441
#> 248   12   80  1.9786511242
#> 249   12   85  1.9762715775
#> 250   12   90  1.6250725112
#> 251   12   95  1.4891784390
#> 252   12  100  1.1349574354
#> 253   13    0  0.9539185183
#> 254   13    5  0.5411432876
#> 255   13   10 -0.2140366901
#> 256   13   15 -0.5199075812
#> 257   13   20 -1.3390164223
#> 258   13   25 -1.7900691555
#> 259   13   30 -2.0724620767
#> 260   13   35 -1.9965236114
#> 261   13   40 -1.7577302843
#> 262   13   45 -1.5808106622
#> 263   13   50 -1.1055618166
#> 264   13   55 -0.5248271648
#> 265   13   60 -0.0449239287
#> 266   13   65  0.5374668779
#> 267   13   70  1.4474553115
#> 268   13   75  1.6458282047
#> 269   13   80  2.0124232127
#> 270   13   85  1.9842524644
#> 271   13   90  1.7245877621
#> 272   13   95  1.2058907889
#> 273   13  100  0.9422999610
#> 274   14    0  1.0637206790
#> 275   14    5  0.4418738691
#> 276   14   10 -0.3429290744
#> 277   14   15 -0.6807588944
#> 278   14   20 -1.1311863246
#> 279   14   25 -1.6216686939
#> 280   14   30 -2.1097118593
#> 281   14   35 -1.9251249715
#> 282   14   40 -2.0042703533
#> 283   14   45 -1.4546741930
#> 284   14   50 -0.9847011379
#> 285   14   55 -0.6857812998
#> 286   14   60  0.2331324839
#> 287   14   65  0.6414487997
#> 288   14   70  1.3007899785
#> 289   14   75  1.6408405277
#> 290   14   80  1.9806066274
#> 291   14   85  2.0939265744
#> 292   14   90  1.7743093191
#> 293   14   95  1.5058292406
#> 294   14  100  0.6763052064
#> 295   15    0  0.9242134979
#> 296   15    5  0.5491348779
#> 297   15   10 -0.2577505234
#> 298   15   15 -0.8122698287
#> 299   15   20 -1.3428963474
#> 300   15   25 -1.7906432883
#> 301   15   30 -2.1321959463
#> 302   15   35 -2.2256600689
#> 303   15   40 -1.9919063419
#> 304   15   45 -1.5736327548
#> 305   15   50 -1.2937988592
#> 306   15   55 -0.6390054707
#> 307   15   60  0.0289696526
#> 308   15   65  0.7746519270
#> 309   15   70  1.0125676916
#> 310   15   75  1.6170996123
#> 311   15   80  1.8138296715
#> 312   15   85  1.8153919362
#> 313   15   90  1.6220896723
#> 314   15   95  1.2723238465
#> 315   15  100  1.0143650949
#> 316   16    0  1.1899962569
#> 317   16    5  0.5323385060
#> 318   16   10 -0.1318397693
#> 319   16   15 -0.5892413895
#> 320   16   20 -1.1878358703
#> 321   16   25 -1.7614859743
#> 322   16   30 -1.9241128170
#> 323   16   35 -2.2344407985
#> 324   16   40 -1.9399600315
#> 325   16   45 -1.6666654743
#> 326   16   50 -0.9803622189
#> 327   16   55 -0.4761905048
#> 328   16   60  0.2407138832
#> 329   16   65  0.4698082497
#> 330   16   70  1.4038925353
#> 331   16   75  1.6030017590
#> 332   16   80  1.9487680216
#> 333   16   85  1.9460400122
#> 334   16   90  1.9914783153
#> 335   16   95  1.5231057634
#> 336   16  100  1.1447845849
#> 337   17    0  1.1214100774
#> 338   17    5  0.3138064599
#> 339   17   10 -0.0915248051
#> 340   17   15 -0.5662756569
#> 341   17   20 -1.3877881709
#> 342   17   25 -1.6352884349
#> 343   17   30 -1.9630292062
#> 344   17   35 -2.0019930487
#> 345   17   40 -1.6998455179
#> 346   17   45 -1.2838171682
#> 347   17   50 -1.2438115400
#> 348   17   55 -0.5341321133
#> 349   17   60  0.0098158877
#> 350   17   65  0.8903774137
#> 351   17   70  1.2792507802
#> 352   17   75  1.7298652908
#> 353   17   80  1.9444592947
#> 354   17   85  1.8959489200
#> 355   17   90  1.7266552921
#> 356   17   95  1.6585202945
#> 357   17  100  1.0455336827
#> 358   18    0  1.2116549137
#> 359   18    5  0.5515602561
#> 360   18   10 -0.0458021070
#> 361   18   15 -0.6411054200
#> 362   18   20 -0.9118894077
#> 363   18   25 -1.6845506423
#> 364   18   30 -2.2411696769
#> 365   18   35 -2.0191605663
#> 366   18   40 -1.8334139340
#> 367   18   45 -1.5395548090
#> 368   18   50 -1.0559268055
#> 369   18   55 -0.6623330622
#> 370   18   60  0.3530990961
#> 371   18   65  0.5156833205
#> 372   18   70  1.1674053773
#> 373   18   75  1.7478156835
#> 374   18   80  1.9808551128
#> 375   18   85  2.1648677254
#> 376   18   90  1.8572349203
#> 377   18   95  1.3762762883
#> 378   18  100  1.2108555589
#> 379   19    0  0.9668341267
#> 380   19    5  0.3596472487
#> 381   19   10 -0.0458539363
#> 382   19   15 -0.5190619291
#> 383   19   20 -1.4435603434
#> 384   19   25 -1.8320678672
#> 385   19   30 -2.1474362039
#> 386   19   35 -1.7445075611
#> 387   19   40 -2.0346549016
#> 388   19   45 -1.7959184563
#> 389   19   50 -0.8805518502
#> 390   19   55 -0.5292982014
#> 391   19   60 -0.2117515331
#> 392   19   65  0.7612312637
#> 393   19   70  1.2594774204
#> 394   19   75  1.5731734636
#> 395   19   80  1.6730246326
#> 396   19   85  2.0875409848
#> 397   19   90  1.7991907610
#> 398   19   95  1.6718230418
#> 399   19  100  0.6823048354
#> 400   20    0  1.5030172531
#> 401   20    5  0.7144715887
#> 402   20   10  0.1788786483
#> 403   20   15 -1.0262418113
#> 404   20   20 -1.2376190107
#> 405   20   25 -1.8520440557
#> 406   20   30 -1.8170064894
#> 407   20   35 -1.8395180693
#> 408   20   40 -1.6310026662
#> 409   20   45 -1.7397750675
#> 410   20   50 -1.1496774466
#> 411   20   55 -0.4815380071
#> 412   20   60  0.0308666119
#> 413   20   65  0.6846689369
#> 414   20   70  1.3687615332
#> 415   20   75  1.6027494718
#> 416   20   80  1.7651316846
#> 417   20   85  1.8605019034
#> 418   20   90  1.8165938611
#> 419   20   95  1.6340046593
#> 420   20  100  0.9314326363
#> 421   21    0  1.5332478270
#> 422   21    5  0.5450231634
#> 423   21   10 -0.1803894996
#> 424   21   15 -0.5021989544
#> 425   21   20 -1.4009651413
#> 426   21   25 -1.5553194020
#> 427   21   30 -2.0162574484
#> 428   21   35 -2.1328050514
#> 429   21   40 -1.7044962967
#> 430   21   45 -1.4357612665
#> 431   21   50 -1.0798911245
#> 432   21   55 -0.5057490417
#> 433   21   60  0.0128021723
#> 434   21   65  0.9571520215
#> 435   21   70  1.0649569016
#> 436   21   75  1.8926625456
#> 437   21   80  2.0123339899
#> 438   21   85  1.9891834506
#> 439   21   90  1.9531342412
#> 440   21   95  1.4160964125
#> 441   21  100  1.3309668721
#> 442   22    0  1.1485786168
#> 443   22    5  0.6144989568
#> 444   22   10 -0.0824300702
#> 445   22   15 -0.7385234335
#> 446   22   20 -1.5075054462
#> 447   22   25 -1.6162819251
#> 448   22   30 -1.9343170384
#> 449   22   35 -1.9466754884
#> 450   22   40 -1.8319991410
#> 451   22   45 -1.4419735437
#> 452   22   50 -0.8884116928
#> 453   22   55 -0.4141542531
#> 454   22   60  0.2147741765
#> 455   22   65  0.9368688844
#> 456   22   70  1.1346158557
#> 457   22   75  1.5382190762
#> 458   22   80  2.0235478896
#> 459   22   85  1.8393269696
#> 460   22   90  1.7139622787
#> 461   22   95  1.3158899547
#> 462   22  100  1.1981439229
#> 463   23    0  1.1396625444
#> 464   23    5  0.6134606646
#> 465   23   10  0.0917918771
#> 466   23   15 -1.0240183892
#> 467   23   20 -1.4810877125
#> 468   23   25 -1.9196810210
#> 469   23   30 -2.0232450994
#> 470   23   35 -1.7494035773
#> 471   23   40 -1.7171849106
#> 472   23   45 -1.6548888282
#> 473   23   50 -0.9890698472
#> 474   23   55 -0.3857433904
#> 475   23   60  0.0724793774
#> 476   23   65  0.7850908072
#> 477   23   70  1.4200314220
#> 478   23   75  1.5309735566
#> 479   23   80  1.7473265312
#> 480   23   85  2.0769988417
#> 481   23   90  1.8155903154
#> 482   23   95  1.4222921473
#> 483   23  100  1.0204510170
#> 484   24    0  1.0658966764
#> 485   24    5  0.3553236761
#> 486   24   10 -0.1514457065
#> 487   24   15 -0.6810881915
#> 488   24   20 -1.4807144405
#> 489   24   25 -1.7570005508
#> 490   24   30 -1.8819596890
#> 491   24   35 -2.0399595027
#> 492   24   40 -1.7325407803
#> 493   24   45 -1.4413958835
#> 494   24   50 -1.0581137996
#> 495   24   55 -0.8095886976
#> 496   24   60  0.0668775904
#> 497   24   65  0.9697979768
#> 498   24   70  1.3620399222
#> 499   24   75  1.6729601880
#> 500   24   80  1.7786889519
#> 501   24   85  2.1155010300
#> 502   24   90  1.8627092998
#> 503   24   95  1.6205858958
#> 504   24  100  0.8460435056
#> 505   25    0  0.9544764549
#> 506   25    5  0.6885048525
#> 507   25   10 -0.2650470685
#> 508   25   15 -0.6686919058
#> 509   25   20 -1.2978653334
#> 510   25   25 -1.5511977871
#> 511   25   30 -1.8669429323
#> 512   25   35 -1.9253103531
#> 513   25   40 -1.8049373599
#> 514   25   45 -1.2588465321
#> 515   25   50 -1.1217824833
#> 516   25   55 -0.6201946358
#> 517   25   60  0.3161424274
#> 518   25   65  1.0847396864
#> 519   25   70  1.1567634967
#> 520   25   75  1.8328771143
#> 521   25   80  1.9142427818
#> 522   25   85  1.9970671056
#> 523   25   90  1.7708497393
#> 524   25   95  1.3469305614
#> 525   25  100  1.0181712749
#> 526   26    0  1.1133334246
#> 527   26    5  0.5867516361
#> 528   26   10 -0.2020057370
#> 529   26   15 -0.7284213965
#> 530   26   20 -1.2031919727
#> 531   26   25 -1.5805229908
#> 532   26   30 -1.6425054009
#> 533   26   35 -1.8856210903
#> 534   26   40 -2.0909078206
#> 535   26   45 -1.5319964468
#> 536   26   50 -1.0447970888
#> 537   26   55 -0.6505110551
#> 538   26   60  0.1891756698
#> 539   26   65  0.6596210683
#> 540   26   70  1.4331483118
#> 541   26   75  1.6977154170
#> 542   26   80  2.0433239352
#> 543   26   85  2.0705440913
#> 544   26   90  1.9193725293
#> 545   26   95  1.5682972695
#> 546   26  100  0.8172505093
#> 547   27    0  1.1517169013
#> 548   27    5  0.4093617540
#> 549   27   10 -0.1865845613
#> 550   27   15 -0.5836883036
#> 551   27   20 -1.3340082697
#> 552   27   25 -1.7543809321
#> 553   27   30 -1.9639767495
#> 554   27   35 -1.7032142897
#> 555   27   40 -1.8582582524
#> 556   27   45 -1.5972304482
#> 557   27   50 -1.0386480090
#> 558   27   55 -0.3585068212
#> 559   27   60  0.3131501829
#> 560   27   65  0.5153003325
#> 561   27   70  1.1284994083
#> 562   27   75  1.8532159872
#> 563   27   80  1.9999185603
#> 564   27   85  1.8909865546
#> 565   27   90  1.9485731299
#> 566   27   95  1.6940793812
#> 567   27  100  1.3516510848
#> 568   28    0  1.3197217176
#> 569   28    5  0.4474730484
#> 570   28   10 -0.1977060701
#> 571   28   15 -0.8356031884
#> 572   28   20 -1.2573947628
#> 573   28   25 -1.6210248501
#> 574   28   30 -1.9821045843
#> 575   28   35 -1.9370105413
#> 576   28   40 -1.8346187207
#> 577   28   45 -1.3525018266
#> 578   28   50 -0.9309258028
#> 579   28   55 -0.3517951115
#> 580   28   60  0.5213248880
#> 581   28   65  0.6849803170
#> 582   28   70  1.3901902315
#> 583   28   75  1.7360854230
#> 584   28   80  1.7411000126
#> 585   28   85  2.3308215608
#> 586   28   90  1.9669079789
#> 587   28   95  1.5351467317
#> 588   28  100  0.9139960135
#> 589   29    0  1.0220954775
#> 590   29    5  0.2624817803
#> 591   29   10  0.1138463759
#> 592   29   15 -0.6622898452
#> 593   29   20 -1.0412902197
#> 594   29   25 -1.8098068372
#> 595   29   30 -1.9310337144
#> 596   29   35 -2.1955126798
#> 597   29   40 -1.6421887520
#> 598   29   45 -1.6299142278
#> 599   29   50 -0.9911225558
#> 600   29   55 -0.4095950495
#> 601   29   60  0.0231426086
#> 602   29   65  0.8571796799
#> 603   29   70  1.1547803436
#> 604   29   75  1.5857030744
#> 605   29   80  1.9216354759
#> 606   29   85  1.9626896244
#> 607   29   90  1.9081666431
#> 608   29   95  1.3602027173
#> 609   29  100  1.0772186519
#> 610   30    0  1.2782799537
#> 611   30    5  0.7632292692
#> 612   30   10 -0.1246382609
#> 613   30   15 -0.6975641499
#> 614   30   20 -1.3841128331
#> 615   30   25 -1.5577978587
#> 616   30   30 -1.5447245812
#> 617   30   35 -2.0046011297
#> 618   30   40 -1.8990960693
#> 619   30   45 -1.6001275486
#> 620   30   50 -1.3850831757
#> 621   30   55 -0.4104792929
#> 622   30   60  0.2204312444
#> 623   30   65  0.7011563143
#> 624   30   70  1.3825325428
#> 625   30   75  1.3560671774
#> 626   30   80  1.9668870469
#> 627   30   85  1.9209325800
#> 628   30   90  2.1987763806
#> 629   30   95  1.5697955256
#> 630   30  100  1.1410004895
#> 631   31    0  1.2269370404
#> 632   31    5  0.7603113126
#> 633   31   10  0.0424321096
#> 634   31   15 -0.7228729080
#> 635   31   20 -1.1864950419
#> 636   31   25 -1.6762011361
#> 637   31   30 -1.5208450740
#> 638   31   35 -1.7802014198
#> 639   31   40 -1.8343048403
#> 640   31   45 -1.5770239400
#> 641   31   50 -1.1214158465
#> 642   31   55 -0.5384374574
#> 643   31   60  0.2559681922
#> 644   31   65  0.6641584714
#> 645   31   70  1.3419971223
#> 646   31   75  1.5337389390
#> 647   31   80  1.9576141041
#> 648   31   85  2.1215394410
#> 649   31   90  1.8507784434
#> 650   31   95  1.2466792796
#> 651   31  100  1.3593371130
#> 652   32    0  1.4786657210
#> 653   32    5  0.4756559775
#> 654   32   10 -0.2012303365
#> 655   32   15 -0.7606568853
#> 656   32   20 -1.2757392497
#> 657   32   25 -2.0559205553
#> 658   32   30 -1.8622225119
#> 659   32   35 -1.8575657848
#> 660   32   40 -1.6766814430
#> 661   32   45 -1.5418273326
#> 662   32   50 -0.8819420032
#> 663   32   55 -0.5452989201
#> 664   32   60  0.0713334377
#> 665   32   65  0.2838844320
#> 666   32   70  1.3682171051
#> 667   32   75  1.6646174297
#> 668   32   80  1.9148296876
#> 669   32   85  1.8945889940
#> 670   32   90  1.6529210822
#> 671   32   95  1.4316970803
#> 672   32  100  0.9202468411
#> 673   33    0  0.8391727356
#> 674   33    5  0.6992199229
#> 675   33   10 -0.0397147943
#> 676   33   15 -0.7288910641
#> 677   33   20 -1.2635008763
#> 678   33   25 -1.6542582606
#> 679   33   30 -2.1590976459
#> 680   33   35 -2.0031888474
#> 681   33   40 -1.9695253267
#> 682   33   45 -1.5104461704
#> 683   33   50 -1.0653397311
#> 684   33   55 -0.5540909340
#> 685   33   60  0.1356393448
#> 686   33   65  0.8094105729
#> 687   33   70  1.1563569015
#> 688   33   75  1.9598455499
#> 689   33   80  2.0678629204
#> 690   33   85  1.7154509312
#> 691   33   90  1.8496105608
#> 692   33   95  1.5565211547
#> 693   33  100  0.9546584737
#> 694   34    0  1.0797259870
#> 695   34    5  0.5672111641
#> 696   34   10 -0.2592500791
#> 697   34   15 -0.8116525451
#> 698   34   20 -1.2137676754
#> 699   34   25 -1.6125450772
#> 700   34   30 -1.9555444324
#> 701   34   35 -1.8941811400
#> 702   34   40 -1.8949398365
#> 703   34   45 -1.5009649812
#> 704   34   50 -1.1330627609
#> 705   34   55 -0.4515749650
#> 706   34   60  0.1231288682
#> 707   34   65  0.6394174162
#> 708   34   70  1.5058806352
#> 709   34   75  1.7708002702
#> 710   34   80  1.6781560561
#> 711   34   85  1.8091452993
#> 712   34   90  1.5954218677
#> 713   34   95  1.8392664612
#> 714   34  100  0.9506853333
#> 715   35    0  0.9244878134
#> 716   35    5  0.4359712487
#> 717   35   10  0.0001192319
#> 718   35   15 -0.5740702071
#> 719   35   20 -0.9362823692
#> 720   35   25 -1.9594672061
#> 721   35   30 -1.9108701389
#> 722   35   35 -2.2898617279
#> 723   35   40 -2.0180237136
#> 724   35   45 -1.5440662056
#> 725   35   50 -0.9800687861
#> 726   35   55 -0.3388944289
#> 727   35   60  0.1675666695
#> 728   35   65  0.8355585467
#> 729   35   70  1.2719153358
#> 730   35   75  1.5564138136
#> 731   35   80  2.0677937573
#> 732   35   85  2.0041725597
#> 733   35   90  1.6669738956
#> 734   35   95  1.7303999796
#> 735   35  100  1.0422475172
#> 736   36    0  1.0782231307
#> 737   36    5  0.5964410144
#> 738   36   10 -0.0457460610
#> 739   36   15 -0.6317966301
#> 740   36   20 -1.3792423198
#> 741   36   25 -1.7953595759
#> 742   36   30 -2.0004089898
#> 743   36   35 -1.8603026035
#> 744   36   40 -1.9952022438
#> 745   36   45 -1.6326329857
#> 746   36   50 -1.0325945982
#> 747   36   55 -0.2989939751
#> 748   36   60  0.0744698530
#> 749   36   65  0.6627458303
#> 750   36   70  1.3543348251
#> 751   36   75  1.8367549056
#> 752   36   80  1.7634066604
#> 753   36   85  2.2192473263
#> 754   36   90  1.8537826741
#> 755   36   95  1.7680982810
#> 756   36  100  1.0060096035
#> 757   37    0  1.1723413459
#> 758   37    5  0.6882031991
#> 759   37   10 -0.1810996899
#> 760   37   15 -0.7568776333
#> 761   37   20 -1.1085029359
#> 762   37   25 -1.5761022988
#> 763   37   30 -1.9095284581
#> 764   37   35 -1.7377272978
#> 765   37   40 -1.9483999518
#> 766   37   45 -1.6549565339
#> 767   37   50 -1.3094258473
#> 768   37   55 -0.5151423901
#> 769   37   60  0.1803102146
#> 770   37   65  0.5796301479
#> 771   37   70  0.9011269455
#> 772   37   75  1.8209696048
#> 773   37   80  2.0163612214
#> 774   37   85  2.0530495292
#> 775   37   90  2.1522951653
#> 776   37   95  1.3658967512
#> 777   37  100  0.9502858225
#> 778   38    0  0.9356904427
#> 779   38    5  0.5379163282
#> 780   38   10 -0.1333921841
#> 781   38   15 -0.6989276720
#> 782   38   20 -1.0512809083
#> 783   38   25 -1.8072098669
#> 784   38   30 -2.0141648379
#> 785   38   35 -2.1218705322
#> 786   38   40 -1.5674067517
#> 787   38   45 -1.7040474430
#> 788   38   50 -1.1139757249
#> 789   38   55 -0.5667021870
#> 790   38   60  0.1375129803
#> 791   38   65  0.7990428314
#> 792   38   70  1.4584159900
#> 793   38   75  1.6916195753
#> 794   38   80  2.0165922486
#> 795   38   85  1.8816827211
#> 796   38   90  1.9060974036
#> 797   38   95  1.5146372803
#> 798   38  100  1.1725356551
#> 799   39    0  0.9052595531
#> 800   39    5  0.5792805046
#> 801   39   10  0.0218455150
#> 802   39   15 -0.6350100209
#> 803   39   20 -1.5386335427
#> 804   39   25 -1.8262643301
#> 805   39   30 -2.0886226686
#> 806   39   35 -1.8151159165
#> 807   39   40 -1.7565725608
#> 808   39   45 -1.6592831419
#> 809   39   50 -1.0346262857
#> 810   39   55 -0.5959132408
#> 811   39   60 -0.0602627882
#> 812   39   65  0.6617528189
#> 813   39   70  1.4696129020
#> 814   39   75  1.5220236683
#> 815   39   80  1.6615525800
#> 816   39   85  1.9453046556
#> 817   39   90  1.8352251091
#> 818   39   95  1.7508457390
#> 819   39  100  1.0166024003
#> 820   40    0  1.2487578982
#> 821   40    5  0.2037419510
#> 822   40   10  0.0549015012
#> 823   40   15 -0.7116964594
#> 824   40   20 -1.4080442103
#> 825   40   25 -1.7570904072
#> 826   40   30 -1.9257822400
#> 827   40   35 -2.0612174235
#> 828   40   40 -1.6563472658
#> 829   40   45 -1.5739430634
#> 830   40   50 -1.1409278734
#> 831   40   55 -0.5779889866
#> 832   40   60  0.2038980813
#> 833   40   65  0.7691581024
#> 834   40   70  1.1247192650
#> 835   40   75  1.7978664011
#> 836   40   80  2.0425274633
#> 837   40   85  1.7332254139
#> 838   40   90  2.0356419328
#> 839   40   95  1.6727142761
#> 840   40  100  1.0046889628
#> 841   41    0  1.2320601442
#> 842   41    5  0.6592219968
#> 843   41   10  0.0226428570
#> 844   41   15 -0.4356327036
#> 845   41   20 -1.3382001440
#> 846   41   25 -1.8466162388
#> 847   41   30 -1.7743903705
#> 848   41   35 -2.0675498165
#> 849   41   40 -1.9277451537
#> 850   41   45 -1.4987463537
#> 851   41   50 -0.8281130749
#> 852   41   55 -0.6024113787
#> 853   41   60  0.1302699614
#> 854   41   65  0.5168279531
#> 855   41   70  1.2082938163
#> 856   41   75  1.5638930794
#> 857   41   80  1.9943065590
#> 858   41   85  1.9426037515
#> 859   41   90  1.8392650108
#> 860   41   95  1.4055312262
#> 861   41  100  1.0065137835
#> 862   42    0  0.9137355934
#> 863   42    5  0.5608790507
#> 864   42   10 -0.0102489045
#> 865   42   15 -0.5116017252
#> 866   42   20 -1.3092811297
#> 867   42   25 -1.8019680924
#> 868   42   30 -1.8388405199
#> 869   42   35 -2.3462459038
#> 870   42   40 -1.8559261618
#> 871   42   45 -1.6561984458
#> 872   42   50 -1.0190580197
#> 873   42   55 -0.4095178594
#> 874   42   60  0.3207937702
#> 875   42   65  0.5908752960
#> 876   42   70  1.3833431618
#> 877   42   75  1.5888642871
#> 878   42   80  1.8485772262
#> 879   42   85  2.3451610043
#> 880   42   90  1.9968394831
#> 881   42   95  1.6748266189
#> 882   42  100  1.1023286095
#> 883   43    0  1.0523482743
#> 884   43    5  0.4406784824
#> 885   43   10 -0.1989699552
#> 886   43   15 -0.4138430644
#> 887   43   20 -1.4184389622
#> 888   43   25 -1.5732265882
#> 889   43   30 -1.7820427440
#> 890   43   35 -1.7077238179
#> 891   43   40 -1.9382862295
#> 892   43   45 -1.6152081192
#> 893   43   50 -1.2196918894
#> 894   43   55 -0.4527668719
#> 895   43   60  0.0512488879
#> 896   43   65  0.7144475022
#> 897   43   70  1.1943530374
#> 898   43   75  1.9947482484
#> 899   43   80  1.8794545723
#> 900   43   85  1.6548625112
#> 901   43   90  1.7421306528
#> 902   43   95  1.5900392050
#> 903   43  100  1.1074298968
#> 904   44    0  1.4007428025
#> 905   44    5  0.5779111281
#> 906   44   10 -0.2363904647
#> 907   44   15 -0.6763137044
#> 908   44   20 -1.1709760084
#> 909   44   25 -1.7471796755
#> 910   44   30 -2.1088630980
#> 911   44   35 -2.0089538474
#> 912   44   40 -2.0914868668
#> 913   44   45 -1.5723431050
#> 914   44   50 -1.3662582804
#> 915   44   55 -0.6389884735
#> 916   44   60  0.1521561664
#> 917   44   65  0.5306408041
#> 918   44   70  1.4140324949
#> 919   44   75  1.3529843329
#> 920   44   80  1.9552319265
#> 921   44   85  1.9625474207
#> 922   44   90  1.7693294684
#> 923   44   95  1.6599714921
#> 924   44  100  0.7599583868
#> 925   45    0  0.9665176888
#> 926   45    5  0.3893284927
#> 927   45   10 -0.2281376137
#> 928   45   15 -0.8850583526
#> 929   45   20 -1.2007856217
#> 930   45   25 -1.6614898181
#> 931   45   30 -1.6915975219
#> 932   45   35 -2.1478259006
#> 933   45   40 -1.3451498679
#> 934   45   45 -1.3085517315
#> 935   45   50 -1.1947226111
#> 936   45   55 -0.5563629293
#> 937   45   60 -0.0535161318
#> 938   45   65  0.4813944670
#> 939   45   70  1.4983102556
#> 940   45   75  1.7760955819
#> 941   45   80  2.0433698808
#> 942   45   85  1.9250787412
#> 943   45   90  1.8452079283
#> 944   45   95  1.5063935381
#> 945   45  100  0.9487092162
#> 946   46    0  1.0111914703
#> 947   46    5  0.4109245110
#> 948   46   10 -0.0065903153
#> 949   46   15 -0.7513721290
#> 950   46   20 -1.3448625670
#> 951   46   25 -1.5899995367
#> 952   46   30 -1.7152843519
#> 953   46   35 -1.9816846710
#> 954   46   40 -1.8323294698
#> 955   46   45 -1.5201720601
#> 956   46   50 -1.0235810712
#> 957   46   55 -0.4606831095
#> 958   46   60  0.1732025453
#> 959   46   65  0.6316921539
#> 960   46   70  1.1913188304
#> 961   46   75  1.6190120714
#> 962   46   80  2.1913382927
#> 963   46   85  2.0457416162
#> 964   46   90  1.6483309597
#> 965   46   95  1.5930137934
#> 966   46  100  0.9365907423
#> 967   47    0  1.1144154734
#> 968   47    5  0.7056139649
#> 969   47   10  0.2112205066
#> 970   47   15 -0.4191792906
#> 971   47   20 -0.8483647336
#> 972   47   25 -1.5351827919
#> 973   47   30 -1.7379500309
#> 974   47   35 -2.0981371092
#> 975   47   40 -1.8757018970
#> 976   47   45 -1.6191752408
#> 977   47   50 -1.2144677708
#> 978   47   55 -0.4054401862
#> 979   47   60  0.3053508469
#> 980   47   65  0.7123835079
#> 981   47   70  1.6606006069
#> 982   47   75  1.8734666072
#> 983   47   80  1.9156560145
#> 984   47   85  1.7489660040
#> 985   47   90  1.7304804957
#> 986   47   95  1.4909759599
#> 987   47  100  1.1421056214
#> 988   48    0  0.9638961916
#> 989   48    5  0.6052744832
#> 990   48   10 -0.0817489640
#> 991   48   15 -0.7006840875
#> 992   48   20 -1.3887406377
#> 993   48   25 -1.6674884263
#> 994   48   30 -2.0680402960
#> 995   48   35 -2.0657868324
#> 996   48   40 -1.8419869127
#> 997   48   45 -1.6599518109
#> 998   48   50 -0.7924233885
#> 999   48   55 -0.3422795528
#> 1000  48   60  0.1402943457
#> 1001  48   65  0.7744425145
#> 1002  48   70  1.1465386764
#> 1003  48   75  1.6725923902
#> 1004  48   80  1.7654329390
#> 1005  48   85  2.0178720503
#> 1006  48   90  1.6858928593
#> 1007  48   95  1.5889985987
#> 1008  48  100  1.2955666153
#> 1009  49    0  1.0263890075
#> 1010  49    5  0.7989846268
#> 1011  49   10 -0.1596055090
#> 1012  49   15 -0.7352947599
#> 1013  49   20 -1.1613717556
#> 1014  49   25 -1.6672844455
#> 1015  49   30 -2.0492979976
#> 1016  49   35 -1.8081866689
#> 1017  49   40 -1.7624879347
#> 1018  49   45 -1.7848833128
#> 1019  49   50 -0.8245332763
#> 1020  49   55 -0.5900171321
#> 1021  49   60 -0.0254943392
#> 1022  49   65  0.8435457324
#> 1023  49   70  1.3372943533
#> 1024  49   75  1.5056090019
#> 1025  49   80  1.8679613812
#> 1026  49   85  1.8626621192
#> 1027  49   90  2.0024993689
#> 1028  49   95  1.6740638781
#> 1029  49  100  1.0284243658
#> 1030  50    0  1.0524457884
#> 1031  50    5  0.2968441999
#> 1032  50   10 -0.2701229931
#> 1033  50   15 -0.4624232592
#> 1034  50   20 -1.3849398686
#> 1035  50   25 -1.8826761848
#> 1036  50   30 -1.9134134239
#> 1037  50   35 -1.9508109729
#> 1038  50   40 -1.5736598054
#> 1039  50   45 -1.5968413708
#> 1040  50   50 -1.1978944631
#> 1041  50   55 -0.4012499145
#> 1042  50   60  0.2082800500
#> 1043  50   65  0.7764935343
#> 1044  50   70  1.3534676230
#> 1045  50   75  1.7674449570
#> 1046  50   80  1.9332196863
#> 1047  50   85  1.8547563563
#> 1048  50   90  1.8910655332
#> 1049  50   95  1.5372965357
#> 1050  50  100  0.9653467651
#> 1051  51    0  1.1171011004
#> 1052  51    5  0.5787067214
#> 1053  51   10  0.1263323411
#> 1054  51   15 -0.9231252348
#> 1055  51   20 -1.0708365981
#> 1056  51   25 -1.4149221708
#> 1057  51   30 -1.7869688769
#> 1058  51   35 -2.1264443072
#> 1059  51   40 -1.9433583767
#> 1060  51   45 -1.4485432163
#> 1061  51   50 -1.0629964812
#> 1062  51   55 -0.6412057320
#> 1063  51   60  0.1352207611
#> 1064  51   65  1.0226117429
#> 1065  51   70  1.2577713486
#> 1066  51   75  1.3690592773
#> 1067  51   80  1.7962857333
#> 1068  51   85  2.0665621418
#> 1069  51   90  1.9732078987
#> 1070  51   95  1.7073382363
#> 1071  51  100  1.1661215192
#> 1072  52    0  1.1334287452
#> 1073  52    5  0.5764342385
#> 1074  52   10 -0.1523169748
#> 1075  52   15 -0.8211777900
#> 1076  52   20 -1.2050501604
#> 1077  52   25 -1.7225450732
#> 1078  52   30 -1.8477077259
#> 1079  52   35 -1.9978518830
#> 1080  52   40 -2.0549366470
#> 1081  52   45 -1.6687149786
#> 1082  52   50 -1.0389562178
#> 1083  52   55 -0.5241234050
#> 1084  52   60  0.2228903906
#> 1085  52   65  0.4775483836
#> 1086  52   70  1.0988544231
#> 1087  52   75  1.5968392271
#> 1088  52   80  1.8685367098
#> 1089  52   85  1.7630733724
#> 1090  52   90  1.7636033275
#> 1091  52   95  1.3629899725
#> 1092  52  100  1.1612414044
#> 1093  53    0  0.9044633565
#> 1094  53    5  0.6961305111
#> 1095  53   10  0.0325460282
#> 1096  53   15 -0.5983622818
#> 1097  53   20 -1.0463776587
#> 1098  53   25 -2.0391828662
#> 1099  53   30 -2.0190000195
#> 1100  53   35 -2.1806199715
#> 1101  53   40 -1.7181605622
#> 1102  53   45 -1.5866884501
#> 1103  53   50 -1.0489426484
#> 1104  53   55 -0.5345370519
#> 1105  53   60  0.2963311542
#> 1106  53   65  0.8020264056
#> 1107  53   70  1.5012169347
#> 1108  53   75  1.6034416054
#> 1109  53   80  1.9530347892
#> 1110  53   85  1.9980991017
#> 1111  53   90  1.6087314965
#> 1112  53   95  1.6359235070
#> 1113  53  100  1.0373056018
#> 1114  54    0  1.1451312705
#> 1115  54    5  0.7162375537
#> 1116  54   10 -0.2472898397
#> 1117  54   15 -0.6553400481
#> 1118  54   20 -1.3430831603
#> 1119  54   25 -1.8074609655
#> 1120  54   30 -2.2432752950
#> 1121  54   35 -2.0250498032
#> 1122  54   40 -1.6210530114
#> 1123  54   45 -1.6644486281
#> 1124  54   50 -1.0409285535
#> 1125  54   55 -0.8082320411
#> 1126  54   60  0.2101963753
#> 1127  54   65  0.5917337114
#> 1128  54   70  1.0844551075
#> 1129  54   75  1.8087525988
#> 1130  54   80  1.8704255405
#> 1131  54   85  2.1671538022
#> 1132  54   90  1.8746381066
#> 1133  54   95  1.5621261150
#> 1134  54  100  1.2208359706
#> 1135  55    0  1.2127386211
#> 1136  55    5  0.5396252208
#> 1137  55   10 -0.1100524569
#> 1138  55   15 -1.0568059409
#> 1139  55   20 -1.3644503261
#> 1140  55   25 -1.6754839655
#> 1141  55   30 -2.0560427162
#> 1142  55   35 -2.3678170734
#> 1143  55   40 -1.8358394471
#> 1144  55   45 -1.2823693452
#> 1145  55   50 -0.8829614960
#> 1146  55   55 -0.6241890164
#> 1147  55   60  0.1255780368
#> 1148  55   65  0.9244393139
#> 1149  55   70  1.4709895373
#> 1150  55   75  1.8298512200
#> 1151  55   80  1.6956251775
#> 1152  55   85  2.1972516568
#> 1153  55   90  1.8267831787
#> 1154  55   95  1.3762592850
#> 1155  55  100  0.7265611939
#> 1156  56    0  1.1097810023
#> 1157  56    5  0.1555510151
#> 1158  56   10 -0.1836247837
#> 1159  56   15 -0.7844060189
#> 1160  56   20 -1.4514482595
#> 1161  56   25 -1.5988992430
#> 1162  56   30 -1.7563024355
#> 1163  56   35 -2.0737815846
#> 1164  56   40 -1.9281748826
#> 1165  56   45 -1.3207921489
#> 1166  56   50 -1.1668073654
#> 1167  56   55 -0.4422248181
#> 1168  56   60  0.0274348747
#> 1169  56   65  0.9338319936
#> 1170  56   70  1.1835784558
#> 1171  56   75  1.5110277131
#> 1172  56   80  1.8962280169
#> 1173  56   85  1.9707430632
#> 1174  56   90  2.0952668414
#> 1175  56   95  1.3452567427
#> 1176  56  100  1.1952813089
#> 1177  57    0  1.1711331681
#> 1178  57    5  0.2843823657
#> 1179  57   10 -0.1703246502
#> 1180  57   15 -0.6146542081
#> 1181  57   20 -1.5421941619
#> 1182  57   25 -1.6361887035
#> 1183  57   30 -1.9131399103
#> 1184  57   35 -2.1982922079
#> 1185  57   40 -1.8447711785
#> 1186  57   45 -1.6047273521
#> 1187  57   50 -0.6693022108
#> 1188  57   55 -0.5154545041
#> 1189  57   60  0.2078835609
#> 1190  57   65  0.7363800943
#> 1191  57   70  1.2084656847
#> 1192  57   75  1.7679070363
#> 1193  57   80  2.0195627083
#> 1194  57   85  1.9562317504
#> 1195  57   90  1.8740496210
#> 1196  57   95  1.5701730747
#> 1197  57  100  1.1364535699
#> 1198  58    0  0.8691629729
#> 1199  58    5  0.5849652962
#> 1200  58   10 -0.3049199199
#> 1201  58   15 -0.8219309467
#> 1202  58   20 -1.3127926460
#> 1203  58   25 -1.7306664693
#> 1204  58   30 -2.0902655142
#> 1205  58   35 -1.8333601132
#> 1206  58   40 -1.8191639147
#> 1207  58   45 -1.4832433351
#> 1208  58   50 -1.3180191319
#> 1209  58   55 -0.6569930489
#> 1210  58   60  0.1818500126
#> 1211  58   65  0.6853440281
#> 1212  58   70  1.2598684460
#> 1213  58   75  2.0455025613
#> 1214  58   80  1.7471207486
#> 1215  58   85  1.7336225186
#> 1216  58   90  1.6203868803
#> 1217  58   95  1.7967636441
#> 1218  58  100  1.2161811626
#> 1219  59    0  0.9255381065
#> 1220  59    5  0.6563726682
#> 1221  59   10 -0.0223610300
#> 1222  59   15 -0.6602422521
#> 1223  59   20 -1.2445471953
#> 1224  59   25 -1.7307980874
#> 1225  59   30 -1.9555905038
#> 1226  59   35 -1.8574590298
#> 1227  59   40 -1.8013793742
#> 1228  59   45 -1.6829746981
#> 1229  59   50 -1.0980883811
#> 1230  59   55 -0.1457920769
#> 1231  59   60  0.0505879425
#> 1232  59   65  0.7072076671
#> 1233  59   70  1.4138728393
#> 1234  59   75  1.7875188266
#> 1235  59   80  1.7594621771
#> 1236  59   85  1.9743047396
#> 1237  59   90  1.7868253850
#> 1238  59   95  1.5022126804
#> 1239  59  100  1.2183907894
#> 1240  60    0  1.0662472795
#> 1241  60    5  0.3230797535
#> 1242  60   10 -0.2084398179
#> 1243  60   15 -0.8851251471
#> 1244  60   20 -1.3937430089
#> 1245  60   25 -1.5072765309
#> 1246  60   30 -2.0200754326
#> 1247  60   35 -2.3292053785
#> 1248  60   40 -1.9204220577
#> 1249  60   45 -1.3506727425
#> 1250  60   50 -0.9541675823
#> 1251  60   55 -0.7693691074
#> 1252  60   60  0.1171814385
#> 1253  60   65  0.5322264407
#> 1254  60   70  1.1831413275
#> 1255  60   75  1.5229820199
#> 1256  60   80  1.8338582555
#> 1257  60   85  1.9237619985
#> 1258  60   90  1.8373418316
#> 1259  60   95  1.6568432129
#> 1260  60  100  0.9026708603
#> 1261  61    0  1.1786137411
#> 1262  61    5  0.3987619218
#> 1263  61   10  0.1321189235
#> 1264  61   15 -0.5191728880
#> 1265  61   20 -1.1151025235
#> 1266  61   25 -1.3943859069
#> 1267  61   30 -1.9289561070
#> 1268  61   35 -2.1491215297
#> 1269  61   40 -1.7258584519
#> 1270  61   45 -1.3435037511
#> 1271  61   50 -1.1740719465
#> 1272  61   55 -0.6421147796
#> 1273  61   60  0.2559357515
#> 1274  61   65  0.8513834482
#> 1275  61   70  1.1990775672
#> 1276  61   75  1.7097582677
#> 1277  61   80  2.0920906541
#> 1278  61   85  2.2922597878
#> 1279  61   90  2.1372576484
#> 1280  61   95  1.5906371331
#> 1281  61  100  1.3628552580
#> 1282  62    0  0.8573131881
#> 1283  62    5  0.7885271146
#> 1284  62   10 -0.1771056251
#> 1285  62   15 -1.1592875684
#> 1286  62   20 -1.4697864144
#> 1287  62   25 -1.3972493157
#> 1288  62   30 -1.9062563231
#> 1289  62   35 -1.9605023918
#> 1290  62   40 -2.0595040660
#> 1291  62   45 -1.4999785722
#> 1292  62   50 -0.6532930067
#> 1293  62   55 -0.4860008677
#> 1294  62   60  0.2045275381
#> 1295  62   65  0.4829379566
#> 1296  62   70  1.2175265479
#> 1297  62   75  1.6700443395
#> 1298  62   80  2.1916927383
#> 1299  62   85  1.9339252576
#> 1300  62   90  1.8007234042
#> 1301  62   95  1.3385925776
#> 1302  62  100  1.0975912333
#> 1303  63    0  1.2198690146
#> 1304  63    5  0.7347686363
#> 1305  63   10 -0.3613326369
#> 1306  63   15 -0.8794034472
#> 1307  63   20 -1.4626712440
#> 1308  63   25 -1.4567768104
#> 1309  63   30 -1.6877186392
#> 1310  63   35 -2.0319492425
#> 1311  63   40 -2.0223470854
#> 1312  63   45 -1.5514617782
#> 1313  63   50 -0.9883048704
#> 1314  63   55 -0.4002748535
#> 1315  63   60 -0.0009051857
#> 1316  63   65  0.7393446312
#> 1317  63   70  1.3625154007
#> 1318  63   75  1.7066571758
#> 1319  63   80  1.9875716890
#> 1320  63   85  2.1155348113
#> 1321  63   90  2.0791395697
#> 1322  63   95  1.4433785186
#> 1323  63  100  1.2174709583
#> 1324  64    0  1.1262207067
#> 1325  64    5  0.6223886333
#> 1326  64   10 -0.0695764189
#> 1327  64   15 -0.4996595323
#> 1328  64   20 -1.4131787798
#> 1329  64   25 -1.5734316759
#> 1330  64   30 -2.0236697384
#> 1331  64   35 -2.0075261272
#> 1332  64   40 -1.8604545977
#> 1333  64   45 -1.6604630965
#> 1334  64   50 -0.8307409262
#> 1335  64   55 -0.5967078671
#> 1336  64   60  0.0047509693
#> 1337  64   65  0.5313611975
#> 1338  64   70  1.3212317189
#> 1339  64   75  1.9285991899
#> 1340  64   80  2.0152239121
#> 1341  64   85  1.9607776174
#> 1342  64   90  1.8435229601
#> 1343  64   95  1.6773509231
#> 1344  64  100  1.1285799459
#> 1345  65    0  1.1911889057
#> 1346  65    5  0.2308000532
#> 1347  65   10 -0.2704882311
#> 1348  65   15 -0.6722374635
#> 1349  65   20 -1.3028299644
#> 1350  65   25 -1.5138713160
#> 1351  65   30 -2.0277559790
#> 1352  65   35 -2.2135075150
#> 1353  65   40 -2.0070499048
#> 1354  65   45 -1.6708244307
#> 1355  65   50 -1.3018737809
#> 1356  65   55 -0.4904575259
#> 1357  65   60  0.2167999570
#> 1358  65   65  0.5596651888
#> 1359  65   70  1.1494443374
#> 1360  65   75  1.8234775081
#> 1361  65   80  2.0962594692
#> 1362  65   85  1.8497325134
#> 1363  65   90  1.8135503423
#> 1364  65   95  1.4746916410
#> 1365  65  100  0.9477320215
#> 1366  66    0  0.8994697027
#> 1367  66    5  0.5839003143
#> 1368  66   10 -0.4045147819
#> 1369  66   15 -0.5647742657
#> 1370  66   20 -1.3040400492
#> 1371  66   25 -1.6426331111
#> 1372  66   30 -1.8004064400
#> 1373  66   35 -2.1561344947
#> 1374  66   40 -1.9787129450
#> 1375  66   45 -1.4384163315
#> 1376  66   50 -1.2028854740
#> 1377  66   55 -0.6215584837
#> 1378  66   60 -0.0412501854
#> 1379  66   65  0.7930918025
#> 1380  66   70  1.3235896433
#> 1381  66   75  1.6288667489
#> 1382  66   80  2.0730100118
#> 1383  66   85  1.9247080041
#> 1384  66   90  1.9688488156
#> 1385  66   95  1.7728787117
#> 1386  66  100  1.0391797564
#> 1387  67    0  0.9209177255
#> 1388  67    5  0.4934392430
#> 1389  67   10  0.0453111627
#> 1390  67   15 -0.8299539811
#> 1391  67   20 -1.2132520622
#> 1392  67   25 -1.8635992417
#> 1393  67   30 -1.8292375924
#> 1394  67   35 -2.0483515802
#> 1395  67   40 -1.7274714030
#> 1396  67   45 -1.5348883840
#> 1397  67   50 -1.1047928783
#> 1398  67   55 -0.4941477180
#> 1399  67   60  0.0395167039
#> 1400  67   65  0.8575141697
#> 1401  67   70  1.4241474592
#> 1402  67   75  1.8107503884
#> 1403  67   80  1.8287802228
#> 1404  67   85  2.1032145939
#> 1405  67   90  1.8397390465
#> 1406  67   95  1.5875227560
#> 1407  67  100  1.3400557435
#> 1408  68    0  1.2321048236
#> 1409  68    5  0.6006941484
#> 1410  68   10 -0.0123792049
#> 1411  68   15 -0.8606402490
#> 1412  68   20 -1.3806803089
#> 1413  68   25 -1.3917316306
#> 1414  68   30 -2.1412454167
#> 1415  68   35 -2.1305397249
#> 1416  68   40 -1.9003943321
#> 1417  68   45 -1.8037531700
#> 1418  68   50 -1.1166651600
#> 1419  68   55 -0.5821732415
#> 1420  68   60  0.0252997966
#> 1421  68   65  0.6596247450
#> 1422  68   70  1.4240697715
#> 1423  68   75  1.6140048057
#> 1424  68   80  2.2294648511
#> 1425  68   85  2.0131729502
#> 1426  68   90  1.7744666512
#> 1427  68   95  1.5164240450
#> 1428  68  100  1.2234604395
#> 1429  69    0  0.9501095863
#> 1430  69    5  0.4727815153
#> 1431  69   10  0.0031314084
#> 1432  69   15 -0.8285080519
#> 1433  69   20 -1.3935076456
#> 1434  69   25 -1.8112527485
#> 1435  69   30 -2.0242655383
#> 1436  69   35 -1.8748973171
#> 1437  69   40 -1.9928841151
#> 1438  69   45 -1.7515961559
#> 1439  69   50 -0.9327701476
#> 1440  69   55 -0.3880633187
#> 1441  69   60  0.2998535787
#> 1442  69   65  0.8270994447
#> 1443  69   70  1.3389002271
#> 1444  69   75  1.6922160693
#> 1445  69   80  2.2932050172
#> 1446  69   85  2.0939073502
#> 1447  69   90  2.0206731546
#> 1448  69   95  1.0652850072
#> 1449  69  100  1.0398977226
#> 1450  70    0  1.1091869800
#> 1451  70    5  0.3126446472
#> 1452  70   10 -0.0760213025
#> 1453  70   15 -0.5461544023
#> 1454  70   20 -1.0150368296
#> 1455  70   25 -1.7595013153
#> 1456  70   30 -1.6696148927
#> 1457  70   35 -2.0105044942
#> 1458  70   40 -1.7478933707
#> 1459  70   45 -1.5532996763
#> 1460  70   50 -0.8980594944
#> 1461  70   55 -0.8120923983
#> 1462  70   60  0.3051071982
#> 1463  70   65  0.6749799461
#> 1464  70   70  1.1857602878
#> 1465  70   75  1.5261469286
#> 1466  70   80  2.1537566976
#> 1467  70   85  1.9563520200
#> 1468  70   90  2.0275666396
#> 1469  70   95  1.6487616848
#> 1470  70  100  1.2063898734
#> 1471  71    0  1.2647833188
#> 1472  71    5  0.6358888290
#> 1473  71   10 -0.0097882006
#> 1474  71   15 -0.7793410879
#> 1475  71   20 -1.3722432716
#> 1476  71   25 -1.6964606994
#> 1477  71   30 -1.6584303347
#> 1478  71   35 -1.9584247780
#> 1479  71   40 -1.7312189742
#> 1480  71   45 -1.5769045044
#> 1481  71   50 -1.0735619924
#> 1482  71   55 -0.3774627009
#> 1483  71   60 -0.0231506158
#> 1484  71   65  1.0420838204
#> 1485  71   70  1.2697679465
#> 1486  71   75  1.6989402589
#> 1487  71   80  2.0503903738
#> 1488  71   85  2.1877961095
#> 1489  71   90  1.8847078802
#> 1490  71   95  1.2420853769
#> 1491  71  100  1.1268937481
#> 1492  72    0  1.0929497359
#> 1493  72    5  0.4074174981
#> 1494  72   10 -0.0618886252
#> 1495  72   15 -0.6580006605
#> 1496  72   20 -1.2765319593
#> 1497  72   25 -1.6543577832
#> 1498  72   30 -2.0182323420
#> 1499  72   35 -1.9352415023
#> 1500  72   40 -1.5834457360
#> 1501  72   45 -1.6698970238
#> 1502  72   50 -0.8680281803
#> 1503  72   55 -0.3917179316
#> 1504  72   60  0.1326454006
#> 1505  72   65  0.7381901091
#> 1506  72   70  1.1575560613
#> 1507  72   75  1.3974279645
#> 1508  72   80  1.7009637111
#> 1509  72   85  1.7823885832
#> 1510  72   90  1.7308945124
#> 1511  72   95  1.4778440544
#> 1512  72  100  1.3605652232
#> 1513  73    0  1.3027422465
#> 1514  73    5  0.5315874907
#> 1515  73   10 -0.4179821905
#> 1516  73   15 -0.6475033613
#> 1517  73   20 -1.3339061404
#> 1518  73   25 -1.5588746521
#> 1519  73   30 -2.0324304241
#> 1520  73   35 -1.9925204811
#> 1521  73   40 -1.5785156064
#> 1522  73   45 -1.3500426837
#> 1523  73   50 -1.3259637768
#> 1524  73   55 -0.4393106146
#> 1525  73   60  0.2795315972
#> 1526  73   65  0.6949707462
#> 1527  73   70  1.2074664180
#> 1528  73   75  1.5605875448
#> 1529  73   80  1.7442505610
#> 1530  73   85  2.1716451975
#> 1531  73   90  1.6891580891
#> 1532  73   95  1.4670161200
#> 1533  73  100  1.4164848153
#> 1534  74    0  1.0257570664
#> 1535  74    5  0.5480972549
#> 1536  74   10  0.1543657333
#> 1537  74   15 -0.9137512761
#> 1538  74   20 -1.4311909336
#> 1539  74   25 -1.8963949191
#> 1540  74   30 -2.1663573774
#> 1541  74   35 -2.3844264355
#> 1542  74   40 -1.7120785392
#> 1543  74   45 -1.4303255659
#> 1544  74   50 -0.9673931115
#> 1545  74   55 -0.6259203881
#> 1546  74   60  0.1356639262
#> 1547  74   65  0.7743409133
#> 1548  74   70  1.1865575370
#> 1549  74   75  1.6358988047
#> 1550  74   80  2.1790826703
#> 1551  74   85  1.9892233788
#> 1552  74   90  1.9014061436
#> 1553  74   95  1.4625409727
#> 1554  74  100  1.2561327401
#> 1555  75    0  0.8035685816
#> 1556  75    5  0.4208788218
#> 1557  75   10 -0.2192115411
#> 1558  75   15 -0.7570079791
#> 1559  75   20 -1.3348238819
#> 1560  75   25 -1.6179801444
#> 1561  75   30 -1.9971366648
#> 1562  75   35 -2.2646255970
#> 1563  75   40 -2.0024770344
#> 1564  75   45 -1.1823288550
#> 1565  75   50 -1.2319332330
#> 1566  75   55 -0.5204885648
#> 1567  75   60  0.3864958939
#> 1568  75   65  0.5548637269
#> 1569  75   70  1.1153747366
#> 1570  75   75  1.6066390221
#> 1571  75   80  1.9146808747
#> 1572  75   85  1.7427775804
#> 1573  75   90  1.8308195673
#> 1574  75   95  1.5776051902
#> 1575  75  100  1.2646231780
#> 1576  76    0  0.9603517223
#> 1577  76    5  0.5883796481
#> 1578  76   10 -0.1126686364
#> 1579  76   15 -0.5574772638
#> 1580  76   20 -0.9401409122
#> 1581  76   25 -1.8270047213
#> 1582  76   30 -1.8145594347
#> 1583  76   35 -2.0215622953
#> 1584  76   40 -1.9968512645
#> 1585  76   45 -1.5964999754
#> 1586  76   50 -1.2732530502
#> 1587  76   55 -0.3711537309
#> 1588  76   60 -0.2279804376
#> 1589  76   65  0.4048220853
#> 1590  76   70  1.3272389829
#> 1591  76   75  1.8477328945
#> 1592  76   80  2.0426906832
#> 1593  76   85  1.9463185203
#> 1594  76   90  1.7109924699
#> 1595  76   95  1.5124467821
#> 1596  76  100  1.0883946386
#> 1597  77    0  1.0077823038
#> 1598  77    5  0.3987343413
#> 1599  77   10 -0.2275907489
#> 1600  77   15 -0.9029967012
#> 1601  77   20 -1.4984881342
#> 1602  77   25 -1.6508727545
#> 1603  77   30 -1.6554040678
#> 1604  77   35 -2.1146425955
#> 1605  77   40 -1.8393968900
#> 1606  77   45 -1.6752613955
#> 1607  77   50 -0.9636150700
#> 1608  77   55 -0.4879000016
#> 1609  77   60  0.2305009295
#> 1610  77   65  0.7065760288
#> 1611  77   70  1.2252856413
#> 1612  77   75  1.5018236098
#> 1613  77   80  1.8509206577
#> 1614  77   85  1.7278748501
#> 1615  77   90  2.1405119407
#> 1616  77   95  1.5669167206
#> 1617  77  100  1.2604517150
#> 1618  78    0  1.0572929563
#> 1619  78    5  0.2469599232
#> 1620  78   10 -0.0411264569
#> 1621  78   15 -0.9497048926
#> 1622  78   20 -1.8434457629
#> 1623  78   25 -1.8446360425
#> 1624  78   30 -1.8693009758
#> 1625  78   35 -2.3119413558
#> 1626  78   40 -1.9449184207
#> 1627  78   45 -1.3803330259
#> 1628  78   50 -1.0691081133
#> 1629  78   55 -0.4522516047
#> 1630  78   60  0.2606790337
#> 1631  78   65  0.8747970473
#> 1632  78   70  1.4376177182
#> 1633  78   75  1.7489372482
#> 1634  78   80  2.1217418801
#> 1635  78   85  1.7361751946
#> 1636  78   90  1.6689496399
#> 1637  78   95  1.5877946078
#> 1638  78  100  1.0263816423
#> 1639  79    0  1.1821411671
#> 1640  79    5  0.5179510344
#> 1641  79   10 -0.0588705400
#> 1642  79   15 -0.4010704556
#> 1643  79   20 -1.0972100633
#> 1644  79   25 -1.7981928311
#> 1645  79   30 -1.9501028362
#> 1646  79   35 -2.1610658077
#> 1647  79   40 -1.9784415811
#> 1648  79   45 -1.4711775771
#> 1649  79   50 -1.2037218122
#> 1650  79   55 -0.5936066211
#> 1651  79   60  0.2295897962
#> 1652  79   65  0.7434561395
#> 1653  79   70  1.1001771899
#> 1654  79   75  1.7330380420
#> 1655  79   80  2.0626953438
#> 1656  79   85  1.8538497427
#> 1657  79   90  1.5828052849
#> 1658  79   95  1.5783241042
#> 1659  79  100  1.0286147988
#> 1660  80    0  1.1969318481
#> 1661  80    5  0.2594358794
#> 1662  80   10  0.0920970332
#> 1663  80   15 -0.6569782468
#> 1664  80   20 -1.0607211499
#> 1665  80   25 -1.9361520922
#> 1666  80   30 -1.6558195554
#> 1667  80   35 -2.2837590214
#> 1668  80   40 -1.7024691782
#> 1669  80   45 -1.4948891911
#> 1670  80   50 -1.0713676878
#> 1671  80   55 -0.5999484196
#> 1672  80   60  0.0573813551
#> 1673  80   65  0.8952346936
#> 1674  80   70  1.1449582445
#> 1675  80   75  1.5621674500
#> 1676  80   80  1.8982565406
#> 1677  80   85  2.0534220982
#> 1678  80   90  1.9942954653
#> 1679  80   95  1.3146439699
#> 1680  80  100  1.1543351823
#> 1681  81    0  1.0273806386
#> 1682  81    5  0.5555273941
#> 1683  81   10  0.0464987391
#> 1684  81   15 -0.7394319212
#> 1685  81   20 -1.3423572917
#> 1686  81   25 -1.9866288856
#> 1687  81   30 -1.7995231433
#> 1688  81   35 -1.9493729598
#> 1689  81   40 -2.0509925462
#> 1690  81   45 -1.1402672801
#> 1691  81   50 -1.0220548724
#> 1692  81   55 -0.6387352413
#> 1693  81   60 -0.0019497536
#> 1694  81   65  1.0533157555
#> 1695  81   70  1.3594904616
#> 1696  81   75  1.5266479263
#> 1697  81   80  1.7795201595
#> 1698  81   85  1.9897375882
#> 1699  81   90  1.8954005046
#> 1700  81   95  1.3087207115
#> 1701  81  100  1.0787840500
#> 1702  82    0  1.3343989934
#> 1703  82    5  0.3417780445
#> 1704  82   10 -0.0006179739
#> 1705  82   15 -0.5495809049
#> 1706  82   20 -1.2003396355
#> 1707  82   25 -1.6966652183
#> 1708  82   30 -1.9527410634
#> 1709  82   35 -2.1202034323
#> 1710  82   40 -1.9130672487
#> 1711  82   45 -1.5834608455
#> 1712  82   50 -1.1767910249
#> 1713  82   55 -0.4410483504
#> 1714  82   60 -0.0826427858
#> 1715  82   65  0.4994731144
#> 1716  82   70  1.2834525424
#> 1717  82   75  1.8515429529
#> 1718  82   80  2.0220459437
#> 1719  82   85  2.0683142553
#> 1720  82   90  1.7014612956
#> 1721  82   95  1.5571302635
#> 1722  82  100  1.3953320873
#> 1723  83    0  1.0671814223
#> 1724  83    5  0.4728575795
#> 1725  83   10 -0.0325672461
#> 1726  83   15 -0.8470077628
#> 1727  83   20 -1.2743205390
#> 1728  83   25 -1.7615243690
#> 1729  83   30 -1.8250997040
#> 1730  83   35 -1.9140950374
#> 1731  83   40 -1.8902562533
#> 1732  83   45 -1.2632348405
#> 1733  83   50 -0.8616880378
#> 1734  83   55 -0.4280315536
#> 1735  83   60  0.1550099770
#> 1736  83   65  0.8002093150
#> 1737  83   70  1.3464181534
#> 1738  83   75  1.8492243504
#> 1739  83   80  2.0830110296
#> 1740  83   85  2.3071395336
#> 1741  83   90  1.8505898188
#> 1742  83   95  1.6151102290
#> 1743  83  100  0.8010706792
#> 1744  84    0  1.0988480082
#> 1745  84    5  0.4339581490
#> 1746  84   10 -0.0059122833
#> 1747  84   15 -0.6534855205
#> 1748  84   20 -1.0848055855
#> 1749  84   25 -1.6999469030
#> 1750  84   30 -1.9299642632
#> 1751  84   35 -2.1619259327
#> 1752  84   40 -1.7539055096
#> 1753  84   45 -1.6133781840
#> 1754  84   50 -0.9828356700
#> 1755  84   55 -0.6125236438
#> 1756  84   60  0.0748538222
#> 1757  84   65  0.7189280701
#> 1758  84   70  1.4300964997
#> 1759  84   75  1.5854890416
#> 1760  84   80  2.1328030381
#> 1761  84   85  1.8429224635
#> 1762  84   90  1.8869959580
#> 1763  84   95  1.3888179254
#> 1764  84  100  0.9957114746
#> 1765  85    0  0.9867572112
#> 1766  85    5  0.4414084310
#> 1767  85   10 -0.1511860160
#> 1768  85   15 -0.5382109413
#> 1769  85   20 -1.3184815741
#> 1770  85   25 -1.8310265867
#> 1771  85   30 -1.9181449494
#> 1772  85   35 -1.9230703705
#> 1773  85   40 -1.7582895350
#> 1774  85   45 -1.6474058045
#> 1775  85   50 -0.9919717369
#> 1776  85   55 -0.5090282879
#> 1777  85   60  0.3590004212
#> 1778  85   65  0.5528024839
#> 1779  85   70  1.4543655903
#> 1780  85   75  1.6824812474
#> 1781  85   80  2.0793847264
#> 1782  85   85  1.9568461298
#> 1783  85   90  1.8684507759
#> 1784  85   95  1.9323259862
#> 1785  85  100  1.1119841156
#> 1786  86    0  1.0854224515
#> 1787  86    5  0.7691810759
#> 1788  86   10 -0.1303952451
#> 1789  86   15 -0.8434348381
#> 1790  86   20 -1.3837227155
#> 1791  86   25 -1.5023882444
#> 1792  86   30 -1.8369138106
#> 1793  86   35 -2.1756645182
#> 1794  86   40 -2.0936401720
#> 1795  86   45 -1.5759720383
#> 1796  86   50 -1.1624472165
#> 1797  86   55 -0.6752078619
#> 1798  86   60  0.0062073300
#> 1799  86   65  0.7069760367
#> 1800  86   70  1.2611460139
#> 1801  86   75  1.6936216647
#> 1802  86   80  1.8804584542
#> 1803  86   85  2.2125636226
#> 1804  86   90  1.7802663197
#> 1805  86   95  1.9671965589
#> 1806  86  100  1.0881507951
#> 1807  87    0  0.9682010000
#> 1808  87    5  0.6256374259
#> 1809  87   10 -0.2104413492
#> 1810  87   15 -0.6215795540
#> 1811  87   20 -1.1606519672
#> 1812  87   25 -1.9262050715
#> 1813  87   30 -1.7075500651
#> 1814  87   35 -2.0728314385
#> 1815  87   40 -1.8671984500
#> 1816  87   45 -1.6275894391
#> 1817  87   50 -1.3263711635
#> 1818  87   55 -0.2650990994
#> 1819  87   60  0.0257848609
#> 1820  87   65  0.9311073355
#> 1821  87   70  1.3158664893
#> 1822  87   75  1.9101223241
#> 1823  87   80  1.9187079566
#> 1824  87   85  2.1235168110
#> 1825  87   90  1.8436506227
#> 1826  87   95  1.6901633718
#> 1827  87  100  1.2519519205
#> 1828  88    0  1.0674850442
#> 1829  88    5  0.5481308252
#> 1830  88   10 -0.3688368907
#> 1831  88   15 -0.9448425576
#> 1832  88   20 -1.3195945122
#> 1833  88   25 -1.8749041713
#> 1834  88   30 -1.9381448087
#> 1835  88   35 -2.0407844036
#> 1836  88   40 -2.0307479525
#> 1837  88   45 -1.2436891127
#> 1838  88   50 -1.1753370232
#> 1839  88   55 -0.6154760902
#> 1840  88   60 -0.0219206204
#> 1841  88   65  0.7336482174
#> 1842  88   70  1.3358584010
#> 1843  88   75  1.7293293211
#> 1844  88   80  1.9504810370
#> 1845  88   85  2.4063762478
#> 1846  88   90  1.9132694718
#> 1847  88   95  1.5813889232
#> 1848  88  100  1.1722411865
#> 1849  89    0  1.0081391630
#> 1850  89    5  0.6916586620
#> 1851  89   10 -0.0774676084
#> 1852  89   15 -0.7513507883
#> 1853  89   20 -1.4160033237
#> 1854  89   25 -1.6036443355
#> 1855  89   30 -2.1298524345
#> 1856  89   35 -1.9820489840
#> 1857  89   40 -1.8673732496
#> 1858  89   45 -1.5052849952
#> 1859  89   50 -1.1696429910
#> 1860  89   55 -0.8686521948
#> 1861  89   60  0.1338065021
#> 1862  89   65  0.4779418321
#> 1863  89   70  0.9329689562
#> 1864  89   75  1.6658025091
#> 1865  89   80  1.9364756858
#> 1866  89   85  1.8842724253
#> 1867  89   90  1.5157021471
#> 1868  89   95  1.5552494362
#> 1869  89  100  1.0813193505
#> 1870  90    0  1.0483525423
#> 1871  90    5  0.5448200646
#> 1872  90   10 -0.1340001714
#> 1873  90   15 -0.6456680838
#> 1874  90   20 -1.1595077673
#> 1875  90   25 -1.3775320475
#> 1876  90   30 -1.7109503136
#> 1877  90   35 -2.3821851695
#> 1878  90   40 -1.9921557228
#> 1879  90   45 -1.5203222747
#> 1880  90   50 -0.9092334709
#> 1881  90   55 -0.6165016540
#> 1882  90   60  0.0124738978
#> 1883  90   65  0.4994469061
#> 1884  90   70  1.2273511323
#> 1885  90   75  1.6310632184
#> 1886  90   80  1.9144070027
#> 1887  90   85  1.9847308819
#> 1888  90   90  1.8991977740
#> 1889  90   95  1.1848686863
#> 1890  90  100  0.9877279281
#> 1891  91    0  0.9921949119
#> 1892  91    5  0.6042874577
#> 1893  91   10 -0.2786373826
#> 1894  91   15 -0.5957755462
#> 1895  91   20 -1.4975064045
#> 1896  91   25 -1.7894424992
#> 1897  91   30 -2.0099732995
#> 1898  91   35 -2.0206880493
#> 1899  91   40 -1.9979910267
#> 1900  91   45 -1.6664485063
#> 1901  91   50 -1.0124140509
#> 1902  91   55 -0.5292427257
#> 1903  91   60  0.0126923076
#> 1904  91   65  0.9374432799
#> 1905  91   70  0.8767186272
#> 1906  91   75  1.5604641735
#> 1907  91   80  1.9122489049
#> 1908  91   85  2.0550282137
#> 1909  91   90  1.8086666372
#> 1910  91   95  1.7308653187
#> 1911  91  100  1.1097751470
#> 1912  92    0  1.1092239579
#> 1913  92    5  0.5831885689
#> 1914  92   10 -0.3253022664
#> 1915  92   15 -0.6634641848
#> 1916  92   20 -1.1873928535
#> 1917  92   25 -1.7970771362
#> 1918  92   30 -2.2410696788
#> 1919  92   35 -2.0788247576
#> 1920  92   40 -1.7939281280
#> 1921  92   45 -1.4528338593
#> 1922  92   50 -1.0908272682
#> 1923  92   55 -0.6109352436
#> 1924  92   60  0.1405762906
#> 1925  92   65  0.8825858558
#> 1926  92   70  1.2399016056
#> 1927  92   75  1.7722573250
#> 1928  92   80  1.8351873357
#> 1929  92   85  2.1854719749
#> 1930  92   90  2.1543966970
#> 1931  92   95  1.4758534785
#> 1932  92  100  1.0500987342
#> 1933  93    0  1.3514536814
#> 1934  93    5  0.2771297979
#> 1935  93   10 -0.1302929793
#> 1936  93   15 -0.8900629214
#> 1937  93   20 -1.5366518902
#> 1938  93   25 -1.3918208308
#> 1939  93   30 -1.8869571631
#> 1940  93   35 -1.9749473377
#> 1941  93   40 -1.7831725341
#> 1942  93   45 -1.5863619019
#> 1943  93   50 -1.2113675589
#> 1944  93   55 -0.4669642946
#> 1945  93   60  0.1112157961
#> 1946  93   65  0.6299134313
#> 1947  93   70  1.3970443260
#> 1948  93   75  1.7059071496
#> 1949  93   80  1.9062861120
#> 1950  93   85  1.9350369464
#> 1951  93   90  1.9604615923
#> 1952  93   95  1.7458690164
#> 1953  93  100  1.0545107534
#> 1954  94    0  1.1831944808
#> 1955  94    5  0.3676721990
#> 1956  94   10  0.1420782687
#> 1957  94   15 -0.8347190057
#> 1958  94   20 -1.2819826168
#> 1959  94   25 -1.4321359178
#> 1960  94   30 -2.0375416826
#> 1961  94   35 -2.0284234698
#> 1962  94   40 -2.0769722512
#> 1963  94   45 -1.6274058064
#> 1964  94   50 -1.1001804921
#> 1965  94   55 -0.2878290811
#> 1966  94   60 -0.2278238932
#> 1967  94   65  0.5313312064
#> 1968  94   70  1.1821757849
#> 1969  94   75  1.7069561107
#> 1970  94   80  2.0031771338
#> 1971  94   85  2.1639405308
#> 1972  94   90  1.9656377548
#> 1973  94   95  1.4744891565
#> 1974  94  100  1.2305892548
#> 1975  95    0  1.1636092986
#> 1976  95    5  0.3164202746
#> 1977  95   10 -0.1466510632
#> 1978  95   15 -0.4824516861
#> 1979  95   20 -1.0694085761
#> 1980  95   25 -1.7518591094
#> 1981  95   30 -2.1074945012
#> 1982  95   35 -2.1068905913
#> 1983  95   40 -1.6555545677
#> 1984  95   45 -1.6765900017
#> 1985  95   50 -0.9856287959
#> 1986  95   55 -0.2646908484
#> 1987  95   60  0.0252296195
#> 1988  95   65  0.4918614750
#> 1989  95   70  1.0865840685
#> 1990  95   75  1.7108482965
#> 1991  95   80  1.9435224653
#> 1992  95   85  1.9955157852
#> 1993  95   90  1.9277938328
#> 1994  95   95  1.2325008316
#> 1995  95  100  1.2981492554
#> 1996  96    0  1.0393793988
#> 1997  96    5  0.3360586914
#> 1998  96   10  0.2320713846
#> 1999  96   15 -0.8392346802
#> 2000  96   20 -1.5446749306
#> 2001  96   25 -1.5277646519
#> 2002  96   30 -2.1125780809
#> 2003  96   35 -1.9054329137
#> 2004  96   40 -1.7274091582
#> 2005  96   45 -1.8208910903
#> 2006  96   50 -1.2286412552
#> 2007  96   55 -0.6226267694
#> 2008  96   60  0.0089212983
#> 2009  96   65  1.0852016533
#> 2010  96   70  1.2489766647
#> 2011  96   75  1.4743936614
#> 2012  96   80  1.7271483539
#> 2013  96   85  1.9543513345
#> 2014  96   90  1.8824441730
#> 2015  96   95  1.3453143513
#> 2016  96  100  1.0373231914
#> 2017  97    0  1.3633336097
#> 2018  97    5  0.4052424102
#> 2019  97   10 -0.2954159945
#> 2020  97   15 -0.9171959282
#> 2021  97   20 -1.2502807798
#> 2022  97   25 -1.9279304487
#> 2023  97   30 -2.0118762218
#> 2024  97   35 -1.9770206826
#> 2025  97   40 -2.0192569381
#> 2026  97   45 -1.6213295397
#> 2027  97   50 -1.0137613267
#> 2028  97   55 -0.2993252663
#> 2029  97   60  0.0600768817
#> 2030  97   65  0.7122201307
#> 2031  97   70  1.3063327133
#> 2032  97   75  1.6356296881
#> 2033  97   80  1.9246810242
#> 2034  97   85  2.1286986310
#> 2035  97   90  1.8698308612
#> 2036  97   95  1.5646597004
#> 2037  97  100  1.1981534890
#> 2038  98    0  1.0816591601
#> 2039  98    5  0.5551979550
#> 2040  98   10 -0.0304407647
#> 2041  98   15 -0.5818339142
#> 2042  98   20 -1.2514536747
#> 2043  98   25 -1.4971334774
#> 2044  98   30 -2.0836342607
#> 2045  98   35 -1.9812021828
#> 2046  98   40 -1.9439519235
#> 2047  98   45 -1.4369176308
#> 2048  98   50 -1.1690504443
#> 2049  98   55 -0.6043970143
#> 2050  98   60  0.1487444872
#> 2051  98   65  0.6816098231
#> 2052  98   70  1.0217672993
#> 2053  98   75  1.5772613452
#> 2054  98   80  2.0942376043
#> 2055  98   85  1.9955945970
#> 2056  98   90  1.7919549904
#> 2057  98   95  1.6174364997
#> 2058  98  100  1.2790108783
#> 2059  99    0  1.0584272408
#> 2060  99    5  0.4932045870
#> 2061  99   10 -0.3280718800
#> 2062  99   15 -0.8897639007
#> 2063  99   20 -1.4663989445
#> 2064  99   25 -1.6360091076
#> 2065  99   30 -1.8131498991
#> 2066  99   35 -2.1379219321
#> 2067  99   40 -1.7733229307
#> 2068  99   45 -1.6035504712
#> 2069  99   50 -1.0252689985
#> 2070  99   55 -0.4589940176
#> 2071  99   60 -0.0454230550
#> 2072  99   65  0.8845501267
#> 2073  99   70  1.4257391765
#> 2074  99   75  1.6029707592
#> 2075  99   80  1.9443142210
#> 2076  99   85  1.8978744326
#> 2077  99   90  2.2082011032
#> 2078  99   95  1.4857033217
#> 2079  99  100  1.2302939591
#> 2080 100    0  1.0419876847
#> 2081 100    5  0.5514407363
#> 2082 100   10 -0.0428374503
#> 2083 100   15 -0.6527186146
#> 2084 100   20 -1.0963691263
#> 2085 100   25 -1.4532470660
#> 2086 100   30 -1.9515669907
#> 2087 100   35 -2.0183386128
#> 2088 100   40 -2.0658645588
#> 2089 100   45 -1.5986642771
#> 2090 100   50 -1.0937385183
#> 2091 100   55 -0.5878865454
#> 2092 100   60  0.0520201140
#> 2093 100   65  0.7630773304
#> 2094 100   70  1.3992468335
#> 2095 100   75  1.4944830189
#> 2096 100   80  1.8401948997
#> 2097 100   85  1.9987338761
#> 2098 100   90  1.9023847932
#> 2099 100   95  1.5463361966
#> 2100 100  100  1.2067560848

convert_to_wide_format

df_wide = convert_to_wide_format(df_regul)
df_wide
#> # A tibble: 100 × 22
#>       id   `0`   `5`    `10`   `15`   `20`  `25`  `30`  `35`  `40`  `45`   `50`
#>    <int> <dbl> <dbl>   <dbl>  <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>
#>  1     1 1.26  0.535  0.264  -0.603 -1.32  -1.86 -2.02 -2.48 -1.74 -1.49 -0.827
#>  2     2 0.938 0.646 -0.0371 -0.880 -0.990 -1.69 -2.24 -2.21 -2.10 -1.74 -1.10 
#>  3     3 1.08  0.438  0.291  -0.872 -1.50  -1.83 -1.83 -1.92 -1.78 -1.76 -1.12 
#>  4     4 1.39  0.455  0.0217 -0.805 -1.27  -1.63 -1.95 -2.00 -1.89 -1.68 -0.695
#>  5     5 1.44  0.595 -0.291  -0.641 -1.28  -1.67 -2.09 -1.98 -1.83 -1.52 -0.921
#>  6     6 0.988 0.480  0.0522 -0.810 -0.975 -1.71 -1.80 -2.08 -1.62 -1.64 -1.26 
#>  7     7 1.11  0.485 -0.572  -0.884 -1.24  -1.58 -1.78 -1.85 -1.97 -1.60 -1.04 
#>  8     8 1.14  0.508  0.0330 -0.735 -1.11  -1.65 -1.88 -2.02 -1.89 -1.49 -0.857
#>  9     9 1.32  0.463 -0.0604 -0.627 -1.33  -1.51 -1.71 -1.83 -1.94 -1.32 -1.46 
#> 10    10 1.18  0.572 -0.117  -0.521 -1.34  -1.87 -1.88 -1.85 -1.85 -1.63 -0.933
#> # ℹ 90 more rows
#> # ℹ 10 more variables: `55` <dbl>, `60` <dbl>, `65` <dbl>, `70` <dbl>,
#> #   `75` <dbl>, `80` <dbl>, `85` <dbl>, `90` <dbl>, `95` <dbl>, `100` <dbl>

generate_Y_df

plot(regul_time_0, beta_real_func(regul_time_0))

WARNING! Here we have to regularize X(t) before evaluating Y!

Y_df = generate_Y_df(df = df_regul, curve_type = 'num',
                     beta_real_func_or_list = beta_real_func,
                     beta_0_real = beta_0_real, NotS_ratio = NotS_ratio,
                     seed = 123)
Y = Y_df$Y_noised
head(Y_df)
#>   id    Y_real  Y_noised
#> 1  1 -201.7150 -203.2424
#> 2  2 -197.9957 -198.6230
#> 3  3 -198.3660 -194.1184
#> 4  4 -199.5417 -199.3496
#> 5  5 -197.7755 -197.4232
#> 6  6 -198.4119 -193.7382
oldpar <- par(mfrow=c(1, 2))
hist(Y_df$Y_real)
hist(Y_df$Y_noised)

par(oldpar)

Basis

basis = create_bspline_basis(start, end, nbasis, norder)
#basis = fda::create.fourier.basis(rangeval=c(start, end), nbasis=(nbasis)) 
plot(basis, main=paste0(nbasis, " Function basis"))

Naive PLS

naive_pls_obj = naivePLS(df_list = df, Y = Y_df$Y_noised,
                        regul_time_obj = regul_time,
                        curve_type_obj = 'num', 
                        id_col_obj = 'id', time_col_obj = 'time',
                        print_steps = TRUE, plot_rmsep = TRUE,
                        print_nbComp = TRUE, plot_reg_curves = TRUE)
#> ### Naive PLS ### 
#> => Input format assertions.
#> => Input format assertions OK.
#> => Data formatting.
#> => PLS model.

#> [1] "Optimal number of PLS components :  4"

Regression coefficients

for(i in 2:length(naive_pls_obj$reg_obj)){
  plot(naive_pls_obj$reg_obj[[i]])
  title(naive_pls_obj$curves_names[i-1])
}

plot(naive_pls_obj$reg_obj$Num_1, 
   xlab='regul_time', ylab='beta coefficient value', 
   main="naive pls regression coefficients")
lines(x = regul_time, y = naive_pls_obj$reg_obj$Num_1[, 2], col='blue')
lines(x = regul_time_0, y=beta_real_func(start:end, end), col='red')

FPLS

fpls_obj = funcPLS(df_list = df, Y = Y_df$Y_noised,
                   basis_obj = basis,
                   curve_type_obj = 'num',
                   regul_time_obj = regul_time,
                   id_col_obj = 'id',time_col_obj = 'time',
                   print_steps = TRUE, plot_rmsep = TRUE, 
                   print_nbComp = TRUE, plot_reg_curves = TRUE)
#> ### Functional PLS ### 
#> => Input format assertions.
#> => Input format assertions OK.
#> => Building alpha matrix.
#> => Building curve names.
#> ==> Evaluating alpha for : NumFD_1.
#> => Evaluate metrix and root_metric.
#> => plsr(Y ~ trans_alphas).

#> Optimal number of PLS components :  2 .
#> => Build Intercept and regression curves for optimal number of components.
#>  ==> Build  regression curve for : NumFD_1

#Smooth PLS

spls_obj = smoothPLS(df_list = df, Y = Y_df$Y_noised, basis_obj = basis, 
                     orth_obj = TRUE, curve_type_obj = curve_type, 
                     regul_time_obj = regul_time,
                     int_mode = int_mode, print_steps = TRUE, plot_rmsep = TRUE,
                     print_nbComp = TRUE, plot_reg_curves = TRUE)
#> ### Smooth PLS ### 
#> ## Use parallelization in case of heavy computational load. ## 
#> ## Threshold can be manualy adjusted : (default 2500) ## 
#> ## >options(SmoothPLS.parallel_threshold = 500) ## 
#> => Input format assertions.
#> => Input format assertions OK.
#> => Orthonormalize basis.
#> => Data objects formatting.
#> => Evaluate Lambda matrix.
#> ==> Lambda for : NumFD_1_value.
#> => PLSR model.
#> => Optimal number of PLS components : 9

#> => Evaluate SmoothPLS functions and <w_i, p_j> coef.
#> => Build regression functions and intercept.
#> ==> Build regression curve for : NumFD_1_value

Delta

delta_0 = spls_obj$reg_obj$Intercept
print(delta_0)
#> [1] -13.72161

delta = spls_obj$reg_obj$NumFD_1

y_lim = eval_max_min_y(f_list = list(beta_real_func, delta), 
                       regul_time = regul_time)


plot(regul_time, beta_real_func(regul_time), type='l', xlab="Beta_t",
     ylim = y_lim)
plot(delta, add=TRUE, col='blue')

#> [1] "done"

Curve comparison

cat("curve_1 : smooth PLS regression curve.\n")
#> curve_1 : smooth PLS regression curve.
cat("curve_2 : functional PLS regression curve.\n")
#> curve_2 : functional PLS regression curve.
cat("curve_3 : naive PLS regression coefficients\n")
#> curve_3 : naive PLS regression coefficients

evaluate_curves_distances(real_f = beta_real_func,
                          regul_time = regul_time, 
                          fun_fd_list = list(
                            delta, 
                            fpls_obj$reg_obj$NumFD_1,
                            approxfun(x = regul_time,
                                      y = naive_pls_obj$opti_reg_coef)
                            )
                          )
#> [1] "real_f -> curve_1 / INPROD  : 5.42764621642823 / DIST : 3.50987893386841"
#> [1] "real_f -> curve_2 / INPROD  : 6.66383089607853 / DIST : 3.40650741798858"
#> [1] "real_f -> curve_3 / INPROD  : 247.075818435331 / DIST : 68.8619172938924"
y_lim = eval_max_min_y(f_list = list(spls_obj$reg_obj$NumFD_1,
                                     fpls_obj$reg_obj$NumFD_1,
                                     approxfun(x = regul_time,
                                               y = naive_pls_obj$opti_reg_coef),
                                     beta_real_func ), 
                         regul_time = regul_time_0)
  
plot(regul_time_0, beta_real_func(regul_time_0), col = 'black', 
     ylim = y_lim, xlab = 'Time', ylab = 'Value', type = 'l')
lines(regul_time_0, approxfun(x = regul_time, 
                              y = naive_pls_obj$opti_reg_coef)(regul_time_0), 
      col = 'green')
title(paste0(names(spls_obj$reg_obj)[2], " regression curves"))
plot(spls_obj$reg_obj$NumFD_1, col = 'blue', add = TRUE)
#> [1] "done"
plot(fpls_obj$reg_obj$NumFD_1, col = 'red', add = TRUE)
#> [1] "done"
legend("bottomleft",
       legend = c("Real curve", "NaivePLS coef", 
                  "SmoothPLS reg curve", "FunctionalPLS reg curve"),
       col = c("black", "green", "blue", "red"),
       lty = 1,
       lwd = 1)

y_lim = eval_max_min_y(f_list = list(beta_real_func, 
                                     spls_obj$reg_obj$NumFD_1,
                                     fpls_obj$reg_obj$NumFD_1),
                       regul_time = regul_time)

plot(regul_time_0, beta_real_func(regul_time_0), type='l', xlab="Beta_t",
     ylim = y_lim, lwd = 2)
plot(spls_obj$reg_obj$NumFD_1, add=TRUE, col='blue', lwd = 1)
#> [1] "done"
plot(fpls_obj$reg_obj$NumFD_1, add=TRUE, col='red', lwd = 1)
#> [1] "done"
legend("bottomleft",
       legend = c("Real curve", 
                  "SmoothPLS reg curve", "FunctionalPLS reg curve"),
       col = c("black", "blue", "red"),
       lty = 1,
       lwd = 1)

evaluate_curves_distances(real_f = beta_real_func,
                          regul_time = regul_time,
                          fun_fd_list = list(spls_obj$reg_obj$NumFD_1,
                                             fpls_obj$reg_obj$NumFD_1))
#> [1] "real_f -> curve_1 / INPROD  : 5.42764621642823 / DIST : 3.50987893386841"
#> [1] "real_f -> curve_2 / INPROD  : 6.66383089607853 / DIST : 3.40650741798858"

Plot the second derivatives for the smoothness :

plot((fda::deriv.fd(expr = spls_obj$reg_obj$NumFD_1, Lfdobj = 2)), 
     col='blue')
#> [1] "done"
plot((fda::deriv.fd(expr = fpls_obj$reg_obj$NumFD_1, Lfdobj = 2)),
     add=TRUE, col='red')
#> [1] "done"
title("Second derivatives")
legend("bottomleft",
         legend = c("delta_SmoothPLS''", "delta_FPLS''"),
         col = c("blue", "red"),
         lty = 1,
         lwd = 1)

Results

train_results = data.frame(matrix(ncol = 5, nrow = 3))
colnames(train_results) = c("PRESS", "RMSE", "MAE", "R2", "var_Y")
rownames(train_results) = c("NaivePLS", "FPLS", "SmoothPLS")

test_results = train_results
print(paste0("There is ", 100*NotS_ratio, "% of noised in Y"))
#> [1] "There is 20% of noised in Y"

Train Set

Y_train = Y_df$Y_noised

# Naive
Y_hat = predict(naive_pls_obj$plsr_model, 
                ncomp = naive_pls_obj$nbCP_opti, 
                newdata = as.matrix(df_wide[, -c(1)]))
train_results["NaivePLS", ] = evaluate_results(Y_train, Y_hat)


# FPLS
Y_hat_fpls = (predict(fpls_obj$plsr_model, ncomp = fpls_obj$nbCP_opti,
                newdata = fpls_obj$trans_alphas) 
              + fpls_obj$reg_obj$Intercept
              + mean(Y))

Y_hat_fpls = smoothPLS_predict(df_predict_list = df,
                               delta_list = fpls_obj$reg_obj, 
                               curve_type_obj = curve_type,
                               int_mode = int_mode,
                               regul_time_obj = regul_time)

train_results["FPLS", ] = evaluate_results(Y_train, Y_hat_fpls)

# Smooth PLS
Y_hat_spls = smoothPLS_predict(df_predict_list = df,
                               delta_list = spls_obj$reg_obj, 
                               curve_type_obj = curve_type,
                               int_mode = int_mode,
                               regul_time_obj = regul_time)

train_results["SmoothPLS", ] = evaluate_results(Y_train, Y_hat_spls)

train_results["NaivePLS", "nb_cp"] = naive_pls_obj$nbCP_opti
train_results["FPLS", "nb_cp"] = fpls_obj$nbCP_opti
train_results["SmoothPLS", "nb_cp"] = spls_obj$nbCP_opti
train_results
#>                PRESS      RMSE       MAE         R2    var_Y nb_cp
#> NaivePLS    447.7783  2.116077  1.658857  0.8713332 87.13332     4
#> FPLS       2958.4590  5.439172  4.598839  0.1499018 14.96341     2
#> SmoothPLS 15533.5802 12.463378 11.223560 -3.4634956 13.79539     9

Test Set

Test set creation

nind_test = number_of_test_id(TTRatio = TTRatio, nind = nind)

df_test = generate_X_df(nind = nind_test, start = start, end = end, 
                        curve_type = curve_type, lambda_0 = lambda_0, lambda_1 = lambda_1,
                        prob_start = prob_start)

Y_df_test = generate_Y_df(df_test, curve_type = curve_type, 
                          beta_real_func_or_list = beta_real_func, 
                          beta_0_real, NotS_ratio, 
                          id_col = 'id', time_col = 'time')

df_test_regul = regularize_time_series(df_test, time_seq = regul_time,
                                       curve_type = curve_type)
df_test_wide = convert_to_wide_format(df_test_regul)

Evaluation


Y_test = Y_df_test$Y_noised

# Naive
Y_hat = predict(naive_pls_obj$plsr_model,
                ncomp = naive_pls_obj$nbCP_opti, 
                newdata = as.matrix(df_test_wide[, -c(1)]))
test_results["NaivePLS", ] = evaluate_results(Y_test, Y_hat)

# FPLS
Y_hat_fpls = smoothPLS_predict(df_predict_list = df_test,
                               delta_list = fpls_obj$reg_obj,
                               curve_type_obj = curve_type,
                               int_mode = int_mode, 
                               regul_time_obj = regul_time) 

test_results["FPLS", ] = evaluate_results(Y_test, Y_hat_fpls)

# Smooth PLS
Y_hat_spls = smoothPLS_predict(df_predict_list = df_test,
                               delta_list = list(delta_0, delta),
                               curve_type_obj = curve_type,
                               int_mode = int_mode, 
                               regul_time_obj = regul_time)

test_results["SmoothPLS", ] = evaluate_results(Y_test, Y_hat_spls)

test_results["NaivePLS", "nb_cp"] = naive_pls_obj$nbCP_opti
test_results["FPLS", "nb_cp"] = fpls_obj$nbCP_opti
test_results["SmoothPLS", "nb_cp"] = spls_obj$nbCP_opti
test_results
#>                PRESS      RMSE        MAE         R2     var_Y nb_cp
#> NaivePLS   222.84261  2.985583  2.3244464  -2.813555 232.68890     4
#> FPLS        31.38556  1.120456  0.9331762   0.462892  81.55013     2
#> SmoothPLS 3881.27654 12.459978 12.4399294 -65.421150  76.32215     9

Plot results

train_results
#>                PRESS      RMSE       MAE         R2    var_Y nb_cp
#> NaivePLS    447.7783  2.116077  1.658857  0.8713332 87.13332     4
#> FPLS       2958.4590  5.439172  4.598839  0.1499018 14.96341     2
#> SmoothPLS 15533.5802 12.463378 11.223560 -3.4634956 13.79539     9
test_results
#>                PRESS      RMSE        MAE         R2     var_Y nb_cp
#> NaivePLS   222.84261  2.985583  2.3244464  -2.813555 232.68890     4
#> FPLS        31.38556  1.120456  0.9331762   0.462892  81.55013     2
#> SmoothPLS 3881.27654 12.459978 12.4399294 -65.421150  76.32215     9
plot_model_metrics_base(train_results, test_results)

plot_model_metrics_base(train_results, test_results,
                        models_to_plot = c('FPLS', 'SmoothPLS'))

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.