Smooth semi- and nonparametric Bayesian estimation of bivariate densities from bivariate histogram data

Similar documents
Bayesian density estimation from grouped continuous data

Multidimensional Density Smoothing with P-splines

I N S T I T U T D E S T A T I S T I Q U E B I O S T A T I S T I Q U E E T S C I E N C E S A C T U A R I E L L E S (I S B A)

Kneib, Fahrmeir: Supplement to "Structured additive regression for categorical space-time data: A mixed model approach"

Functional Estimation in Systems Defined by Differential Equation using Bayesian Smoothing Methods

Analysing geoadditive regression data: a mixed model approach

Calibration Estimation of Semiparametric Copula Models with Data Missing at Random

Computer Vision Group Prof. Daniel Cremers. 10a. Markov Chain Monte Carlo

Stat 5101 Lecture Notes

Calibration Estimation of Semiparametric Copula Models with Data Missing at Random

Modelling geoadditive survival data

Modeling and Interpolation of Non-Gaussian Spatial Data: A Comparative Study

Ronald Christensen. University of New Mexico. Albuquerque, New Mexico. Wesley Johnson. University of California, Irvine. Irvine, California

Marginal Specifications and a Gaussian Copula Estimation

Variable Selection and Model Choice in Survival Models with Time-Varying Effects

Spatially Adaptive Smoothing Splines

Semi-parametric predictive inference for bivariate data using copulas

A general mixed model approach for spatio-temporal regression data

Computational statistics

STA 4273H: Statistical Machine Learning

Stat 542: Item Response Theory Modeling Using The Extended Rank Likelihood

Estimation of Conditional Kendall s Tau for Bivariate Interval Censored Data

Introduction to Statistical Analysis

A spatio-temporal model for extreme precipitation simulated by a climate model

The Mixture Approach for Simulating New Families of Bivariate Distributions with Specified Correlations

Sparse Linear Models (10/7/13)

On Bayesian Computation

Bayesian non-parametric model to longitudinally predict churn

Introduction. Chapter 1

Part 6: Multivariate Normal and Linear Models

Model Selection. Frank Wood. December 10, 2009

STA 4273H: Statistical Machine Learning

Review. DS GA 1002 Statistical and Mathematical Models. Carlos Fernandez-Granda

Default Priors and Effcient Posterior Computation in Bayesian

Regularization in Cox Frailty Models

Maximum likelihood estimation of a log-concave density based on censored data

Fall 2017 STAT 532 Homework Peter Hoff. 1. Let P be a probability measure on a collection of sets A.

Mixture modelling of recurrent event times with long-term survivors: Analysis of Hutterite birth intervals. John W. Mac McDonald & Alessandro Rosina

An Introduction to GAMs based on penalized regression splines. Simon Wood Mathematical Sciences, University of Bath, U.K.

STA 4273H: Sta-s-cal Machine Learning

A Bayesian Approach to Phylogenetics

Bayesian Inference in GLMs. Frequentists typically base inferences on MLEs, asymptotic confidence

A short introduction to INLA and R-INLA

401 Review. 6. Power analysis for one/two-sample hypothesis tests and for correlation analysis.

Bayesian Inference. Chapter 2: Conjugate models

Bayesian linear regression

Statistical Inference and Methods

Local Likelihood Bayesian Cluster Modeling for small area health data. Andrew Lawson Arnold School of Public Health University of South Carolina

Consistent high-dimensional Bayesian variable selection via penalized credible regions

CPSC 540: Machine Learning

Bayesian Nonparametric Regression for Diabetes Deaths

Efficient adaptive covariate modelling for extremes

Principles of Bayesian Inference

Multilevel Statistical Models: 3 rd edition, 2003 Contents

ST 740: Markov Chain Monte Carlo

CSC 2541: Bayesian Methods for Machine Learning

Spatially Smoothed Kernel Density Estimation via Generalized Empirical Likelihood

Stat 516, Homework 1

NORGES TEKNISK-NATURVITENSKAPELIGE UNIVERSITET

Supplement to A Hierarchical Approach for Fitting Curves to Response Time Measurements

INTRODUCTION TO PATTERN RECOGNITION

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 2: PROBABILITY DISTRIBUTIONS

Bayesian estimation of the discrepancy with misspecified parametric models

Bivariate Degradation Modeling Based on Gamma Process

Part 8: GLMs and Hierarchical LMs and GLMs

CTDL-Positive Stable Frailty Model

Markov Chain Monte Carlo

CS242: Probabilistic Graphical Models Lecture 7B: Markov Chain Monte Carlo & Gibbs Sampling

Bayesian Methods for Machine Learning

Physics 509: Bootstrap and Robust Parameter Estimation

Machine Learning for OR & FE

ICML Scalable Bayesian Inference on Point processes. with Gaussian Processes. Yves-Laurent Kom Samo & Stephen Roberts

7. Estimation and hypothesis testing. Objective. Recommended reading

An Algorithm for Bayesian Variable Selection in High-dimensional Generalized Linear Models

Practical Bayesian Quantile Regression. Keming Yu University of Plymouth, UK

BAYESIAN DECISION THEORY

Introduction to Statistical modeling: handout for Math 489/583

LASSO-Type Penalization in the Framework of Generalized Additive Models for Location, Scale and Shape

STAT 6350 Analysis of Lifetime Data. Probability Plotting

x. Figure 1: Examples of univariate Gaussian pdfs N (x; µ, σ 2 ).

Luke B Smith and Brian J Reich North Carolina State University May 21, 2013

Bayesian covariate models in extreme value analysis

Bayesian Modeling of Accelerated Life Tests with Random Effects

UNIVERSITÄT POTSDAM Institut für Mathematik

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2013

Nonstationary spatial process modeling Part II Paul D. Sampson --- Catherine Calder Univ of Washington --- Ohio State University

Semi-parametric estimation of non-stationary Pickands functions

Integrated Likelihood Estimation in Semiparametric Regression Models. Thomas A. Severini Department of Statistics Northwestern University

Bayesian Model Selection of Regular Vine Copulas

Subject CS1 Actuarial Statistics 1 Core Principles

Bayesian Inference on Joint Mixture Models for Survival-Longitudinal Data with Multiple Features. Yangxin Huang

σ(a) = a N (x; 0, 1 2 ) dx. σ(a) = Φ(a) =

On Measurement Error Problems with Predictors Derived from Stationary Stochastic Processes and Application to Cocaine Dependence Treatment Data

12 - Nonparametric Density Estimation

Latent Variable Models for Binary Data. Suppose that for a given vector of explanatory variables x, the latent

Supporting Information for Estimating restricted mean. treatment effects with stacked survival models

Bayesian Regression Linear and Logistic Regression

Probability Distributions and Estimation of Ali-Mikhail-Haq Copula

STA 4273H: Statistical Machine Learning

Nonparametric Bayesian Methods - Lecture I

Transcription:

