Sklar fits marginal distributions and a copula to a dataset and displays the simulated sample next to the empirical data. Taking the underlying copula theory as given, the sections below walk through how the choices in the interface map to statistical assumptions, how to read the diagnostics, and where those diagnostics mislead.

The web app holds one dataset and one fit in memory at a time without persistence; a new fit overwrites the previous one. It runs as a bounded demo with limits on file size, column count, and runtime cost. The exact bounds live in one place—the Demo limits sheet linked from About Sklar and from demo mode in the footer—which is also where to check why a request was refused.

The workspace

The Data section accepts a CSV upload alongside three synthetic built-in datasets generated with fixed seeds, which are used for all examples below so every figure is reproducible. Once a dataset is loaded, the section collapses to a single line.

The Model panel has three parts. Columns appears when the dataset has three or more columns, with the first two selected by default. Marginals assigns one transform per column (ECDF, KDE, Normal, Gamma, Beta, Weibull, or Student-$t$), with automatic or manual parameters for parametric families, plus a Do not fit marginals option for data already on $[0, 1]$. Copula selects either a Standard multivariate family with an estimation method, or a Vine with a vine structure.

After fitting, the view displays the empirical and simulated samples twice: in original units and after the marginal probability integral transform on $[0, 1]^2$, with shared column selectors when $d > 2$. Next to the scatter plots sit the fit statistics and empirical dependence measures; below them sit the fitted model and its parameter estimates.

The Sklar page after a Clayton fit on the lower-tail pair sample The Sklar page after a Clayton fit on the lower-tail pair sample
The page after a Clayton fit on the sample Lower-tail pair with ECDF marginals: model panel on the left; empirical (teal) and simulated (red) sample in original units and on the unit square; fit numbers; Kendall’s $\tau$, Spearman’s $\rho$ and the 5 % tail numbers of the pair; the fitted model.

Inspecting the data before fitting

Before running a fit, the data panel plots the scatter of the selected pair. Three visual checks determine the initial model choices: skewness or bounded support indicates which marginal families are plausible, crowding in one corner of the unit square relative to the opposite corner points to tail asymmetry in the copula, and negative dependence in any pair rules out families restricted to positive dependence.

Uploaded CSVs must contain one header row of unique column names and numeric cells only; text, dates, and empty cells are rejected with their line number. Constant columns and pairs where one column is a monotone function of the other are also rejected, since a copula cannot represent deterministic dependence. Ties are permitted and receive average ranks under the ECDF. Uploaded files remain in memory for a few minutes after last use unless deleted immediately via Remove my file. For large files, the scatter plot downsamples points for display while the fit uses every row.

Asymmetric tail dependence

The built-in sample Lower-tail pair has two skewed positive columns whose dependence is concentrated in the lower tail: Kendall’s $\tau = 0.589$, with a 5% lower-tail frequency of $0.80$ and an upper-tail frequency of $0.17$. With ECDF marginals and a Gaussian copula, the simulated sample is symmetric and misses the lower-corner concentration.

Empirical and simulated sample of the lower-tail pair under a Gaussian copula, in original units and on the unit square Empirical and simulated sample of the lower-tail pair under a Gaussian copula, in original units and on the unit square
Gaussian copula on Lower-tail pair: AIC $-517$, goodness of fit $p \le 0.01$. The simulated sample (red) is symmetric about the diagonal; the empirical sample (teal) is pinched in the lower corner.

Across standard families (lower AIC is better), the fits rank as: Clayton ($-684$), Frank ($-536$), Student-$t$ ($-535$), Gaussian ($-517$), and Gumbel ($-383$). Clayton is the only family not rejected by the goodness-of-fit test ($p = 0.76$; all others give $p \le 0.01$). The family choice follows the corner geometry: lower-tail concentration points to Clayton, upper-tail concentration to Gumbel or Joe, symmetric concentration in both tails to Student-$t$, and absence of tail concentration to Gaussian or Frank.

The Method selector chooses between maximum likelihood and Kendall’s $\tau$ inversion; Automatic uses maximum likelihood except for Joe in dimension $d > 2$. On Lower-tail pair, both methods agree closely: maximum likelihood gives $\theta = 2.70$ (AIC $-684.3$), while $\tau$ inversion gives $\theta = 2.87$ (AIC $-682.8$). Because $\tau$ inversion avoids numerical likelihood optimization, it is substantially cheaper across all families when a fit hits the demo cost limit.

Symmetric heavy tails

