Scénario de test & Cas d'usage
Generate a large Copula dataset (100k rows) and three distinct marginal distributions (Gamma, Pareto-like using LogNormal, and Exponential) to simulate high data volume.
| 1 | |
| 2 | DATA casuser.cop_highvol; |
| 3 | call streaminit(999); |
| 4 | DO i = 1 to 100000; |
| 5 | u_auto = rand('UNIFORM'); |
| 6 | u_home = rand('UNIFORM'); |
| 7 | u_health = rand('UNIFORM'); |
| 8 | OUTPUT; |
| 9 | END; |
| 10 | |
| 11 | RUN; |
| 12 | |
| 13 | DATA casuser.marg_auto; |
| 14 | call streaminit(888); |
| 15 | DO i = 1 to 20000; |
| 16 | _DRAWID_=1; |
| 17 | val = rand('GAMMA', 5); |
| 18 | OUTPUT; |
| 19 | END; |
| 20 | |
| 21 | RUN; |
| 22 | |
| 23 | DATA casuser.marg_home; |
| 24 | call streaminit(777); |
| 25 | DO i = 1 to 20000; |
| 26 | _DRAWID_=1; |
| 27 | val = rand('LOGNORMAL', 8, 1.5); |
| 28 | OUTPUT; |
| 29 | END; |
| 30 | |
| 31 | RUN; |
| 32 | |
| 33 | DATA casuser.marg_health; |
| 34 | call streaminit(666); |
| 35 | DO i = 1 to 20000; |
| 36 | _DRAWID_=1; |
| 37 | val = rand('EXPONENTIAL'); |
| 38 | OUTPUT; |
| 39 | END; |
| 40 | |
| 41 | RUN; |
| 42 |
| 1 | |
| 2 | PROC CAS; |
| 3 | ecm.ecm / copulaSample={name='cop_highvol'} marginals={{name='marg_auto', sampleVarName='val', idVarValue='u_auto'}, {name='marg_home', sampleVarName='val', idVarValue='u_home'}, {name='marg_health', sampleVarName='val', idVarValue='u_health'}} bodySampleFrac=0.1 tailStart=0.9 tailEDFAccuracy=0.0001 OUTPUT={outSample={name='vol_output', replace=true}} seed=54321; |
| 4 | |
| 5 | RUN; |
| 6 |
The action completes efficiently. The output 'vol_output' contains a representative sample where the tail (top 10%) is densely sampled for accuracy, while the body (bottom 90%) is downsampled to 10% to save resources.