Smooth semi- and nonparametric Bayesian estimation of bivariate densities from bivariate histogram data Philippe Lambert a,b a Institut des sciences humaines et sociales, Méthodes quantitatives en sciences sociales, Université de Liège, Boulevard du Rectorat 7 B3), B-4000 Liège, Belgium. b Institut de statistique, biostatistique et sciences actuarielles ISBA), Université catholique de Louvain, Louvain-la-Neuve, Belgium. Abstract Penalized B-splines combined with the composite link model are used to estimate a bivariate density from an histogram with wide bins. The goals are multiple: it includes the visualization of the dependence between the two variates, but also the estimation of derived quantities like Kendall s tau, conditional moments or quantiles. Two strategies are proposed: the first one is semi-parametric with flexible margins modeled using B-splines and a parametric copula for the dependence structure ; the second one is nonparametric and is based on Kronecker products of the marginal B-splines bases. Frequentist and Bayesian estimations are described. A large simulation study quantifies the performances of both methods under different dependence structures and varying strengths of dependence, sample sizes and amounts of grouping. It suggests that Schwarz s BIC is a good tool for classifying the competing models. The density estimates are used to evaluate conditional quantiles in two applications in social and in medical sciences. Key words: Grouped data, bivariate density estimation, Bayesian P-splines, composite link model, copula.. Introduction Interval censored data are commonly encountered in practice. Approximate methods have long been used to deal with such data. Right or mid-point imputation were and still are convenient approaches as it enable to use familiar statistical techniques to analyze the data. Alternatively, strong parametric assumptions on the distribution of the response can also be made. Even if the so obtained results are potentially misleading see Law and Brookmeyer, 99, for doubly-censored data), it often provides a first series of hints for a more rigorous and detailed analysis. Although very few dedicated procedures are available in generalist statistical softwares, there exists a vast literature on the analysis of univariate interval censored data. For a survey essentially focussed on time-to-event data, we refer to Gomez et al. 004) and the recent book by Sun 006). Extensions of the Cox proportional hazards and of the accelerated failure times models were proposed see e.g. Goggins and Finkelstein, 000; Komárek and Lesaffre, 006; Zhang and Davidian, 008) with, in particular, challenging and fascinating applications in dentistry see e.g. Härkänen et al., 000; Wong et al., 005; Komárek et al., 005). Here, we shall focus on the Bayesian estimation of a bivariate density from bivariate histogram data, thereby extending the work in a univariate setting of Email address: p.lambert@ulg.ac.be Philippe Lambert) URL: http://www.statsoc.ulg.ac.be Philippe Lambert) Preprint submitted to Computational Statistics and Data Analysis May, 00

Eilers 99), Kooperberg and Stone 99), Minnotte 998), Koo and Kooperberg 000), Braun et al. 005) and Lambert and Eilers 009). More precisely, we assume that for each independent pair of observations, each component is only known to take a value in one of the predefined intervals partitioning the support of the corresponding variable. Thus, the setting is more restrictive than for bivariate interval-censored data. The estimate of the underlying bivariate density will be helpful to visualize the dependence between the two variates, but also to estimate derived quantities like Kendall s tau, conditional moments or quantiles. There is a growing literature on bivariate interval censored data. Betensky and Finkelstein 999) extends the maximum likelihood estimation of the survivor function from interval censored data Peto, 973; Turnbull, 976) to a bivariate setting. Komárek and Lesaffre 006) consider a mixture of bivariate normal distributions to specify the conditional density in accelerated failure times models. Yang et al. 008) recently explained how mixture of Polya trees Lavine, 99; Hanson, 006) can be used to estimate a bivariate density nonparametrically from interval censored data. Our two proposals based on penalized B-splines Eilers and Marx, 996) and the composite link model Thompson and Baker, 98) are described in Section : the first one combines B-splines models for the marginal densities with a parametric copula, while the second is based on Kronecker products of marginal B-splines bases. The full Bayesian model and the associated conditional posteriors are detailed in Section 3. A block-wise Metropolis-Hastings algorithm is suggested to explore the joint posterior Section 4). The merits of the method are explored in a large simulation study in Section 5. We conclude the paper with two applications and a discussion.. Penalized B-spline models for the bivariate density Assume that most of the probability mass of X, X ) is contained within the rectangle a, b ) a, b ) and that one is interested in estimating a discrete representation of the bivariate continuous density f, ) on a fine rectangular lattice {I ii = Ii Ii : i =,..., I ; i =,..., I } with Ii d d = x d i d, xd i d ), d = x d i d x d i d, ad = x d 0 and b d = x d I d d = 0, ). Then, the probability to observe X, X ) in the small rectangular cell I ii is π ii = f s, t)dsdt f u i, u i ), Ii I i where u d i d denotes the midpoint of Ii d d. Further assume that each marginal support is partitioned into J d d =, ) consecutive wide bins Jj d d = L d j d, Uj d d ) j d =,..., J d ). The available data take the form of bivariate frequencies {m jj : j d =,..., J d d =, )} associated to the wide grid defined by the partition {Jj Jj : j d =,..., J d d =, )} of the support. The marginal frequencies are denoted by {m j+ : j =,..., J } for X and {m +j : j =,..., J } for X. For simplicity, suppose for now that the limits of the wide) bins for margin d make a subset of the marginal small bins limits {x d 0,..., x d I d }. The connection between the wide and the small bins probabilities of the dth marginal can be made through the composing matrices C d = {c d j d i d } such that c d j d i d = if I id J jd and 0 otherwise. Indeed, if γ jj denotes the joint probability, s, t)dsdt, J j J j f X X

that X, X ) belongs to the wide rectangle Jj Jj, then the marginal probability that X respectively X ) belongs to Jj respectively Jj ) is γj respectively γj ) where γ j = γ j+ = I i = c j i π i+ ; γ j = γ +j = I i = c j i π +i..) Denote by Π = {π ii } and Γ = {γ jj } the I I and J J matrices of probabilities of the small and wide rectangular cells, respectively. Using the lattice format of our setting, one can show that Alternatively, one can write Γ = C ΠC ) T..) vec Γ) = C C )vec Π). This is a bivariate extension of the composite link model CLM) Thompson and Baker, 98) for density estimation Lambert and Eilers, 009). Note that a small bin i should not necessarily be fully excluded or included in the jth wide bin. Then, the concerned element c ji of the composing matrix could simply be the proportion of the small bin included in the interval... A parametric copula model with flexible margins The marginal distributions can be modelled using the strategy presented in Lambert and Eilers 009). Accordingly, consider for margin d a basis B d = {b d k d ) : k d =,..., K d } of K d B-splines associated to equidistant knots on a d, b d ). Denote by B d the I d K d matrix of B-splines evaluated at the midpoints {u d i d : i d =,..., I d } of the fine) marginal grid induced by the fine rectangular lattice described above: one has B d = {b d i d k d } with b d i d k d = b d k d u d i d ). The marginal probabilities are modelled as π i+ = e η i e η +... + e η I ; π +i = e η i e η +... + e η I with η d = η d. η d I d = B d φ d,.3) where φ d is the vector of spline parameters for margin d with identifiability constraint K d k= φd k = 0. Remembering that π i + = I f s)ds f u i ) and π +i = I f t)dt f u i ), this yields a model for the marginal densities integrated over small predefined regions). In the spirit of Eilers and Marx 996), roughness penalties are forced on the B-spline coefficients to avoid overfitting. It penalizes changes in the rth order differences of the coefficients. In a Bayesian framework, this can be done by taking the following prior for φ d Lang and Brezger, 004): pφ d τ d ) τ K d/ exp{ 0.5 τ d φ d ) T P d r φ d }, τ d Expb = 0.000), where Expb) denotes the exponential distribution with mean b and Pr d = Dr d T D d r + ɛi Kd. For example, with a penalty of order r = 3, one has 3 3 0... 0 D3 d 0 3 3... 0 =............... 0 0... 3 3 3

