tests/testthat/_snaps/qts-prcomp.md

The function prcomp() works for QTS samples

Code
  res_pca
Output
  $x
  [[1]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99427   0.07973   0.06988   0.01334
   2     1   0.99483   0.07457   0.06763   0.01313
   3     2   0.99542   0.06931   0.06457   0.01269
   4     3   0.99602   0.06398   0.06091   0.01184
   5     4   0.99652   0.05949   0.05742   0.01070
   6     5   0.99694   0.05572   0.05403   0.00932
   7     6   0.99729   0.05275   0.05079   0.00772
   8     7   0.99757   0.05056   0.04761   0.00583
   9     8   0.99782   0.04883   0.04430   0.00366
  10     9   0.99805   0.04730   0.04071   0.00125
  # i 91 more rows

  [[2]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99379   0.08282   0.07370   0.00994
   2     1   0.99441   0.07727   0.07120   0.01036
   3     2   0.99503   0.07171   0.06829   0.01059
   4     3   0.99565   0.06598   0.06489   0.01047
   5     4   0.99625   0.06032   0.06124   0.01005
   6     5   0.99677   0.05525   0.05756   0.00927
   7     6   0.99717   0.05142   0.05417   0.00810
   8     7   0.99751   0.04849   0.05080   0.00655
   9     8   0.99780   0.04622   0.04723   0.00461
  10     9   0.99806   0.04442   0.04345   0.00237
  # i 91 more rows

  [[3]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99262   0.09948   0.06271  -0.02971
   2     1   0.99312   0.09388   0.06347  -0.02941
   3     2   0.99375   0.08743   0.06335  -0.02831
   4     3   0.99446   0.08006   0.06255  -0.02696
   5     4   0.99511   0.07312   0.06135  -0.02551
   6     5   0.99566   0.06703   0.05977  -0.02423
   7     6   0.99614   0.06183   0.05782  -0.02305
   8     7   0.99656   0.05763   0.05543  -0.02198
   9     8   0.99692   0.05426   0.05257  -0.02103
  10     9   0.99726   0.05151   0.04915  -0.02020
  # i 91 more rows

  [[4]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99281   0.09669   0.06308  -0.03165
   2     1   0.99331   0.09099   0.06403  -0.03082
   3     2   0.99390   0.08485   0.06391  -0.02969
   4     3   0.99452   0.07821   0.06324  -0.02837
   5     4   0.99514   0.07160   0.06207  -0.02695
   6     5   0.99567   0.06570   0.06052  -0.02564
   7     6   0.99613   0.06075   0.05862  -0.02447
   8     7   0.99651   0.05693   0.05633  -0.02347
   9     8   0.99685   0.05402   0.05358  -0.02258
  10     9   0.99716   0.05187   0.05014  -0.02182
  # i 91 more rows

  [[5]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99414   0.08053   0.07026   0.01615
   2     1   0.99469   0.07558   0.06822   0.01535
   3     2   0.99521   0.07085   0.06566   0.01506
   4     3   0.99574   0.06628   0.06246   0.01461
   5     4   0.99623   0.06202   0.05899   0.01379
   6     5   0.99669   0.05810   0.05541   0.01259
   7     6   0.99710   0.05466   0.05184   0.01102
   8     7   0.99743   0.05196   0.04844   0.00912
   9     8   0.99771   0.04994   0.04508   0.00691
  10     9   0.99795   0.04836   0.04157   0.00448
  # i 91 more rows

  [[6]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99326   0.08804   0.07386   0.01483
   2     1   0.99376   0.08244   0.07368   0.01449
   3     2   0.99434   0.07693   0.07184   0.01450
   4     3   0.99498   0.07123   0.06879   0.01445
   5     4   0.99561   0.06567   0.06516   0.01412
   6     5   0.99617   0.06071   0.06152   0.01353
   7     6   0.99664   0.05649   0.05800   0.01258
   8     7   0.99700   0.05351   0.05475   0.01112
   9     8   0.99730   0.05149   0.05157   0.00922
  10     9   0.99757   0.04996   0.04815   0.00687
  # i 91 more rows

  [[7]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99544   0.07361   0.03614  -0.04869
   2     1   0.99563   0.07000   0.03835  -0.04843
   3     2   0.99579   0.06682   0.04066  -0.04779
   4     3   0.99597   0.06369   0.04263  -0.04663
   5     4   0.99617   0.06045   0.04409  -0.04516
   6     5   0.99640   0.05724   0.04502  -0.04345
   7     6   0.99663   0.05414   0.04557  -0.04139
   8     7   0.99688   0.05142   0.04526  -0.03931
   9     8   0.99712   0.04916   0.04413  -0.03727
  10     9   0.99736   0.04716   0.04244  -0.03530
  # i 91 more rows

  [[8]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99506   0.06909   0.04686  -0.05375
   2     1   0.99525   0.06662   0.04888  -0.05157
   3     2   0.99547   0.06355   0.05103  -0.04893
   4     3   0.99572   0.06026   0.05258  -0.04627
   5     4   0.99599   0.05693   0.05343  -0.04370
   6     5   0.99627   0.05376   0.05346  -0.04124
   7     6   0.99656   0.05103   0.05246  -0.03897
   8     7   0.99685   0.04876   0.05047  -0.03688
   9     8   0.99715   0.04701   0.04758  -0.03491
  10     9   0.99745   0.04557   0.04389  -0.03303
  # i 91 more rows

  [[9]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99416   0.08373   0.06392   0.02332
   2     1   0.99469   0.07722   0.06345   0.02448
   3     2   0.99533   0.06977   0.06172   0.02525
   4     3   0.99605   0.06144   0.05870   0.02562
   5     4   0.99673   0.05348   0.05494   0.02533
   6     5   0.99733   0.04646   0.05084   0.02434
   7     6   0.99780   0.04115   0.04679   0.02247
   8     7   0.99816   0.03771   0.04320   0.01981
   9     8   0.99842   0.03582   0.04020   0.01636
  10     9   0.99859   0.03487   0.03794   0.01247
  # i 91 more rows

  [[10]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99410   0.08159   0.06763   0.02292
   2     1   0.99466   0.07394   0.06792   0.02377
   3     2   0.99529   0.06609   0.06654   0.02472
   4     3   0.99595   0.05819   0.06373   0.02520
   5     4   0.99660   0.05040   0.06008   0.02510
   6     5   0.99718   0.04344   0.05611   0.02428
   7     6   0.99766   0.03784   0.05219   0.02265
   8     7   0.99802   0.03411   0.04873   0.02029
   9     8   0.99829   0.03204   0.04579   0.01737
  10     9   0.99846   0.03142   0.04348   0.01395
  # i 91 more rows

  [[11]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99378   0.09127   0.06209   0.01488
   2     1   0.99427   0.08384   0.06456   0.01546
   3     2   0.99474   0.07662   0.06608   0.01613
   4     3   0.99520   0.07008   0.06629   0.01666
   5     4   0.99560   0.06501   0.06528   0.01686
   6     5   0.99600   0.06116   0.06301   0.01667
   7     6   0.99642   0.05817   0.05930   0.01604
   8     7   0.99687   0.05533   0.05442   0.01509
   9     8   0.99731   0.05265   0.04899   0.01382
  10     9   0.99771   0.05023   0.04370   0.01222
  # i 91 more rows

  [[12]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99378   0.09099   0.06243   0.01470
   2     1   0.99423   0.08331   0.06576   0.01532
   3     2   0.99467   0.07589   0.06787   0.01635
   4     3   0.99510   0.06927   0.06838   0.01739
   5     4   0.99556   0.06364   0.06695   0.01831
   6     5   0.99606   0.05855   0.06378   0.01903
   7     6   0.99659   0.05407   0.05925   0.01932
   8     7   0.99710   0.05016   0.05397   0.01914
   9     8   0.99753   0.04716   0.04864   0.01831
  10     9   0.99786   0.04505   0.04430   0.01688
  # i 91 more rows

  [[13]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99572   0.05082   0.07120   0.02989
   2     1   0.99607   0.04731   0.06851   0.03020
   3     2   0.99652   0.04346   0.06424   0.03059
   4     3   0.99690   0.04018   0.06048   0.03024
   5     4   0.99721   0.03769   0.05743   0.02918
   6     5   0.99745   0.03611   0.05520   0.02739
   7     6   0.99762   0.03522   0.05363   0.02507
   8     7   0.99777   0.03469   0.05249   0.02237
   9     8   0.99790   0.03413   0.05149   0.01936
  10     9   0.99805   0.03312   0.05041   0.01624
  # i 91 more rows

  [[14]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99533   0.05730   0.07186   0.02939
   2     1   0.99564   0.05383   0.06994   0.03028
   3     2   0.99602   0.04977   0.06725   0.03076
   4     3   0.99642   0.04603   0.06398   0.03065
   5     4   0.99679   0.04294   0.06059   0.02990
   6     5   0.99711   0.04071   0.05741   0.02849
   7     6   0.99739   0.03935   0.05452   0.02648
   8     7   0.99761   0.03863   0.05191   0.02407
   9     8   0.99782   0.03810   0.04948   0.02144
  10     9   0.99802   0.03731   0.04712   0.01868
  # i 91 more rows

  [[15]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99572   0.04763   0.07857   0.00966
   2     1   0.99606   0.04320   0.07662   0.01099
   3     2   0.99645   0.03916   0.07353   0.01212
   4     3   0.99685   0.03575   0.06964   0.01263
   5     4   0.99723   0.03312   0.06537   0.01245
   6     5   0.99757   0.03146   0.06115   0.01154
   7     6   0.99784   0.03067   0.05716   0.00996
   8     7   0.99807   0.03046   0.05351   0.00791
   9     8   0.99826   0.03047   0.05026   0.00564
  10     9   0.99841   0.03027   0.04742   0.00342
  # i 91 more rows

  [[16]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99508   0.05950   0.07884   0.00834
   2     1   0.99543   0.05417   0.07795   0.00998
   3     2   0.99583   0.04959   0.07573   0.01138
   4     3   0.99625   0.04556   0.07256   0.01228
   5     4   0.99665   0.04230   0.06889   0.01263
   6     5   0.99701   0.03996   0.06501   0.01235
   7     6   0.99731   0.03857   0.06124   0.01144
   8     7   0.99757   0.03784   0.05758   0.00995
   9     8   0.99781   0.03740   0.05400   0.00803
  10     9   0.99803   0.03681   0.05039   0.00590
  # i 91 more rows

  attr(,"class")
  [1] "qts_sample" "list"

  $tpca
  5 multivariate functional principal components estimated with 3 elements, each.
                       * * * * * * * * * *                     
  Eigenvalues:
  [1] 0.025494786 0.009011399 0.004626775 0.002175458 0.001022167

  $var_props
  [1] 0.47252278 0.16701812 0.08575308 0.04032015 0.01894495

  $total_variance
  [1] 0.05395462

  $mean_qts
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99484   0.07709   0.06585   0.00272
   2     1   0.99525   0.07180   0.06567   0.00335
   3     2   0.99570   0.06639   0.06455   0.00409
   4     3   0.99616   0.06104   0.06264   0.00461
   5     4   0.99659   0.05616   0.06023   0.00482
   6     5   0.99698   0.05198   0.05751   0.00464
   7     6   0.99731   0.04865   0.05460   0.00406
   8     7   0.99760   0.04615   0.05157   0.00310
   9     8   0.99784   0.04430   0.04844   0.00181
  10     9   0.99806   0.04283   0.04527   0.00027
  # i 91 more rows

  $principal_qts
  $principal_qts[[1]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.98157   0.03639   0.07900   0.17017
   2     1   0.98271   0.03195   0.07968   0.16406
   3     2   0.98386   0.02726   0.07949   0.15798
   4     3   0.98506   0.02253   0.07856   0.15162
   5     4   0.98627   0.01824   0.07710   0.14489
   6     5   0.98749   0.01465   0.07529   0.13776
   7     6   0.98870   0.01193   0.07322   0.13023
   8     7   0.98990   0.01009   0.07098   0.12233
   9     8   0.99106   0.00894   0.06860   0.11410
  10     9   0.99216   0.00823   0.06619   0.10565
  # i 91 more rows

  $principal_qts[[2]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.98215   0.18227   0.03969   0.02418
   2     1   0.98344   0.17493   0.04083   0.02421
   3     2   0.98473   0.16736   0.04130   0.02424
   4     3   0.98601   0.15972   0.04120   0.02393
   5     4   0.98720   0.15243   0.04079   0.02314
   6     5   0.98826   0.14574   0.04022   0.02178
   7     6   0.98919   0.13981   0.03962   0.01984
   8     7   0.98997   0.13463   0.03903   0.01734
   9     8   0.99066   0.13003   0.03849   0.01434
  10     9   0.99127   0.12575   0.03805   0.01093
  # i 91 more rows

  $principal_qts[[3]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99958   0.00594   0.00842  -0.02710
   2     1   0.99959   0.00912   0.01582  -0.02186
   3     2   0.99955   0.01158   0.02220  -0.01668
   4     3   0.99945   0.01348   0.02772  -0.01187
   5     4   0.99932   0.01524   0.03266  -0.00752
   6     5   0.99915   0.01711   0.03720  -0.00369
   7     6   0.99895   0.01927   0.04145  -0.00036
   8     7   0.99873   0.02173   0.04543   0.00248
   9     8   0.99848   0.02432   0.04917   0.00491
  10     9   0.99823   0.02681   0.05271   0.00701
  # i 91 more rows

  $principal_qts[[4]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99862   0.04023  -0.03290  -0.00762
   2     1   0.99899   0.03564  -0.02557  -0.00963
   3     2   0.99925   0.03140  -0.01945  -0.01141
   4     3   0.99943   0.02764  -0.01435  -0.01329
   5     4   0.99953   0.02475  -0.00999  -0.01538
   6     5   0.99956   0.02293  -0.00615  -0.01776
   7     6   0.99954   0.02234  -0.00269  -0.02042
   8     7   0.99947   0.02292   0.00044  -0.02332
   9     8   0.99935   0.02448   0.00327  -0.02640
  10     9   0.99919   0.02675   0.00586  -0.02953
  # i 91 more rows

  $principal_qts[[5]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99416   0.09096  -0.04161  -0.04039
   2     1   0.99603   0.07442  -0.02340  -0.04290
   3     2   0.99724   0.05847  -0.00731  -0.04514
   4     3   0.99791   0.04327   0.00686  -0.04746
   5     4   0.99813   0.02922   0.01945  -0.04998
   6     5   0.99800   0.01657   0.03071  -0.05276
   7     6   0.99759   0.00546   0.04085  -0.05576
   8     7   0.99700  -0.00413   0.04995  -0.05894
   9     8   0.99629  -0.01238   0.05808  -0.06221
  10     9   0.99552  -0.01959   0.06532  -0.06545
  # i 91 more rows


  attr(,"class")
  [1] "prcomp_qts"


Try the squat package in your browser

Any scripts or data that you put into this service are public.

squat documentation built on June 8, 2025, 11:30 a.m.