Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 9 new columns ({'ratio_p75', 'ratio_med', 'n_cells', 'ratio_p25', 'stratum', 'med_yield', 'ratio_mad_med', 'n_ratio', 'share_within_25pct'}) and 17 missing columns ({'nexp_bin', 'boot_med', 'boot_mad_sd', 'fstat_kp', 'f_bin', 'boot_sd', 'good', 'sigma_base', 'boot_yield', 'ratio_mad', 'sigma_pub', 'n_exporters', 'importer', 'sigma_se_pub', 'ratio_sd', 'boot_n_ok', 'final_source'}).

This happened while the csv dataset builder was generating data using

hf://datasets/impex-machina/trade-elasticities/validation/bootstrap_se_summary.csv (at revision d8e91dd43b51ea7b4d6bbac04203fdd284522011), ['hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/bootstrap_se_cells.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/bootstrap_se_summary.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/liml_validation_tier1a.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/liml_validation_tier1b.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/se_calibration_mc_per_param.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/se_calibration_mc_summary.csv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              stratum: string
              n_cells: int64
              n_ratio: int64
              med_yield: double
              ratio_p25: double
              ratio_med: double
              ratio_p75: double
              ratio_mad_med: double
              share_within_25pct: double
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1354
              to
              {'importer': Value('int64'), 'good': Value('int64'), 'nexp_bin': Value('string'), 'f_bin': Value('string'), 'final_source': Value('string'), 'n_exporters': Value('int64'), 'fstat_kp': Value('float64'), 'sigma_pub': Value('float64'), 'sigma_se_pub': Value('float64'), 'sigma_base': Value('float64'), 'boot_n_ok': Value('int64'), 'boot_yield': Value('float64'), 'boot_med': Value('float64'), 'boot_sd': Value('float64'), 'boot_mad_sd': Value('float64'), 'ratio_sd': Value('float64'), 'ratio_mad': Value('float64')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
                  ...<4 lines>...
                  )
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 9 new columns ({'ratio_p75', 'ratio_med', 'n_cells', 'ratio_p25', 'stratum', 'med_yield', 'ratio_mad_med', 'n_ratio', 'share_within_25pct'}) and 17 missing columns ({'nexp_bin', 'boot_med', 'boot_mad_sd', 'fstat_kp', 'f_bin', 'boot_sd', 'good', 'sigma_base', 'boot_yield', 'ratio_mad', 'sigma_pub', 'n_exporters', 'importer', 'sigma_se_pub', 'ratio_sd', 'boot_n_ok', 'final_source'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/impex-machina/trade-elasticities/validation/bootstrap_se_summary.csv (at revision d8e91dd43b51ea7b4d6bbac04203fdd284522011), ['hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/bootstrap_se_cells.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/bootstrap_se_summary.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/liml_validation_tier1a.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/liml_validation_tier1b.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/se_calibration_mc_per_param.csv', 'hf://datasets/impex-machina/trade-elasticities@d8e91dd43b51ea7b4d6bbac04203fdd284522011/validation/se_calibration_mc_summary.csv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

importer
int64
good
int64
nexp_bin
string
f_bin
string
final_source
string
n_exporters
int64
fstat_kp
float64
sigma_pub
float64
sigma_se_pub
float64
sigma_base
float64
boot_n_ok
int64
boot_yield
float64
boot_med
float64
boot_sd
float64
boot_mad_sd
float64
ratio_sd
float64
ratio_mad
float64
694
4,817
10-19
F<2
step2_weighted
16
0.703051
3.208871
40.252534
3.208871
336
0.842105
2.78454
1.596568
1.496228
0.039664
0.037171
417
5,704
10-19
F<2
step2_weighted
13
0.78147
3.068724
2.26916
3.068724
315
0.789474
2.963412
1.387701
0.99694
0.611548
0.439343
417
7,228
10-19
F<2
step2_weighted
11
1.164169
4.784649
0.224006
4.784649
319
0.799499
3.696362
1.13416
1.506439
5.063084
6.724999
710
2,528
10-19
F<2
step2_weighted
12
1.481903
5.042591
2.972696
5.042591
291
0.729323
2.840922
2.38214
1.63994
0.80134
0.551668
558
2,503
10-19
F<2
step2_weighted
10
0.761458
5.065241
65.338772
5.065241
250
0.626566
4.740044
2.616234
3.39271
0.040041
0.051925
418
4,104
10-19
F<2
step2_weighted
17
1.298447
4.435295
31.701393
4.435295
263
0.659148
5.058046
2.874896
2.972309
0.090687
0.09376
496
906
10-19
F<2
step2_weighted
15
0.653652
2.851141
28.842386
2.851141
262
0.656642
3.806411
2.60059
2.375961
0.090166
0.082377
108
804
10-19
F<2
step2_weighted
10
1.58293
7.636042
88.357906
7.636042
207
0.518797
4.235278
2.778929
3.208167
0.031451
0.036309
222
7,004
10-19
F<2
step2_weighted
19
1.781484
2.921774
3.94763
2.921774
319
0.799499
3.094974
1.709499
0.686053
0.433044
0.173788
690
908
10-19
F<2
step2_weighted
16
1.154587
3.621408
2.523117
3.621408
295
0.739348
3.456676
2.214539
1.193046
0.8777
0.472846
711
2,851
10-19
F<2
step2_weighted
11
1.100333
1.534506
2.533997
1.534506
280
0.701754
1.598054
1.205763
0.373445
0.475835
0.147374
100
103
10-19
F<2
step2_weighted
15
1.823505
3.333863
3.009589
3.333863
204
0.511278
3.550978
3.144846
1.838067
1.044942
0.610737
20
6,507
10-19
F<2
step2_weighted
13
0.874834
1.708527
11.116239
1.708527
214
0.536341
1.66185
2.647347
0.50176
0.238151
0.045138
562
6,310
10-19
F<2
step2_weighted
18
0.81002
2.729576
84.68154
2.729576
283
0.709273
2.159533
2.193489
0.627681
0.025903
0.007412
454
5,807
10-19
F<2
step2_weighted
19
1.135058
2.139052
2.762489
2.139052
354
0.887218
2.232575
2.023567
0.786305
0.732516
0.284636
192
8,003
10-19
F<2
step2_weighted
14
1.439013
1.935749
0.993377
1.935749
282
0.706767
2.005727
1.567092
0.475218
1.577539
0.478386
90
1,101
10-19
F<2
step2_weighted
11
0.866911
9.954662
67.797496
9.954662
292
0.73183
4.265442
2.463496
2.291243
0.036336
0.033795
192
2,844
10-19
F<2
step2_weighted
16
0.737373
3.186226
28.120845
3.186226
237
0.593985
2.528535
1.163154
0.527802
0.041363
0.018769
533
6,507
10-19
F<2
step2_weighted
11
1.08622
1.766482
3.54464
1.766482
242
0.606516
1.732685
3.092633
0.544275
0.872482
0.153549
760
5,204
10-19
F<2
step2_weighted
12
1.175338
1.359113
3.244091
1.359113
175
0.438596
1.472046
1.470577
0.383748
0.453309
0.118291
388
3,507
10-19
F<2
step2_weighted
12
1.356594
1.573121
5.263216
1.573121
286
0.716792
1.757183
1.692998
0.264205
0.321666
0.050198
478
8,711
10-19
F<2
step2_weighted
15
1.93828
1.747453
3.648682
1.747453
289
0.724311
1.819168
2.384991
0.396413
0.653658
0.108646
51
4,503
10-19
F<2
step2_weighted
17
1.950407
2.314769
4.663979
2.314769
306
0.766917
2.382073
1.948148
0.73339
0.417701
0.157246
531
4,008
10-19
F<2
step2_weighted
16
0.55217
2.439713
25.801485
2.439713
263
0.659148
2.813174
3.025982
2.044961
0.117279
0.079257
540
4,007
10-19
F<2
step2_weighted
11
1.119659
1.64792
0.832107
1.64792
202
0.506266
1.685993
2.148936
0.440688
2.582523
0.529605
694
204
10-19
F<2
step2_weighted
10
1.77061
1.47715
1.679506
1.47715
225
0.56391
1.77029
1.474891
0.437188
0.87817
0.260307
643
7,803
10-19
F<2
step2_weighted
17
0.891206
6.270475
2.805637
6.270475
298
0.746867
6.685426
2.495803
3.168107
0.889567
1.129193
430
3,816
10-19
F<2
step2_weighted
15
1.041472
1.877469
2.248778
1.877469
218
0.546366
1.93326
1.697999
0.305964
0.755077
0.136058
854
207
10-19
F<2
step2_weighted
15
1.907774
2.649375
0.433378
2.649375
222
0.556391
2.505853
1.985235
0.467123
4.580838
1.077865
258
9,616
10-19
F<2
step2_weighted
19
0.654431
4.584611
70.271517
4.584611
306
0.766917
3.020536
2.293509
1.554179
0.032638
0.022117
90
6,804
10-19
F<2
step2_weighted
10
0.938303
6.676954
4.887622
6.676954
308
0.77193
5.53288
2.433811
2.52363
0.497954
0.516331
96
3,901
10-19
F<2
step2_weighted
12
0.981757
7.780449
11.711913
7.780449
192
0.481203
6.834915
2.75553
3.982716
0.235276
0.340057
757
8,110
10-19
F<2
step2_weighted
17
1.537788
2.768385
3.555122
2.768385
220
0.551378
2.811781
2.440746
1.144511
0.686544
0.321933
84
2,105
10-19
F<2
step2_weighted
10
0.846453
9.843003
3.730752
9.843003
338
0.847118
9.498494
3.219885
0.743532
0.863066
0.199298
152
5,504
10-19
F<2
step2_weighted
15
0.562566
6.546186
71.898929
6.546186
240
0.601504
3.318875
2.633629
2.013029
0.03663
0.027998
662
9,019
10-19
F<2
step2_weighted
18
1.307178
9.610005
43.247761
9.610005
224
0.561404
6.683093
2.942113
4.917647
0.068029
0.113709
112
8,907
10-19
F<2
step2_weighted
17
1.217997
3.084052
2.780293
3.084052
278
0.696742
2.904934
1.818019
0.956194
0.653895
0.343919
440
7,108
10-19
F<2
step2_weighted
15
1.508675
5.391581
12.620443
5.391581
302
0.756892
5.448041
2.025775
1.955828
0.160515
0.154973
862
2,516
10-19
F<2
step2_weighted
13
0.715434
2.129538
15.601826
2.129538
201
0.503759
1.945678
3.156373
0.842984
0.202308
0.054031
296
8,205
10-19
F<2
step2_weighted
15
1.726767
2.123245
4.019604
2.123245
178
0.446115
2.280877
2.087291
0.596293
0.519278
0.148346
232
8,466
10-19
F<2
step2_weighted
14
1.710058
2.209549
21.400233
2.209549
257
0.64411
2.557025
2.567363
1.470365
0.119969
0.068708
300
7,602
50+
F<2
step2_weighted
75
1.450236
1.675692
8.846574
1.675692
366
0.917293
1.97125
2.016651
0.625554
0.227958
0.070711
608
3,304
50+
F<2
step2_weighted
72
1.90871
1.528433
1.236516
1.528433
389
0.974937
1.695837
2.12333
0.587694
1.717189
0.475283
699
3,215
50+
F<2
step2_weighted
79
1.966088
3.204371
2.687791
3.204371
377
0.944862
2.876887
2.821312
1.811417
1.049677
0.673942
422
3,901
50+
F<2
step2_weighted
51
1.534126
1.425512
3.249795
1.425512
376
0.942356
1.721681
3.315136
0.640356
1.020106
0.197045
699
2,930
50+
F<2
step2_weighted
59
1.823388
7.474814
66.298413
7.474814
365
0.914787
3.904716
2.769052
2.830671
0.041766
0.042696
490
6,111
50+
F<2
step2_weighted
73
1.65177
5.539438
15.742502
5.539438
338
0.847118
3.50489
2.766087
1.849113
0.175708
0.11746
702
7,415
50+
F<2
step2_weighted
62
1.759592
6.166713
150.817593
6.166713
381
0.954887
2.624127
1.926058
1.830664
0.012771
0.012138
528
4,106
50+
F<2
step2_weighted
50
1.161469
9.637945
26.108135
9.637945
337
0.844612
4.314038
3.066883
3.526443
0.117468
0.135071
380
8,474
50+
F<2
step2_weighted
110
1.517049
3.756997
5.550865
3.756997
391
0.97995
3.745475
2.364476
1.932869
0.425965
0.348211
724
6,507
50+
F<2
step2_weighted
63
1.195047
4.983941
32.763281
4.983941
343
0.859649
3.209143
3.025099
2.185128
0.092332
0.066694
818
8,534
50+
F<2
step2_weighted
50
1.224512
2.022956
26.038721
2.022956
262
0.656642
2.635694
1.817506
1.064265
0.0698
0.040872
40
9,015
50+
F<2
step2_weighted
91
1.644364
1.562516
1.355201
1.562516
258
0.646617
1.763119
2.682867
0.559234
1.979682
0.412657
818
3,005
50+
F<2
step2_weighted
52
1.006506
1.37972
19.148761
1.37972
252
0.631579
3.784858
3.674688
3.772934
0.191902
0.197033
32
9,018
50+
F<2
step2_weighted
79
1.918301
2.00969
2.28666
2.00969
378
0.947368
2.348595
2.673357
1.386208
1.16911
0.606215
376
2,007
50+
F<2
step2_weighted
69
1.78069
1.737427
12.201569
1.737427
253
0.634085
2.250839
2.948453
1.22482
0.241645
0.100382
276
7,009
50+
F<2
step2_weighted
112
1.518604
4.820489
14.288103
4.820489
388
0.972431
5.030148
2.438352
2.548898
0.170656
0.178393
36
6,305
50+
F<2
step2_weighted
82
1.6784
9.951313
25.266091
9.951313
333
0.834586
7.450761
2.978826
3.779502
0.117898
0.149588
704
8,531
50+
F<2
step2_weighted
61
1.916573
1.924164
1.345356
1.924164
322
0.807018
2.196809
1.90096
0.800539
1.412979
0.595039
834
8,508
50+
F<2
step2_weighted
63
1.480678
1.258804
11.036649
1.258804
297
0.744361
1.596491
2.137253
0.517846
0.193651
0.046921
642
7,310
50+
F<2
step2_weighted
68
1.724612
9.573423
1,952.650586
9.573423
386
0.967419
1.456748
1.713679
0.485997
0.000878
0.000249
246
2,104
50+
F<2
step2_weighted
60
1.944235
5.080687
5.217587
5.080687
306
0.766917
4.307621
1.76733
1.233195
0.338726
0.236354
251
8,210
50+
F<2
step2_weighted
66
1.619996
4.206473
8.999497
4.206473
389
0.974937
4.465383
2.676238
2.532816
0.297376
0.28144
414
7,306
50+
F<2
step2_weighted
58
1.886778
4.143166
4.742566
4.143166
355
0.889724
4.174965
2.842415
2.539718
0.599341
0.535515
446
4,203
50+
F<2
step2_weighted
59
1.833605
6.515388
18.982029
6.515388
273
0.684211
4.301382
2.840554
3.249393
0.149644
0.171183
566
8,436
50+
F<2
step2_weighted
62
1.905191
2.087193
2.294088
2.087193
337
0.844612
1.640155
1.988115
0.477881
0.866625
0.20831
705
1,902
50+
F<2
step2_weighted
57
1.671565
9.546329
27.448915
9.546329
299
0.749373
5.804062
3.098768
4.478782
0.112892
0.163168
300
8,424
50+
F<2
step2_weighted
74
1.243264
1.157094
10.670366
1.157094
377
0.944862
2.587734
3.174988
2.119484
0.297552
0.198633
788
8,516
50+
F<2
step2_weighted
73
1.848274
1.142413
0.809179
1.142413
290
0.726817
1.235289
4.109993
0.212913
5.079216
0.263123
276
3,911
50+
F<2
step2_weighted
57
1.836806
8.873282
17.75233
8.873282
384
0.962406
7.114161
3.019364
4.278544
0.170083
0.241013
414
3,405
50+
F<2
step2_weighted
56
1.600595
5.592032
10.099955
5.592032
390
0.977444
4.446852
2.760867
2.675561
0.273354
0.264908
591
3,006
50+
F<2
step2_weighted
65
1.818453
2.463721
23.145484
2.463721
370
0.927318
2.029259
2.245379
1.007575
0.097012
0.043532
710
7,322
50+
F<2
step2_weighted
51
1.505784
1.213652
1.120575
1.213652
266
0.666667
1.703681
2.78375
0.587021
2.484217
0.523857
566
3,921
50+
F2-7
step2_weighted
82
5.781812
7.777531
3.803155
7.777531
331
0.829574
4.647375
3.1148
3.886552
0.819004
1.021928
100
2,007
50+
F2-7
step2_weighted
57
3.586012
9.551909
4.592957
9.551909
328
0.822055
5.217527
3.373027
5.075682
0.734391
1.105101
554
8,527
50+
F2-7
step2_weighted
57
5.921747
2.790126
1.120019
2.790126
398
0.997494
2.819462
1.932461
1.023629
1.725381
0.913939
724
4,301
50+
F2-7
step2_weighted
57
2.070098
1.897728
59.815632
1.897728
257
0.64411
2.287167
2.3123
0.951693
0.038657
0.01591
70
8,703
50+
F2-7
step2_weighted
59
5.008386
5.576313
7.74449
5.576313
265
0.66416
4.970517
2.29542
1.54754
0.296394
0.199825
682
7,009
50+
F2-7
step2_weighted
79
2.295439
9.696118
8.436917
9.696118
379
0.949875
5.269315
3.465542
5.470324
0.410759
0.64838
384
6,601
50+
F2-7
step2_weighted
54
2.370434
3.042544
1.187811
3.042544
355
0.889724
2.913864
2.353774
1.399742
1.981607
1.178422
300
6,211
50+
F2-7
step2_weighted
89
2.420796
1.483238
1.923553
1.483238
342
0.857143
1.39386
1.941788
0.326954
1.00948
0.169974
124
3,506
50+
F2-7
step2_weighted
104
3.70484
4.504249
2.187958
4.504249
396
0.992481
4.808628
2.01471
1.347549
0.920817
0.615894
70
8,422
50+
F2-7
step2_weighted
53
2.137055
4.292106
17.68593
4.292106
387
0.969925
1.853994
1.234396
0.886698
0.069795
0.050136
757
3,401
50+
F2-7
step2_weighted
112
5.263688
7.876202
6.137801
7.876202
380
0.952381
5.50617
2.825491
3.180169
0.460343
0.518128
404
6,301
50+
F2-7
step2_weighted
61
2.504156
4.601779
1.798209
4.601779
356
0.892231
4.445583
2.280689
2.449609
1.268312
1.36225
703
8,712
50+
F2-7
step2_weighted
51
3.609675
8.510354
1,523.423098
8.510354
199
0.498747
2.748752
3.338652
1.771372
0.002192
0.001163
31
8,481
50+
F2-7
step2_weighted
79
4.201283
6.959775
3.721394
6.959775
374
0.937343
5.616942
2.264523
2.519276
0.608515
0.676971
586
9,019
50+
F2-7
step2_weighted
54
2.382025
2.870988
5.181446
2.870988
197
0.493734
1.635938
2.944143
0.720328
0.568209
0.139021
562
3,926
50+
F2-7
step2_weighted
74
2.952183
2.40426
0.735994
2.40426
378
0.947368
2.469318
1.502731
0.855209
2.041772
1.161978
258
6,103
50+
F2-7
step2_weighted
51
4.55747
1.461107
0.074492
1.461107
253
0.634085
1.460261
2.206372
0.22888
29.618785
3.072527
414
8,708
50+
F2-7
step2_weighted
140
2.845493
3.978625
1.522668
3.978625
382
0.957393
4.111563
2.996726
2.265151
1.968076
1.48762
642
8,411
50+
F2-7
step2_weighted
51
2.412507
8.021093
6.036883
8.021093
308
0.77193
4.964335
2.89308
3.643307
0.479234
0.603508
780
7,326
50+
F2-7
step2_weighted
103
2.56268
3.684684
2.245469
3.684684
381
0.954887
3.837104
2.542878
2.003106
1.132449
0.892065
834
3,214
50+
F2-7
step2_weighted
57
3.660533
2.554751
0.38068
2.554751
376
0.942356
2.480338
1.564296
1.073948
4.109217
2.821133
398
8,512
50+
F2-7
step2_weighted
67
2.889501
5.755931
5.736991
5.755931
376
0.942356
5.264693
2.417486
2.414082
0.421386
0.420792
764
8,474
50+
F2-7
step2_weighted
70
2.690595
6.568095
18.111238
6.568095
392
0.982456
5.368448
2.322329
2.271252
0.128226
0.125406
344
4,408
50+
F2-7
step2_weighted
58
6.250128
2.245337
0.757408
2.245337
379
0.949875
2.147872
1.281698
0.341952
1.692217
0.451477
233
8,425
50+
F2-7
step2_weighted
52
2.197832
4.057865
11.999766
4.057865
270
0.676692
3.676847
3.015945
2.280226
0.251334
0.190023
528
805
50+
F2-7
step2_weighted
109
3.823867
5.581664
7.50865
5.581664
380
0.952381
9.268839
2.523513
1.084019
0.336081
0.144369
188
8,409
50+
F2-7
step2_weighted
76
2.147032
3.999968
9.144508
3.999968
368
0.922306
3.058328
2.832079
1.978245
0.309703
0.216331
End of preview.

v0.3.0 (2026-07-08). Full regeneration on the six-patch fix series (GitHub tag v0.3.0). Gamma re-levels onto Soderbery (2018) Table 2 benchmarks (gamma/(1+gamma) = 0.405 vs his 0.408): gamma median rises 0.238 -> 0.680 and the implied median export-supply elasticity is now 1.47 (the prior-scale bug in v0.2.0 biased gamma down and inflated the implied elasticity). Sigma is essentially unchanged (median 2.878). Standard errors are corrected (sigma_se was understated, rho_se overstated); the weak-IV screen now uses the minimum-eigenvalue Cragg-Donald statistic (Stock-Yogo pass 59% -> 17% -- the honest number); sigma_robust passes on 10.6% of rows. Details: docs/methodology/v020_v030_comparison.md in the GitHub repo. v0.2.0 remains available pinned at revision 7e598f6cb98e -- do not mix versions within one analysis.

2026-07-10. Added exporter-cluster bootstrap SE benchmark outputs under validation/ (bootstrap_se_summary.csv, per-cell bootstrap_se_cells.csv, 736 cells): real-data calibration of the analytic sigma_se by identification stratum and estimator branch. See docs/methodology/validation_section_draft.md (Section 4) in the GitHub repo for results and interpretation.

Trade Elasticities — BACI HS92 V202601

Importer-product-exporter trade elasticity estimates: heterogeneous import-demand elasticities (sigma) and inverse export-supply elasticities (gamma) estimated from CEPII BACI bilateral trade data, following Soderbery (2018) and Grant & Soderbery (2024).

This dataset holds the published outputs of the estimation pipeline. The code that produces them, full methodology, and replication instructions live in the GitHub repository:

https://github.com/impex-machina/trade-elasticities

License

Data in this dataset: CC BY 4.0. The pipeline code (in the GitHub repo) is licensed separately under MIT.

What's here

Outputs are organized by pillar. The authoritative index — including SHA-256 checksums and provenance — is data/manifest.csv in the GitHub repo; the table below mirrors its human-readable view.

Path Pillar Description
stage1/baci_hs92_v202601_elast_country_hs4_feenstra_sigma.rds 1 Stage 1 sigma estimates (HLIML primary, Step 2 fallback)
stage2a/baci_hs92_v202601_elast_regional_hs4_fixed_sigma.rds 1 Stage 2a regional gamma with fixed sigma
stage2b/baci_hs92_v202601_elast_country_hs4_fixed_sigma.rds 1 Stage 2b country-level gamma with shrinkage + SE
stage2b/..._summary.rds / .txt 1 Country-pair summary table (binary + human-readable)
validation/liml_validation_tier1a.csv 2 Synthetic recovery: Tier 1a sigma grid
validation/liml_validation_tier1b.csv 2 Synthetic recovery: Tier 1b sample-size convergence
validation/se_calibration_mc_summary.csv 3 SE calibration Monte Carlo (4 regimes x 3 formulas)
validation/se_calibration_mc_per_param.csv 3 Per-parameter calibration detail

The three pillars: (1) the BACI HS4 empirical core, (2) synthetic recovery of the estimator, (3) standard-error calibration. See the repo's docs/methodology/ for details.

Raw BACI data is NOT here

The raw CEPII BACI HS92 V202601 trade data is not redistributed in this dataset (it is CEPII's to distribute, and it is large). Download it directly from CEPII:

https://www.cepii.fr/CEPII/en/bdd_modele/bdd_modele_item.asp?id=37

Place it under data/raw/ in your clone of the repo. The pipeline reads it from there.

Loading the outputs in R

The recommended path is to clone the GitHub repo and use the bundled loader, which reads the manifest and verifies checksums:

# from the repo root, after renv::restore()
source("R/load_outputs.R")
load_outputs()                       # downloads all manifested files to data/derived/
x <- readRDS("data/derived/stage2b/baci_hs92_v202601_elast_country_hs4_fixed_sigma.rds")
head(x)

To pull a single file directly from this dataset without the repo:

url <- paste0("https://huggingface.co/datasets/impex-machina/",
              "trade-elasticities/resolve/main/",
              "stage2b/baci_hs92_v202601_elast_country_hs4_fixed_sigma.rds")
tmp <- tempfile(fileext = ".rds")
download.file(url, tmp, mode = "wb")
x <- readRDS(tmp)
head(x)

Citation

If you use these data, please cite the paper (DOI to be added on publication) and the underlying sources:

  • Soderbery, A. (2018). Trade elasticities, heterogeneity, and optimal tariffs. Journal of International Economics, 114, 44-62.
  • Grant, M. & Soderbery, A. (2024). Heteroskedastic supply and demand estimation: Analysis and testing. Journal of International Economics, 150, 1-23. https://doi.org/10.1016/j.jinteco.2023.103817
  • CEPII BACI World Trade Database, HS92 V202601.
Downloads last month
18