Then, when τ d is very large, the conditional prior for φ d tends to favour a quadratic evolution of φ d k with k, and, hence, a parabola for {ud i d, [B d φ d ] id ) : i d =,..., I d }. This yields a normal distribution for X d. The addition of a multiple of the identity matrix, ɛi d, to the matrix Dr d T D d r of rank K d r) just ensures that the precision matrix Pr d is full rank and a proper conditional prior for φ d. We refer to Lambert and Eilers 009) for more details on the chosen specification for the marginal distributions. Note that a large variance exponential prior for τ d is preferred over a gamma prior G b, b) with mean and variance b as the latter puts a large prior weight on small values for the penalty parameter. Alternatively, one might also use a mixture of gammas as a prior for τ d, see Jullion and Lambert 007). If a parametric bivariate copula C, κ) on [0, ] with dependence parameter κ K is assumed to model the dependence structure of X, X ), then one has, with respect to the upper bound of the small rectangular cells, PrX x i, X x i ) = C π i,+, π +, i κ), where π i,+ = i π i,+ ; π +, i = i= i= i π+,i. Hence, the probability that X, X ) is observed within I i I j is π ii = Prx i X x i, x i X x i ) = C π i,+, π+, i κ) + C π i, ),+ π +, i ) κ).4) C π i ),+, π +, i κ) C π i,+, π +, i ) κ). The bivariate composite link model gives, through.), the wide bin probabilities... A nonparametric model for the bivariate density If one is not ready to make a strong parametric assumption on the dependence structure, a description of the bivariate density using Kronecker products of marginal B-splines bases is an alternative. Using the same notation as in the previous section for the B-splines bases, one could take where η ii = π ii = K k = k = I i = K e ηi i I i = eηi i This can be rewritten, using matrix notation, as,.5) φ kk b k u i ) b k u i )..6) {η ii } = B ΦB ) T or equivalently : vec {η ii }) = B B )vec Φ)), where Φ = {φ kk } is the K K matrix of B-spline coefficients. As we take a large number of B-splines along each axis, one should penalize for overfitting as the proposed model would, otherwise, provide a too wiggly bivariate density. We penalize changes in the rth order differences of the B-splines along the two axes directions. More, specifically, denote by φ k: and φ :k the k th row and k th column of Φ, respectively. Then, in a frequentist setting, roughness penalties for rth order 4

changes in the row and column spline coefficients could be K Pen = 0.5 τ k = K Pen = 0.5 τ k = φ T :k P r φ :k = 0.5 τ vec Φ) T I K P r )vec Φ), φ k:p r φ T k : = 0.5 τ vec Φ) T P r I K )vec Φ), with the same definition for the penalty matrices as in the previous section. These penalties are subtracted from the log-likelihood for given values of the penalty coefficients τ and τ to define the penalized log-likelihood. In a Bayesian setting, this translates into a joint prior for Φ: where pφ τ, τ ) exp { Pen Pen } Pτ, τ ) { / exp } vec Φ)T Pτ, τ )vec Φ),.7) Pτ, τ ) = τ I K P r ) + τ P r I K ). Using the following notation for the eigenvalues of P d r, λ d [] >... > λd [K d r] > λd [K d r+] =... = λd [K d ] = ɛ, one can show that the K K eigenvalues of Pτ, τ ) are { } λ kk = τ λ [k + τ ] λ [k : k ] d =,..., K d d =, ). Therefore, the determinant of Pτ, τ ) in.7) is Pτ, τ ) = K K k = k = λ kk. In the special case where one assumes that τ = τ = τ, one has Pτ) τ K K. The number of spline parameters, K K, in the nonparametric approach is potentially very large. Therefore, one might decide to only estimate the density on a convex hull of the data, see Smith and Kohn 997) in a nonparametric bivariate regression context. Then, only a fraction of the spline parameters on the initial regular lattice would be sampled. 3. Bayesian model and conditional posteriors In the preceding section, two models based on B-splines were proposed for a bivariate density. For the first one, flexible marginal densities with a parametric copula specifying the dependence structure were assumed. The smoothness of the modelled marginal densities was forced by smoothness priors for the splines coefficients. For the second model, Kronecker products of B-splines were used to specify the joint density. Again, smoothness was ensured with a suitable prior for the splines coefficients. In both cases, the smoothness priors depend on one or more penalty coefficients. 5

Copula { C κ u, v) } K : κ range Kendall s tau Clayton max u κ + v κ ) /θ κ, 0 [, 0) 0, + ) ) +κ Frank κ log + e κu )e κv ) e κ, 0) 0, + ) No closed form Gumbel exp log u) κ + log v) κ ) /κ) κ [, + ) κ Normal Φ Φ u), Φ v); κ), ) π arcsinκ) Table : Examples of copulas with dependence parameter κ. When no closed form is available for τ, one can evaluate τ = 4 R R 0 0 C u, v) dc u, v) numerically. Notation: Φ ) is the univariate normal cdf and Φ, ; κ) the standard bivariate normal cdf with correlation κ. Parametric copula model with flexible margins Large variance priors for τ and τ are chosen: τ Expb = 0 4 ) ; τ Expb = 0 4 ), where Expb) denotes the exponential distribution with mean b. An possibly improper) uniform prior on K is taken for the dependence parameter κ of the parametric copula, see Table for some examples. Therefore, with the extra identifiability constraint that K d k d = φd k d = 0 as φ d + constant) and φ d provide exactly the same cell probabilities), the full Bayesian model is given by M,..., M JJ κ, φ, φ ) Multm ++ ; γ,..., γ JJ ), pφ d τ d ) τ K d/ exp{ 0.5 τ d φ d ) T P d r φ d }, τ d Expb d = 0 4 ) d =, ), pκ) I K κ), where γ jj is related to κ, φ and φ through.3),.4) and.). Denote the likelihood by Lφ, φ, κ D) J J j = j = γ mj j j j, 3.) where D stands for the available data. Then, the conditional posteriors are pφ d φ d, κ, τ d, D) Lφ, φ, κ D) τ d ) Kd/ exp ) τ d φ d ) T P dr φ d, pκ φ, φ, D) Lφ, φ, κ D) I K κ), 3.) ) τ d φ d, D) G + K d /, b d + φ d ) T Pr d φ d / d =, ), where φ d refers to φ respectively φ ) when d = respectively d = ). These expressions will be used below to set up a Metropolis-within-Gibbs algorithm. Nonparametric model for the bivariate density Like in the preceding semi-parametric specification, large variance priors for τ and τ are chosen: τ Expb = 0 4 ) ; τ Expb = 0 4 ), where Expb) denotes the exponential distribution with mean b. 6

Then, with the extra identifiability constraint that K K k = k φ = k k = 0 as φ d +constant) and φ d provide exactly the same cell probabilities), the full Bayesian model is given by M,..., M JJ Φ) Multm ++ ; γ,..., γ JJ ), pφ τ, τ ) Pτ, τ ) { / exp } vec Φ)T Pτ, τ )vec Φ), τ d Expb d = 0 4 ) d =, ), where γ jj is related to Φ through.5),.6) and.). If one denotes the likelihood by LΦ D) J J j = j = γ mj j j j, 3.3) then the conditional posteriors are { pφ τ, τ, D) LΦ D) exp } vec Φ)T Pτ, τ )vec Φ), 3.4) pτ Φ, τ, D) Pτ, τ ) / exp { τ b + )} vec Φ)T I K Pr )vec Φ), pτ Φ, τ, D) Pτ, τ ) / exp { τ b + )} vec Φ)T Pr I K )vec Φ). In the special case where one takes the same roughness penalty for the two axes, τ = τ = τ and hyperprior parameters b = b = b), one has { pφ τ, D) LΦ D) exp } vec Φ)T Pτ, τ)vec Φ), 3.5) τ Φ, D) G + K K, b + vec ) Φ)T I K P r + P r ) I K vec Φ). These equations will be used below to set up a Metropolis-within-Gibbs algorithm. 4. Exploring the joint posterior distribution Markov chain Monte Carlo MCMC) will be used to generate from the joint posterior. At each iteration, the spline and the penalty parameters will be sampled from their conditional distributions using a full Metropolis or a Metropolis-within- Gibbs algorithm. As the variance-covariance matrix of some of the proposals is related to an initial frequentist estimate, we shall first discuss how one can choose the initial conditions. Then, some details about the MCMC algorithm will be provided. 4.. Starting values Parametric copula model with flexible margins Frequentist estimates for the marginal parameters can be obtained for given values of the penalty parameters. Following Lambert and Eilers 009, Section 3.), estimates for the splines parameters can be obtained separately for each margin. Indeed, these quantities can be seen as the regression parameters of a composite link model. Then, for the dth margin, one has a polytomous logistic regression of the marginal frequencies m d, m = m +,..., m J+) ; m = m +,..., m +J ), 7