The Heavy tails sample has three columns generated from a Student-$t$ copula. On these data, a Gaussian copula scores AIC $-963$ and is rejected ($p \le 0.01$), whereas a Student-$t$ copula gives AIC $-1294$ ($p = 0.82$) with $2.07$ estimated degrees of freedom. In the first pair, both corners are crowded, with 5% tail frequencies of $0.70$ (lower) and $0.60$ (upper).

Student-t fit on the heavy-tails sample, first pair of columns, with the fit numbers and tail numbers Student-t fit on the heavy-tails sample, first pair of columns, with the fit numbers and tail numbers
Student-$t$ copula, maximum likelihood, on Heavy tails, columns A and B: both corners of the unit square are crowded and the simulated sample (red) reproduces them. The note under the numbers states how the fit was done.

Two estimation details appear only in the notes beneath the fit numbers. First, maximum likelihood for the Student-$t$ copula is a two-step procedure: the correlation matrix is inverted from Kendall’s $\tau$, and only the degrees of freedom are maximized by likelihood. Second, Kendall’s tau inversion does not estimate the degrees of freedom at all—it fixes them at $\nu = 4$. On Heavy tails, where the true $\nu$ is near $2$, fixing $\nu = 4$ costs $40$ AIC points ($-1254$) and causes the goodness-of-fit test to reject the fit ($p = 0.01$). Tau inversion for the Student-$t$ copula is therefore a fast exploratory check rather than a final fit.

Higher dimensions and vines

The Chain sample has four columns arranged in a Markov-like chain with heterogeneous pair structures: lower-tail dependence between A and B, upper-tail dependence between B and C, negative dependence between C and D, and conditional independence beyond that. A single multivariate family cannot capture mixed pair asymmetries: Gaussian gives AIC $-1258$ and Student-$t$ gives $-1287$, whereas a Vine copula reaches $-1598$.

Pair copulas of the R-vine fitted to the chain sample: Clayton, Joe, Gaussian and three independence pair copulas Pair copulas of the R-vine fitted to the chain sample: Clayton, Joe, Gaussian and three independence pair copulas
Pair copulas of the R-vine on Chain: Clayton ($\theta = 3.02$) for A and B, Joe ($\theta = 2.77$) for B and C, Gaussian ($\rho = -0.66$) for C and D, and independence in the higher trees.

The pair-copula table reports the family selected by AIC at each edge, tree by tree. When every pair in a tree shows no significant dependence (Kendall’s $\tau$ within two standard errors of zero), the vine truncates and notes where it stopped. On Chain, the R-vine and D-vine produce the same decomposition ($-1598$), while the C-vine forces a star-shaped first tree and fits worse ($-1564$); the vine structure itself is therefore worth testing.

Three restrictions apply to vines and standard families in the demo:

  1. No goodness-of-fit test for vines: AIC is the only selection criterion shown, as noted below the numbers.
  2. No rotated families: An upper-tail pair without an exact match is approximated by Joe, and a lower-tail pair of Gumbel type has no exact rotated counterpart.
  3. Negative dependence: Only Gaussian, Student-$t$, and Frank handle negative dependence in a vine. In standard families, Clayton, Gumbel, and Joe fail on negative or mixed-sign data (e.g., Clayton on columns C and D is refused with mean $\tau = -0.45$), and Frank for $d \ge 3$ has no negative-dependence parameterization.

Marginals and uploaded data

The ECDF is the default marginal because it makes no distributional assumption; KDE provides a smooth non-parametric alternative. Parametric marginals are useful when the marginal shape is known or when extrapolating beyond the observed range, and require attention in three cases.

Support. Gamma, Beta, and Weibull are fitted with the standard location fixed whenever all observations lie inside the standard support, and with free location (plus scale for Beta) otherwise; a note records which branch was taken. A Beta fit on data outside $(0, 1)$ therefore rescales its support to the data rather than failing.

Mis-specified marginals. When $n \ge 30$, a Kolmogorov–Smirnov test checks each parametric marginal. A result with $p < 0.01$ triggers a warning that the distribution fits poorly and that the copula is being fitted to non-uniform pseudo-observations—a signal to switch marginal family or revert to the ECDF. Similarly, a Gamma with very large shape or a Student-$t$ with very large degrees of freedom approaches a Normal distribution, and the interface flags this.

