# Case Studies

    library(MD2sample)
    cases=MD2sample::case.studies(ReturnCaseNames=TRUE)

    multiple.graphs = function (px, py,xname=" ") {
      egg::ggarrange(px, py, ncol = 2, nrow = 1)
    }

This vignette lists the case studies included in the package:

## Dim=2, equal marginals

    for(i in seq_along(cases)) {
       if(!endsWith(cases[i], "D2")) next
       tmp=case.studies(i, 2000)
       print(cases[i])
       p=tmp$param_alt[2]
       if(startsWith(cases[i],"Dalitz")) p=10*p
       dta=tmp$f(p)
       dtax=data.frame(x=dta$x[,1], y=dta$x[,2])
       dtay=data.frame(x=dta$y[,1], y=dta$y[,2])
       px=ggplot2::ggplot(dtax, ggplot2::aes(x=x, y=y))+
         ggplot2::geom_point(color="blue", alpha=0.5, size=0.5)+
         ggplot2::labs(x=expression(x[1]), y=expression(x[2]))

       py=ggplot2::ggplot(dtay, ggplot2::aes(x=x, y=y))+
         ggplot2::geom_point(color="red", alpha=0.5)+
         ggplot2::labs(x=expression(x[1]), y=expression(x[2]))
      multiple.graphs(px, py, cases[i])
    }
    #> [1] "NormalD2"

    #> [1] "tD2"

    #> [1] "UniformMixtureD2"

    #> [1] "FrankD2"

    #> [1] "ClaytonD2"

    #> [1] "GumbelD2"

    #> [1] "GalambosD2"

    #> [1] "HuslerReissD2"

    #> [1] "ClaytonGumbelD2"

    #> [1] "UniformFrankD2"

    #> [1] "ParetoSimplexD2"

    #> [1] "KhoudrajiClaytonD2"

    #> [1] "NormalUniformD2"

    #> [1] "JoeD2"

    #> [1] "DalitzCleoD2"

    #> [1] "DalitzPDGD2"

    #> [1] "DalitzBabarD2"

## Dim=2, unequal marginals

    for(i in seq_along(cases)) {
       if(!endsWith(cases[i], "M")) next
       tmp=case.studies(i, 2000)
       print(cases[i])
       p=tmp$param_alt[2]
       if(startsWith(cases[i],"Dalitz")) p=10*p
       dta=tmp$f(p)
       dtax=data.frame(x=dta$x[,1], y=dta$x[,2])
       dtay=data.frame(x=dta$y[,1], y=dta$y[,2])
       px=ggplot2::ggplot(dtax, ggplot2::aes(x=x, y=y))+
         ggplot2::geom_point(color="blue", alpha=0.5, size=0.5)+
         ggplot2::labs(x=expression(x[1]), y=expression(x[2]))

       py=ggplot2::ggplot(dtay, ggplot2::aes(x=x, y=y))+
         ggplot2::geom_point(color="red", alpha=0.5)+
         ggplot2::labs(x=expression(x[1]), y=expression(x[2]))
      multiple.graphs(px, py, cases[i])
    }
    #> [1] "NormalShiftM"

    #> [1] "NormalStretchM"

    #> [1] "UniformRotateM"

    #> [1] "UniformBetaM"

    #> [1] "TruncExponentialM"

    #> [1] "DalitzCleoM"

    #> [1] "DalitzPDGM"

    #> [1] "DalitzBabarM"

    #> [1] "FrankExponentialM"

    #> [1] "FrankLinearM"

    #> [1] "FrankNormalM"

    #> [1] "ClaytonExponentialM"

    #> [1] "ClaytonLinearM"

    #> [1] "ClaytonNormalM"

    #> [1] "GalambosExponentialM"

    #> [1] "GalambosLinearM"

    #> [1] "GalambosNormalM"

## Dim=5, equal marginals

- NormalD5: multivariate normal distribution with equal marginals.
- tD5: multivariate t distribution with 5 degrees of freedom and equal marginals.
- FrankD5: Frank cupola.
- ClaytonD5: Clayton cupola.
- GumbelD5: Gumbel copula.
- JoeD5: Joe cupola.
- UniformFrankD5: mixture of uniform and Frank cupola.
- FrankClaytonD5: mixture of Frank and Clayton cupolas.
- FrankJoeD5: mixture of Frank and Joe cupolas.

## Dim=5, unequal marginals

- UniformExponentialM5: Exponential distributions.
- FrankExponentialM5: Frank cupola with exponential marginals.
- FrankLinearM5: Frank cupola with linear marginals.
- FrankNormalM5: Frank cupola with linear marginals.
- ClaytonExponentialM5: Clayton cupola with exponential marginals.
- ClaytonLinearM5: Clayton cupola with linear marginals.
- ClaytonNormalM5: Clayton cupola with linear marginals.