on a working design matrix X d = W d ) C d H d B d, with where H d = diagm ++ π d π d )), W d = diagm ++ γ d γ d )), π = π +,..., π I+) and γ = γ +,..., γ J+), π = π +,..., π +I ) and γ = γ +,..., γ +J ). The well-known scoring algorithm leads, at iteration t + ), to φ d t+ = Xt d ) T Wt d Xt d ) X d t ) T m d m ++ γ d t + Wt d Xt d φ t ), the subscript t referring to the current approximation. With the roughness penalty, the scoring algorithm becomes: φ d t+ = Xt d ) T Wt d Xt d + τ d Pr d ) X d t ) T m d m ++ γ d t + Wt d Xt d φ t ). 4.) At convergence, it yields the conditional maximum penalized likelihood estimate MPLE) φ d of φ d. Then, for a given τ d, the variance-covariance of the conditional MPLE is given by Σ d τ = X ) d T W X d d d + τ d Pr d ). 4.) Cross-validation or information criteria like the AIC or BIC Eilers and Marx, 996) can be used to select the penalty parameters τ and τ. These estimates could be used as initial conditions for the splines parameters in an MCMC algorithm. The effective dimension of the smoother can be computed from the trace of the hat matrix, tr X d X d ) T W X d d + τ d Pr d ) ) X d ) T, 4.3) as suggested generically by Hastie and Tibshirani 990) and specifically in the CLM context by Eilers 007). Nonparametric model for the bivariate density The same strategy can be used in the nonparametric setting as soon as one realizes that estimating Φ from the matrix of frequencies {m jj } is equivalent to estimating vec Φ) from the vector of frequencies vec {m jj }). Consider Kronecker versions of the composing and B-splines matrices, and define X = W CHB where C = C C, B = B B, H = diag {m ++ vec Π) vec Π)}, W = diag {m ++ vec Γ) vec Γ)}. Then, conditionally on the penalties τ and τ, the conditional MPLE for Φ can be obtained iteratively from vec Φ t+ ) = X T t W t X t + Pτ, τ ) ) X T t vec {m jj }) m ++ vec Γ t ) + W t X t vec Φ t )). 4.4) At convergence, the variance-covariance of the conditional MPLE, vec Φ ), is given by Σ τ,τ = X T W X + Pτ, τ ) ). 4.5) Again, cross-validation or information criteria can be used to select the penalty parameters. The effective dimension of the smoother can be computed from the trace of the hat matrix, tr X t X T t W t X t + Pτ, τ ) ) ) X T t. 4.6) 8

4.. Sampling algorithm Whatever the selected model, a blockwise Metropolis-Hastings algorithm is proposed. Starting values for the parameters can be obtained from Section 4.. These frequentist estimators for the spline parameters and their variance-covariance matrices are good approximations to the mode and to the variance-covariance of the conditional posterior distribution of the spline parameters. Therefore, it makes sense to use this information in a Metropolis algorithm rather than starting from arbitrary initial conditions and making unstructured proposals in such a large dimensional setting. Parametric copula model with flexible margins For values of the penalty parameters, τ 0 and τ 0, selected with BIC, one can use 4.) to obtain initial values for the spline parameters, φ 0 and φ 0. At iteration m of the MCMC algorithm, given the state of chain at the end of the previous iteration, θ m = φ m, φ m, κ m, τ m, τ m ) :. Multivariate Metropolis steps for the spline parameters: Generate φ m from pφ φ m, κ m, τm, D), see 3.), using a Metropolis step based on the multivariate normal proposal distribution N K φ m, δ Σ, ) τ0 where Σ is the variance-covariance matrix of the conditional MPLE of τ0 φ, see 4.), and δ > 0 a tuning parameter selected to achieve the desired acceptance rate 0%, say). Proceed similarly to generate φ m from pφ φ m, κ m, τ m, D).. Univariate Metropolis step for the copula parameter: generate κ m from pκ φ m, φ m, D), see 3.), using a Metropolis step based on the normal proposal distribution N κ m, σκ) I K κ), where σκ is selected to achieve the desired acceptance rate 40%, say). ) 3. Gibbs step: Generate τm d from G + K d /, b d + φ d m) T Pr d φ d m/. Nonparametric model for the bivariate density For values of the penalty parameters, τ 0 and τ 0, selected with BIC, one can use 4.4) to obtain initial values for the spline parameters, Φ 0. At iteration m of the MCMC algorithm, given the state of the chain at the end of the previous iteration, θ m = Φ m, τ m, τ m ) :. Multivariate Metropolis step: Generate a proposal vec Φ) from p Φ τ m, τm, D ) ), see 3.4), using the multivariate normal distribution N KK vec Φ) m, δσ τ 0,τ0 where Σ τ 0,τ0 is the variance-covariance matrix of the conditional MPLE of vec Φ), see 4.5), and δ > 0 a tuning parameter selected to achieve the desired acceptance rate 0%, say).. Univariate Metropolis steps for the penalty parameters: Generate τm on the log-scale from pτ Φ m, τm, D), see 3.4), using ) a Metropolis step based on the normal distribution N log τ m, στ, where στ is selected to achieve the desired acceptance rate 40%, say). Proceed similarly to generate τ m from pτ Φ m, τ m, D). In the special case where one assumes that τ = τ = τ, these two Metropolis steps are replaced by a Gibbs step: given Φ = Φ m, generate τ m from the gamma distribution in 3.5). 9

For both models, after a sufficiently large number of burnin iterations, the generated sequence of θ m can be seen as a random sample from the joint posterior distribution. For simplicity, we shall denote the sequence after the burnin by {θ m : m =,..., M}, M being the length of the final chain. The choice of the tuning parameters in the Metropolis steps, δ d, σ τ d =, ), d δ and σκ can be automated Haario et al., 00) during the burnin. 5. Simulation study A simulation study was made to evaluate the performances of these two models to estimate a bivariate density. Margin was assumed to be a unimodal Beta3,5) distribution and margin to be a bimodal) mixture of a Beta3,0) with weight 0.6) and of a Beta,8) with weight 0.4). S = 00 datasets of size n = 00 and n = 000 were generated from bivariate distributions with the above margins and a dependence structure corresponding to a Clayton, Frank or Gumbel copula with a small τ = 0.), medium τ = 0.5) or large τ = 0.7) Kendall s tau. For each dataset, grouped rectangle) data were obtained by partitioning each marginal support naively) taken to be 0.5,.00) into J = J =) 6, 8, bins of equal widths, yielding J J =) 36, 64 or 44 rectangles on 0.5,.00) with associated frequencies {n j,j : j =,..., J ; j =,..., J }. For each of these 800 = 3 3 S = 800) datasets, types of models were fitted to estimate the underlying density: Model : a parametric copula Clayton, Frank, Gumbel or normal) model with unknown dependence parameter and smooth nonparametric margins, see Section.. Forty-eight small bins of equal width, 0 equidistant knots and a penalty of order 3 were considered for each margin, yielding K d = 3 spline parameters φ d for margin d d =, ). Model : the nonparametric model of Section. based on the bivariate extension of the composite link model. Forty-eight small bins of equal width, 0 B-splines associated to equidistant knots and a penalty of order 3 were considered for each margin, yielding K K = 0 spline parameters Φ = {φ kk }. Samples from the respective joint posteriors were obtained using the strategy described in Section 4. For Model, the length of the chain was M = 0000 after a burnin of 000. Such a short burnin turned to be suitable as the initial conditions were carefully chosen and the dependence structure of the conditional posteriors was well approximated by Σ d, see Section 4.. τ0 d For Model, a first chain of length 50000 following a burnin of 0000 iterations was built to improve the initial values for the two penalty parameters τ and τ necessary to estimate the variance-covariance matrix of the conditional MPLE. Then, that empirical variance-covariance matrix was used in the multivariate Metropolis step to build a final chain of length 00000 after an extra burnin of 0000 iterations). At iteration m of the MCMC algorithm: For Model : given θ m = φ m, φ m, τ m, τ m), the corresponding marginal densities at the small bin midpoints are f u i θ m ) = π i+φ m) and f u i θ m ) = π +i φ m), see.3), and the joint density at the small rectangle midpoints is f u i, u i θ m ) = π ii φ m, φ m, κ m ), see.4). The estimated marginals 0