Downstream distortion. Fitting Normal marginals to the two skewed columns of Lower-tail pair triggers the marginal warning on both columns. The copula parameter shifts from $\theta = 2.70$ (ECDF) to $\theta = 3.59$, and the tail frequencies break: the lower-tail frequency becomes n/a because no transformed point falls in the lowest 5%, and the upper-tail frequency rises from $0.17$ to $0.25$. Rank correlations ($\tau$ and $\rho$) remain unchanged because they are invariant under monotone marginal transforms.

Fit numbers with the notes for two Normal marginals, and the tail numbers reading n/a and 0.25 Fit numbers with the notes for two Normal marginals, and the tail numbers reading n/a and 0.25
Clayton on Lower-tail pair with Normal marginals on both columns: AIC $-717$, the note for each column, and the tail numbers computed on the transformed sample, lower n/a and upper 0.25.

Finally, Do not fit marginals assumes the input already lies in $[0, 1]$ (such as pseudo-observations computed externally) and rejects any value outside that interval.

Interpreting the diagnostics

AIC and BIC are evaluated on the copula’s input—the data after the marginal transform. They are valid for comparing copulas under fixed marginals, not for comparing marginals. On Lower-tail pair with a Clayton copula, AIC reads $-684$ under ECDF, $-706$ under Gamma, $-717$ under Normal, and $-726$ under KDE: the Normal marginal, which the Kolmogorov–Smirnov test flags as a poor fit, scores a lower AIC than the ECDF. Marginals must be validated by their own goodness-of-fit notes first, and copulas compared by AIC/BIC second.

The goodness-of-fit $p$-value is computed by parametric bootstrap: samples are drawn from the fitted copula, converted to ranks, and refitted in the same way, and $p$ is the fraction of bootstrap statistics at least as extreme as the observed statistic. On large datasets, the test uses a fixed random subset of rows (stated in the metric’s help text). Because the number of bootstrap replicates is finite, $p$ has a positive lower bound and displays as $p \le \dots$ when no replicate exceeds the observed statistic.

A small $p$-value rejects the family; a large $p$-value does not confirm it. At a few hundred rows, the test has low power against nearby shapes: Gumbel data at $n = 300$ are rejected under a Gaussian fit in only about 17% of runs, and Student-$t$ data with $\nu = 5$ in about 26%. When one family has a large $p$-value and another has a substantially lower AIC, AIC is the sharper discriminator.

Tail numbers are empirical conditional frequencies rather than asymptotic tail-dependence coefficients: they measure the share of observations in the lowest (or highest) 5% of the first variable that also fall in the lowest (or highest) 5% of the second. Under independence, both numbers are near $0.05$. At least $\sim 100$ rows are needed to put five points in each 5% tail, and the estimate is noisy when the tail count (reported on the page) is small. Because they are evaluated on the marginal-transformed sample, poor marginals distort them directly.

Common failure modes

  • Comparing AIC across marginals: Invalid; AIC is evaluated on the pseudo-observations, not the raw data.
  • Treating a large $p$-value as proof: At moderate sample sizes ($n \sim 300$), the bootstrap test frequently fails to reject misspecified families.
  • Distorted tail numbers: Caused by a poor marginal fit (n/a or shifted frequencies), even while $\tau$ and $\rho$ stay invariant.
  • Sign restrictions: Clayton, Gumbel, and Joe reject negative or mixed dependence; Frank rejects negative dependence for $d \ge 3$.
  • Student-$t$ via $\tau$ inversion: Fixes $\nu = 4$ instead of estimating it.
  • Joe in $d > 2$: Defaults to $\tau$ inversion rather than maximum likelihood.
  • Vines: No bootstrap goodness-of-fit test in the demo, no rotated families, and sensitivity to the chosen vine structure (R, D, or C).
  • Non-monotone dependence: A pair with zero rank correlation (such as a symmetric parabola) is treated as independent by a vine.
  • Degenerate inputs: Constant columns and monotone-identical pairs are rejected on upload.

When a fit is refused

Requests exceeding the demo’s cost threshold are refused before execution with the estimated cost, and long-running fits are stopped. When that happens, you can reduce the workload by:

  • selecting fewer columns (cost grows with $d$, especially for Student-$t$ MLE and vines);
  • switching from maximum likelihood to Kendall’s $\tau$ inversion (noting the $\nu = 4$ caveat for Student-$t$);
  • subsampling rows;
  • falling back to the ECDF when a parametric marginal fails or triggers a warning; or
  • running the underlying implementation directly, which removes the demo limits and supports vine goodness-of-fit testing.