were computed to be ˆf d u d i d ) = M M m= f du d i d θ m ) for margin d, while the estimated bivariate density was computed as ˆf u i, u i ) = M M m= f u i, u i θ m ). For the copula parameter, the estimate of the posterior mean is ˆκ = M M m= κ m. For Model : given θ m = Φ m, τm, τm), the joint density at the small rectangle midpoints is f u i, u i θ m ) = π ii Φ m ). An estimate for the joint density is given by ˆf u i, u i ) = M M m= f u i, u i θ m ), see.5) and.6). For each density estimate and each simulated dataset, one can compute the integrated squared error: ISE = 0 I I 0 I f x, y) ˆf x, y)) f x, y)dxdy I i = i = f u i, u i ) ˆf u i, u i ) ) f u i, u i ). The estimate with the smallest ISE is to be preferred. The square root of the) mean value of ISE RMISE) over the S = 00 simulated datasets is reported in the left panel of Tables, 3 and 4 when the numbers of bigs bins, J = J, are, 8 and 6, respectively. The copula used for data generation is indicated in the row labels for low, medium or large Kendall s tau), whereas the assumption made for the dependence structure of the fitted density corresponds to the column label C =Clayton, F =Frank, G =Gumbel, N =Normal and NP =nonparametric). The smallest and statistically insignificantly different values of RMISE are in bold face, while the second smallest values) is are) underlined when there is only one bolded value. Not surprisingly, the parametric model making the correct assumption for the copula is always associated to the set of) smallest RMISE values). Whatever the number of big bins or sample size, the second best fit can be associated to a parametric copula or to the nonparametric estimate. There is no clear prior indication whether one should prefer a parametric or a nonparametric estimate. RMISE was also estimated for the frequentist density estimator used to produce the initial values in a given MCMC algorithm, see Section 4. and Table 5. Comparing these values with their Bayesian counterparts, one concludes that: when the copula model is correctly specified, the performances of the Bayesian and frequentist semi-parametric density estimators are most of the time) very similar; when the wrong choice is made for the copula, the Bayesian semi-parametric estimator tends to perform better. This is particularly marked when the information is sparse smaller number of big bins or/and smaller sample size). One possible explanation for that is in the choice of the frequentist estimator for the copula parameter which value was chosen to correspond to the observed Kendall s tau-b. This nonparametric estimator has a very small bias. However, combined with the wrong parametric copula, the corresponding density estimator most likely has a larger RMISE than if it were based on the maximum likelihood estimator for the copula parameter; the nonparametric Bayesian density estimator nearly always outperforms the frequentist nonparametric estimator. Note that our goal was not produce an outstanding frequentist estimator, but rather to produce reasonable initial values for the MCMC algorithm. Obvious improvements can be discussed, but it is not the goal of the paper.

Bayesian model for the density Data C F G N NP C F G N NP copula τ RMISE n = 000) BIC rank n = 000) C 0. 0.33 0.5 0.57 0.48 0.4.0 3.0 4.8. 4. 0.5 0.87.86.8.94.4.0 3.6 5.0 3.3.0 0.7.69 4. 4.99 4.6 3.74.0 3.0 5.0 4.0.0 F 0. 0.39 0.9 0.38 0.3 0.35 3.7. 3.3.0 4.8 0.5 0.83 0.47 0.66 0.63 0.5 4.9.0 4..6.4 0.7.43 0.7 0.93.0 0.95 5.0.0 4.0 3.0.0 G 0. 0.39 0.34 0.30 0.30 0.36 4.8 3..0.0 4. 0.5 0.95 0.57 0.4 0.5 0.49 5.0 4.0.0..8 0.7.86.06 0.7 0.96 0.93 5.0 4.0.0.4.6 RMISE n = 00) BIC rank n = 00) C 0. 0.57 0.67 0.75 0.66 0.7..8 4.. 4.7 0.5.35.9.54.33.36.0.7 5.0.6 3.7 0.7 3. 5.8 5.86 5.64 5.7.0.3 5.0 3. 3.5 F 0. 0.63 0.57 0.65 0.60 0.64 3..6 3.4. 4.6 0.5.03 0.8.04 0.96 0.9 4..5 4.0.4.9 0.7.77.38.57.6.55 4.3. 4.3.8.5 G 0. 0.6 0.53 0.53 0.53 0.59 4.3.8.4.0 4.4 0.5.6 0.89 0.8 0.8 0.89 5.0 3.6.. 3. 0.7..67.33.43.63 5.0 3.8..0 3.0 Table : Simulation study with big bins: Root mean integrated squared error and mean BIC rank of Bayesian models for the density for a given dependence structure of the generated data. Unfortunately, RMISE is not available in practice for model selection as it requires the knowledge of the true bivariate density. A model selection tool should be computable from the observed frequencies {n j,j : j =,..., J ; j =,..., J } for the J J big bins. Selecting the model with the smallest AIC Akaike s information criterion, Akaike, 974) or BIC Bayesian information criterion, Schwarz, 978) are workable strategies: AIC = log L + p eff ; BIC = log L + logn)p eff, where L is the likelihood, see 3.) and 3.3), and p eff denotes the effective number of parameters. When one takes a parametric copula to describe the dependence structure, p eff is one copula parameter) plus the effective number of parameters involved in the modelling of the two margins, see 4.3). For each margin, that quantity is computed as the trace of the smoother matrix at the posterior mean of the penalty and of the splines parameters. When a nonparametric model is used, the same formula is used with Kronecker products of the bases matrices and of the penalty matrices, see 4.6). The mean ranks of BIC for the competing Bayesian models are given in the right part of Tables, 3 and 4. Whatever the sample size, the amount of grouping and the copula used to generate the data, one can see that the smallest and second smallest BIC see bolded and underlined values) nearly always rightly point the models with the smallest and second smallest RMISE see bolded and underlined values for BIC). This is usually not true with AIC not reported) that tends to select too complex models. In summary, it suggests that BIC can be used to select and even rank) estimators out of our Bayesian proposals. Estimates of Kendall s tau were also produced. When a copula model is fitted, the one-to-one relationship between the copula parameter and τ directly yields an

Bayesian model for the density Data C F G N NP C F G N NP copula τ RMISE n = 000) BIC rank n = 000) C 0. 0.34 0.5 0.58 0.49 0.4.0.9 4.7. 4.3 0.5 0.97.94.3.07.63.0 3.4 5.0 3.5.0 0.7.9 4.65 5.50 5.3 4.45.0.9 5.0 4.0. F 0. 0.4 0.30 0.39 0.35 0.35 3.7. 3.3.0 4.8 0.5 0.8 0.49 0.69 0.66 0.54 4.9.0 4..5.5 0.7.64 0.78.0.06.07 4.9.0 4..9. G 0. 0.4 0.34 0.3 0.3 0.36 4.8 3...0 4. 0.5 0.95 0.59 0.46 0.55 0.53 5.0 4.0.0..8 0.7.04.9 0.79.08.08 5.0 4.0.0..8 RMISE n = 00) BIC rank n = 00) C 0. 0.64 0.7 0.8 0.7 0.75.3.8 4..3 4.3 0.5.47.9.67.47.49.0.7 5.0.8 3.5 0.7 3.50 5.7 6.47 6.4 6.9.0.3 5.0 3.3 3.4 F 0. 0.70 0.64 0.73 0.68 0.69 3..9 3.4. 4. 0.5. 0.9.8.09 0.98 4.4.6 4.0.4.6 0.7.96.57.9.89.76 4..4 4.4.8.3 G 0. 0.70 0.60 0.60 0.60 0.64 4.3 3.0.5.0 4. 0.5. 0.95 0.88 0.9 0.93 5.0 3.7.. 3.0 0.7.9.80.5.57.76 5.0 3.6..0 3. Table 3: Simulation study with 8 big bins: Root mean integrated squared error and mean BIC rank of Bayesian models for the density for a given dependence structure of the generated data. Bayesian model for the density Data C F G N NP C F G N NP copula τ RMISE n = 000) BIC rank n = 000) C 0. 0.47 0.64 0.67 0.60 0.66.0.7 4.4.3 4.6 0.5.09.6.4.7.98.0.9 5.0 3.8.3 0.7.8 5. 5.70 5.30 5.0.0.8 5.0 4.0. F 0. 0.43 0.44 0.47 0.4 0.57 3.6. 3.3.9 4.9 0.5 0.95 0.7 0.77 0.67 0.7 4.7.0 4..5.6 0.7.60.4.08.03.8 4.7. 4.3 3.0.0 G 0. 0.46 0.48 0.47 0.43 0.68 4.8 3.0..0 4. 0.5.05 0.75 0.6 0.6 0.73 5.0 4.0.0..8 0.7 3.9.57.06.6.44 5.0 4.0..3.7 RMISE n = 00) BIC rank n = 00) C 0. 0.67 0.77 0.84 0.77 0.85.4.7 4.3.5 4. 0.5.68.49.79.60.63..5 4.9 3. 3. 0.7 3.94 6.00 6.68 6.40 6.45..4 5.0 3.5 3.0 F 0. 0.7 0.69 0.79 0.70 0.86 3..0 3.4.4 4.0 0.5.6 0.98..05.05 4.0.9 4..5.6 0.7.74.7.96.75.84 3.6.9 4.5 3..0 G 0. 0.70 0.65 0.67 0.65 0.8 4.3 3.0.6. 3.9 0.5.7.04 0.97 0.95.0 5.0 3.6.4.3.7 0.7.77..76.77.99 5.0 3.8.8.. Table 4: Simulation study with 6 big bins: Root mean integrated squared error and mean BIC rank of Bayesian models for the density for a given dependence structure of the generated data. 3

Frequentist model for the density Data C F G N NP C F G N NP copula τ big bins n = 000) big bins n = 00) C 0. 0.3 0.49 0.53 0.45 0.46 0.55 0.65 0.70 0.63.8 0.5 0.85.6.33.08.6.7.37.54.3 3.60 0.7.65 5.9 5.5 4.89 6.7.80 5.8 6.0 5.49 8.46 F 0. 0.37 0.7 0.33 0.9 0.36 0.57 0.5 0.58 0.55.0 0.5.36 0.44 0.64 0.5 0.65.4 0.77 0.95 0.8. 0.7 3.5 0.7.9 0.96.6 3.4.3.58.6 3.96 G 0. 0.4 0.33 0.8 0.9 0.35 0.56 0.50 0.50 0.49.4 0.5.54 0.67 0.4 0.57 0.68.56 0.94 0.80 0.85.04 0.7 4.04.59 0.7.6.75 3.7.89.30.49 3.96 8 big bins n = 000) 8 big bins n = 00) C 0. 0.34 0.49 0.54 0.46 0.5 0.57 0.66 0.7 0.65.44 0.5 0.9..38.5.48.33.39.56.35 3.84 0.7.84 5.4 5.64 5.05 6.65.98 5.94 6.6 5.65 8.84 F 0. 0.37 0.8 0.35 0.3 0.40 0.60 0.54 0.60 0.57.33 0.5.7 0.47 0.68 0.55 0.78.3 0.80 0.99 0.85.49 0.7 3.37 0.77.5 0.98.9 3.08.40.67.35 4.5 G 0. 0.4 0.3 0.9 0.30 0.40 0.57 0.5 0.5 0.5.36 0.5.47 0.66 0.44 0.58 0.78.47 0.93 0.8 0.86.36 0.7 3.89.58 0.76.3.00 3.5.90.39.50 4.56 6 big bins n = 000) 6 big bins n = 00) C 0. 0.58 0.70 0.7 0.64 0.5 0.83 0.89 0.9 0.86.7 0.5.4..3.07..93.5.66.45 3.67 0.7 3.37 5. 5.35 4.73 6.4 4.45 5.9 6. 5.64 8.39 F 0. 0.56 0.50 0.5 0.47 0.4 0.97 0.94 0.97 0.93.8 0.5.98 0.97 0.98 0.9 0.70.8.48.5.45.8 0.7 4.53.57.69.69.6 4.44.0.3.0 3.95 G 0. 0.64 0.58 0.5 0.5 0.4 0.97 0.94 0.97 0.93.8 0.5.90 0.9 0.66 0.79 0.73.8.48.5.45.8 0.7 4.9.3.48.9.8 4.44.0.3.0 3.95 Table 5: Simulation study : Root mean integrated squared error of frequentist estimators for the density for a given dependence structure of the generated data. 4

estimate for it, see Table. For a nonparametric density estimate, the relationship between the fitted) bivariate density and the population) Kendall s tau provides the desired estimation. Indeed, one has τx, Y ) = 4 F x, y) f x, y) dxdy. where F x, y) = PrX x, Y y) is the joint survival distribution. If ˆπ st is the fitted probability to belong to the fine grid cell with midpoint u s, u t ), then one can estimate F at that midpoint by F u s, u t ) = I I i =s i =t ˆπ ii I i =s This suggests the following estimate for τx, Y ): ˆτX, Y ) = 4 I I i = i = ˆπ it I i =t F u i, u i ) ˆπ ii. ˆπ si + 4 ˆπ st. The square root of the) MSE and bias of these estimators for τ, as well as the observed coverage of 90% credible intervals for τ computed over the S = 00 simulated datasets are reported in Tables 6 and 7 for sample sizes of 000 and 00, respectively. Not surprisingly, RMSE is smallest when the correct parametric copula is assumed to model the dependence structure. A wrong choice for the parametric copula can provide good or bad performances for the estimation of tau. A poor estimation for tau usually happens when, for example, one assumes a copula with strong left tail dependence e.g. Clayton copula) when the dependence is strong in the right tail e.g. Gumbel copula). When the true Kendall s tau is small τ = 0.), the RMSE of the nonparametric estimate is not significantly different from the RMSE for the correct parametric choice. The observed coverages for the 90% credible intervals are compatible see percentages in bold) with the targeted nominal level. For medium τ = 0.5) or large τ = 0.7) Kendall s tau, the nonparametric estimate tends to underestimate τ. Whatever the number of big bins, that bias is moderate and at most 0.04) when the sample size is n = 000. It tends to increase with τ. The same remark holds when n = 00 provided that the number of big bins is a least 8 and τ small or medium. For a small sample size n = 00) and very wide bins, the estimation provided by a carefully chosen parametric copula seems preferable. However, note that many different shapes for a density are compatible with the observed frequencies in such a setting. The smoothness prior in the nonparametric approach penalizes quick changes in the curvature of the log) density. Therefore, that approach favours slow changes within the big rectangular cells: it tends to discard densities with a large Kendall s tau when fitted densities with a smaller dependence are perfectly compatible with the observed big cell) frequencies. A comparison with the performances of the frequentist estimators for Kendall s tau was also made tables not reported): for the semi-parametric model, Kendall s tau-b performs slightly better than the Bayesian estimator. Its bias is negligible ; the estimator based on the Bayesian nonparametric model outperforms its frequentist counterpart. 5

True Bayesian model for the density copula τ C F G N NP C F G N NP C F G N NP 0 3 RMSE 0 BIAS Coverage of 90% C.I. big bins C 0. 3 4 4 - -3 0-87 83 56 87 83 0.5 6 7 9 0 0 0 - - - 89 87 8 85 83 0.7 5 3 9 9 6 0 0-3 -3-84 8 35 33 37 F 0. 38 3 3-3 0 - - 0 54 89 7 84 86 0.5 57 7 33 34 0-5 - -3-3 - 8 86 47 40 73 0.7 43 09 7 30 0-4 0-3 -3-93 30 7 43 G 0. 49 0-4 0 0 0 3 90 93 88 89 0.5 64 8 5 5 7-6 0 0-8 9 89 88 0.7 44 6 0 0 4-4 0 0-5 64 94 93 76 8 big bins C 0. 4 44 3 5 0 - -4 - - 89 84 47 86 84 0.5 8 8 34 7 3 0 - -3 - - 86 87 53 67 76 0.7 5 50 45 34 0 - -5-4 -3 85 56 F 0. 35 0 30-3 0 - - 0 58 86 76 9 86 0.5 50 7 34 3-5 - -3-3 - 3 89 46 44 6 0.7 3 3 3 6-3 0-3 -3-37 94 30 8 37 G 0. 46 0-4 0 0 0 4 89 9 83 90 0.5 59 7 6 5 8-6 0 0-8 9 90 9 87 0.7 37 3 3 0-3 0 0-8 87 93 85 64 6 big bins C 0. 4 9 5 8 7 0 - -5 - - 87 8 36 84 86 0.5 0 30 54 4 35 0 - -5-4 -3 85 6 9 8 46 0.7 8 36 67 58 47 0-3 -7-6 -4 8 7 0 F 0. 8 3 30 3-0 - 0 0 8 89 79 88 89 0.5 9 9 33 8 5-0 -3 - - 66 86 57 64 68 0.7 8 3 9 8 3 0 0-3 - -3 83 90 46 45 5 G 0. 40 4 5 4-3 0 0 0 59 90 93 84 87 0.5 39 8 8 8-3 0 0 0-54 9 93 9 79 0.7 9 4 4 5 9-0 0 0-3 83 90 93 9 4 Table 6: Simulation study n = 000): Root mean squared error RMSE) and bias of a Bayesian estimator for Kendall s tau for a given dependence structure of the generated data. The last columns give the estimated coverage of the 90% credible intervals bold values being compatible with the nominal level). 6

True Bayesian model for the density copula τ C F G N NP C F G N NP C F G N NP 0 3 RMSE 0 BIAS Coverage of 90% C.I. big bins C 0. 53 5 7 50 5 3 - -3 0-8 86 8 84 83 0.5 34 34 4 37 50 0 - - -4 94 93 90 9 69 0.7 9 9 43 47 68 - - -3-4 -6 90 86 74 6 6 F 0. 5 49 63 5 5 - - -3 - - 86 88 83 84 86 0.5 5 34 43 43 49-4 - -3-3 -4 70 93 87 8 69 0.7 40 30 34 4.9-3 0 - - -4 73 9 86 74 33 G 0. 59 49 46 47 5-3 - 0 0-80 89 90 9 85 0.5 59 37 36 36 46-5 -3 6 89 90 89 8 0.7 57 7 6 6 47-5 0 0-4 46 8 89 86 50 8 big bins C 0. 55 55 76 55 55 - -3 0-84 86 80 83 8 0.5 39 39 49 43 58 0-3 - -4 90 90 8 87 6 0.7 34 38 60 63 85 - - -5-5 -8 85 78 5 47 8 F 0. 50 49 64 5 5 - - -3 - - 87 87 83 80 84 0.5 5 37 45 45 54-4 - -3-3 -4 73 9 8 80 63 0.7 39 5 35 38 60-0 - -3-6 76 9 8 74 6 G 0. 58 49 47 48 5-3 - 0 - -3 77 88 9 87 83 0.5 58 38 38 38 49-4 0-3 69 87 87 87 84 0.7 50 30 30 30 54-3 - -5 7 85 9 9 4 6 big bins C 0. 55 54 83 53 55 3 - -4 - - 88 86 75 88 8 0.5 39 44 6 54 69 - -4-4 -6 93 84 74 77 58 0.7 38 47 74 75 00 - -3-6 -7-0 85 70 40 36 4 F 0. 54 5 7 53 55 0 - -3 - -3 86 89 8 88 8 0.5 46 4 47 45 59 - - - - -5 85 88 85 8 65 0.7 43 3 38 4 70 - -3-6 8 9 86 79 4 G 0. 6 55 56 54 59 - - 0 0-3 85 86 88 88 84 0.5 45 40 4 4 5-0 0-4 9 9 88 88 75 0.7 43 34 34 3 70-0 0 - -6 83 89 89 90 30 Table 7: Simulation study n = 00): Root mean squared error RMSE) and bias of a Bayesian estimator for Kendall s tau for a given dependence structure of the generated data. The last columns give the estimated coverage of the 90% credible intervals bold values being compatible with the nominal level). 7

These results are particularly interesting if one plans to use the proposed Bayesian density models in a regression setting where, for example, the strength of dependence is allowed to change with covariates. The simulation results suggest that, in many settings, reasonable estimates for these regression parameters should be expected from a full Bayesian approach. Credible regions are readily available from the MCMC output. 6. Application 6.. Association between blood pressures The data in Table 8 give the systolic and diastolic blood pressures of 663 males aged between 45 and 6 mean 5.5 and standard deviation 4.8) in a grouped format. The practical advantages of that format are obvious when it comes to include them in a printed report or to ensure privacy in the manipulation of health data. Systolic Diastolic blood pressure BP 40-60 60-70 70-80 80-90 90-00 00-0 0-0 0-70 80,00] 3 00,0] 4 4 3 0,0] 5 4 6 0,30] 7 5 56 7 30,40] 3 38 59 4 40,50] 3 6 4 39 9 50,60] 35 7 60,70] 8 7 3 70,80] 4 5 4 8 80,90] 4 8 4 90,00] 3 6 00,0] 0,80] 4 7 Table 8: Contingency table of the diastolic DBP) and systolic SBP) blood pressures in mmhg) of 683 males. Empty cells correspond to zero frequencies. An estimate of the bivariate density of the blood pressures was obtained using the nonparametric) bivariate composite link model described in Section.. The probability mass was assumed to lie within the rectangle 40, 70) 80, 80) in the diastolic-systolic blood pressure space. Each axis was subdivided into, respectively, 65 and 00 small bins of length mmhg, yielding a partition of the rectangle into 6500 squares of equal area. A basis involving 0 B-splines associated to equallyspaced knots was taken along the two axes. Starting from a frequentist estimation of the 00 B-spline parameters with a 3rd order penalty along each direction, a first chain of length 50000 was built to get better initial values for the penalty parameters, the B-spline parameters and the sphering matrix. Then, after a burnin of 0000 iterations, a final chain involving 00000 iterations was run. It took about minutes on an. Ghz Apple MacBook. We refer to Section 4. for algorithmic details. Parametric copula models Clayton, Frank, Gumbel and Normal) with flexible margins, see Section., were also considered. The same rectangle support as for the nonparametric model was assumed in the diastolic-systolic blood pressure space. It was also partitioned into 6500 squares of equal area. A basis involving 0 B-splines was taken along each axis. Initial values were obtained for the 40 splines parameters using frequentist arguments, see Section 4.. A chain of length 00000 8

Bayesian model for the density Clayton Frank Gumbel Normal NP Blood pressure data Effective dim. 8.0 9.0 9.4 8.8 4.5 BIC 37 78 94 90 Marriage data Effective dim. 0.8 4.4 3.6.8 7.9 BIC 485 97 696 833 373 Table 9: BIC and effective dimension of Bayesian models for the density for the blood pressure and the marriage datasets. Density SBP SBP 00 50 00 50 40 60 80 00 0 40 DBP DBP Figure : Fitted density based on the grouped blood pressure data. was run after a burnin of 0000 iterations, see Section 4. for algorithmic details. It took about 0 seconds on the same computer. Model selection was made using BIC, as justified by the results of Section 5. Table 9 suggests to select a Gumbel copula with flexible marginal distributions. A plot of the estimated posterior mean of the modelled bivariate density estimate is given in Fig.. One minus the labels of the contours give approximately) the estimated probability that the diastolic and systolic blood pressures of a randomly selected male from the studied population) belong to the corresponding region. Conditional quantiles can be computed from the estimated bivariate density. The fitted conditional deciles are given on Fig. together with the frequency data. By construction, the fitted curves do not cross as it sometimes happen with nonparametric estimation methods of quantile curves. Credible intervals can also be easily derived from the MCMC chain. 6.. Age of spouses at marriage The data of interest are the number of marriages in Belgium in 006) for given ages of the spouses when the husband already divorced, see Table 0. Like in the previous example, non-parametric see Section.) and semi-parametric copula see Section.) models were used to describe the joint density of the ages of the spouses at marriage. The probability mass was assumed to lie within the rectangle 8, 90) 8, 90). Each axis was subdivided into 7 small bins of length year, yielding a partition of the rectangle into 584 squares of equal area. The number of B-splines along each axis and the number of MCMC iterations were taken 9

DBP 60 70 80 90 00 0 0 3 8 4 9 7 4 8 7 4 39 35 7 5 4 3 6 56 59 4 8 4 4 4 5 38 6 4 5 7 3 3 SBP 00 0 40 60 80 3 3 7 5 4 6 38 5 4 4 4 8 4 59 56 6 3 4 5 7 35 39 4 7 8 4 7 9 4 8 3 00 0 40 60 80 SBP 60 70 80 90 00 0 0 DBP Figure : Conditional deciles estimated from the grouped blood pressure data. Density Age of Wife Age of Husband Age of Wife 0 30 40 50 60 70 80 0 30 40 50 60 70 80 Age of Husband Figure 3: Fitted density for the age at marriage dataset. to be 0 respectively 0) and 00000 respectively 00000) in the non-parametric respectively semi-parametric) setting. The values of BIC in Table 9 suggests that the non-parametric model is to be preferred. One explanation for the bad performances of the parametric copula models might be the implicit hypothesis of symmetry of the conditional quantile distributions on the quantile scale: these are assumed identical for men and for women. A plot of the fitted non-parametric bivariate density is given in Fig. 3. One minus the labels of the contours give approximately) the estimated probability that the age of the spouses belong to the corresponding region. The fitted conditional deciles are given on Fig. 4 together with the frequency data. The dispersion of the age of the wifes markedly increase with that of the husband see right panel), while the dispersion of the age of the husbands looks stable as soon as the wife is 35 or older see left panel). The plot of the estimated conditional standard deviation in Fig. 5 confirms the diagnostic. It also suggests that 4 years is a turning point for the age of the partner as, over it, the standard 0

Age of wife Age of 8-0- 5-30- 35-40- 45-50- 60-70- husband 9 4 9 34 39 44 49 59 69 79 80+ Total % 8-9 0 0 0 0 0 0 0 0 0 0 0.0 0-4 8 8 0 0 0 0 0 0 0 0 38 0.3 5-9 7 9 0 4 7 0 0 0 38.7 30-34 6 75 365 333 6 47 0 0 0 0 0 9.3 35-39 8 33 394 650 59 33 69 4 0 0 03 7.0 40-44 3 79 57 465 637 556 30 83 0 0 3 9.4 45-49 44 5 65 438 565 56 68 5 0 39 8.7 50-59 3 7 94 58 65 55 7 969 89 0 869 4.0 60-69 0 5 45 74 36 393 67 4 869 7.3 70-79 0 0 5 4 44 49 33 5.3 80+ 0 0 0 0 0 5 5 5 0 0. Total 77 600 377 937 086 035 698 779 38 55 6 968 % 0.6 5.0.5 6. 7.4 7.0 4. 4.9.7 0.5 0. 00 Table 0: Age of spouses at marriage in Belgium 006) when the husband already divorced Versonnen, 009). deviation of the age of the husbands is larger than that of the wifes. 7. Discussion We have proposed a semiparametric and a nonparametric model to estimate a bivariate density from bivariate histogram data. Smoothness was forced through roughness penalties or smoothness priors in both cases with the additional assumption of a parametric copula to describe the dependence structure in the first model. P-splines Eilers and Marx, 996) and the composite link model Thompson and Baker, 98) are the key components in the strategy. Frequentist and Bayesian estimates were derived. The frequentist approaches are easier to implement and are actually used as a first step in the MCMC exploration of the joint posterior in the corresponding Bayesian implementation. The big advantages of the full Bayesian versions are the automatic account for the different sources of uncertainty such as the choice of the roughness penalty parameters) and the ease of computation of credible regions for any derived quantity of interest such as conditional posterior) moments, quantiles or probabilities once the Markov chains have been generated. The simulation study suggests that BIC can be used to classify the relative merits of these semiparametric and parametric models. Relying on this, the two applications have shown that both the semiparametric and the nonparametric models are useful in practice. Extending our models to deal with bivariate interval-censored data is straightforward. Indeed, one just needs to amend the likelihood: it becomes a product over the different observed rectangular configurations formed by the pairs of intervals, each one contributing to the likelihood with the associated probability to a power equal to the number of times it was observed. Then, similarly as before, the jth row of the composing matrix for a given margin indicates which small bins are contained in the jth marginal interval configuration.

Age of Husband 0 30 40 50 60 70 80 5 4 44 49 33 5 45 74 36 393 67 4 3 7 94 58 65 55 7 969 89 44 5 65 438 565 56 68 5 3 79 57 465 637 556 30 83 8 33 394 650 59 33 69 4 6 75 365 333 6 47 0 7 9 0 4 7 8 8 0 Age of Wife 0 30 40 50 60 70 80 90 0 8 8 7 4 0 365 394 57 5 9 7 0 47 6 59 637 438 333 650 465 65 75 6 4 69 33 556 565 33 8 83 30 56 79 3 5 68 44 89 969 7 55 65 58 94 7 3 4 67 393 36 74 45 5 33 49 44 4 5 0 30 40 50 60 70 80 Age of Wife 0 30 40 50 60 70 80 Age of Husband Figure 4: Estimated conditional deciles for the age at marriage dataset. Conditional standard deviation 4 6 8 0 sdage of wife) sdage of husband) 0 30 40 50 60 70 80 Age of partner Figure 5: Conditional standard deviation of the age of the husbands solid line) or of the wifes dashed line) for a given age of his or her partner. Grey regions correspond to pointwise 90% credible intervals.