Empirical tsunami fragility modelling for hierarchical damage levels

. The present work proposes a simulation-based Bayesian method for parameter estimation and fragility 10 model selection for mutually exclusive, and collectively exhaustive (MECE) damage states. This method uses adaptive Markov chain Monte Carlo simulation (MCMC) based on likelihood estimation using point-wise intensity values. It identifies the simplest model that fits the data best, among the set of viable fragility models considered. The proposed methodology is demonstrated for empirical fragility assessment for two different tsunami events and different classes of buildings with varying number of 15 observed damage and flow depth data pairs. As case-studies, observed pairs of data for flow depth and corresponding damage level from the central South Pacific tsunami on September 29, 2009, and Sulawesi-Palu Tsunami on 28 September, 2018 are used. Damage data related to a total of 5 different building classes are analyzed. It is shown that the proposed methodology is stable and efficient for data sets with a very low number of damage versus intensity data pairs and cases in which observed data are 20 missing for some of the damage levels.


Introduction
Fragility models express the probability of exceeding certain damage thresholds for a given level of intensity for a specific class of buildings or infrastructure.Empirical fragility curves are models derived based on observed pairs of damage and intensity data for buildings and infrastructures usually collected, acquired, and even partially simulated in the aftermath of disastrous events.Some examples of empirical fragility models are: seismic fragility (Rota et al. 2009, Rosti et al. 2021), tsunami fragility (Koshimura et al. 2009a, Reese et al. 2011; a comprehensive review can be found in Charvet et al. 2017), flooding fragility (Wing et al. 2020), and debris flow fragility curves (Eidsvig et al. 2014).Empirical fragility modelling is greatly affected by how the damage and intensity parameters are defined.Mutually exclusive and collectively exhaustive (MECE, see next section for the definition) damage states are quite common in the literature as discrete physical damage states.The MECE condition is necessary for damage states in most probabilistic risk formulations leading to the mean rate of exceeding loss (e.g., Behrens et al. 2021).Tsunami fragility curves usually employ the tsunami flow depth as the measure of intensity; although different studies use also other measures like current velocity (e.g., De Risi et al. 2017b, Charvet et al. 2015).Charvet et al. (2015) demonstrate that the flow depth may cease to be an appropriate measure of intensity for higher damage states and other parameters such as the current velocity, debris impact, and scour can become increasingly more important.De Risi et al. (2017b) developed bivariate tsunami fragilities, which account for the interaction between the two intensity measures, tsunami flow depth and current velocity.Early procedures for empirical tsunami fragility curves used data binning for representing the intensity.For example, Koshimura et al. (2009b) binned the observations by the intensity measure, i.e., the flow depth, however the latest procedures have mostly used point-wise intensity estimates instead.Fragility curves for MECE damage states are distinguished by their nicely "laminar" shape; in other words, the curves should not intersect.When fitting empirical fragility curves to observed damage data, this condition is not satisfied automatically.For example, fragility curves are usually fitted for individual damage states separately and they are filtered afterwards to remove the crossing fragility curves (e.g., Miano et al. 2020) or ordered ("parallel") fragility models are used from the start (Charvet et al. 2014, Lahcene et al. 2021).Charvet et al. (2014) and De Risi (2017a) also used partially ordered models to derive fragility curves for MECE damage states.They used the multinomial probability distribution to model the probability of being in any of MECE damage states based on binned intensity representation.De Risi et al. (2017a) used Bayesian inference to derive the model parameters for an ensemble of fragility curves.Empirical tsunami fragility curves are usually constructed using generalized linear models based on probit, logit, or the complementary loglog link functions (Charvet et al. 2014, Lahcene et al. 2021).As far as the assessment of the goodness of fit, model comparison and selection are concerned, approaches based on the likelihood ratio and Akaike Information Criterion, (e.g., Charvet et al. 2014, Lahcene et al. 2021) and on k-fold cross validation have also been used (Chua et al. 2021).For estimating confidence intervals for empirical tsunami fragility curves, bootstrap resampling has been commonly used (Charvet et al. 2014, Lahcene et al. 2021, Chua et al. 2021).
The present paper presents a simulation-based Bayesian method for inference and model class selection for the ensemble modelling of the tsunami fragility curves for MECE damage states for a given class of buildings.By fitting the (positive definite) fragility link function to the conditional probability of being in a certain damage state, given that building is not in any of the preceding states, the method ensures that the fragility curves do not cross (i.e., they are "hierarchical" as in De Risi et al. 2017a).The method uses adaptive Markov Chain Monte Carlo Simulation (MCMC, Beck and Au 2002), based on likelihood estimation using point-wise intensity values, to infer the ensemble of the fragility model parameters.Alternative link functions are compared based on log evidence which considers both the average goodness of fit (based on log likelihood) and the model parsimony (based on relative entropy).This way, among the set of viable models considered, it identifies the simplest model that fits the data best.By "simplest model", we mean the model having maximum relative entropy (measured using the Kullback-Leibler (Kullback and Leibler 1951) distance) with respect to the data.This usually means the model has a small number of parameters.

Definitions of intensity and damage parameters
The intensity measure, IM, (or simply "intensity"; e.g., the tsunami flow depth) refers to a parameter used to convey information about an event from the hazard level to the fragility level -it is an intermediate variable.The damage parameter, D, is a discrete random variable and the vector of damage levels is expressed as {D j , j=0:N DS }, where D j as the j th damage level (threshold ) and N DS as the total number of damage levels considered (depending on the damage scale being used and on the type of hazard, e.g., earthquake, tsunami, debris flow).Normally, D 0 denotes the no-damage threshold, while  defines the total collapse or being totally washed away.Let us assume that DS j is the j th damage state defined by the logical statement that the damage D is between the two damage thresholds D j and D j+1 ; i.e., D is equal to or greater than D j and smaller than D j+1 as follows (see also Figure 1 for a graphical representation of the above expressions): where (ꞏ) denotes the logical product and is read as "AND".Obviously, for the last damage state, we have  ≡   .The proposed methodology herein is also applicable to fragility assessment in cases where observed damage data is not available for some of damage levels.Let index be the vector of j values (j=0: N DS ) indicating damage levels N j for which observed data is available (j values are in ascending order).The new damage scale formed as   ,   , … ,   , where N is the length of vector index, is also MECE.It is noteworthy that the number of fragility curves derived in this case is going to be equal to N-1.In the following, for simplicity and without loss of generality, we have assumed that observed data is available for all damage levels, i.e., index={0:N DS }, that is, N DS =N DS -1.However, the proposed methodology is also applicable to the modified damage scale formed by damage level indices in vector index(1:N).We will later see examples of such application in the case studies.

Fragility modelling using generalized regression models
The generalized regression models (GLM) are more suitable for empirical fragility assessment with respect to the standard regression models.This is mainly because the dependent variable in the case of the generalized regression models is a Bernoulli binary variable (i.e., only two possible values: 0 or 1).Bernoulli variables are particularly useful in order to detect whether a specific damage level is exceeded or not (only two possibilities).In the following, fragility assessment based on GLM's is briefly described.
The term    denotes the probability of being in damage state DS j for a given intensity level IM.Based on N DS damage thresholds, this conditional probability    can be read (see Equation 1) as the probability that   and   , and can be estimated as follows (see Appendix A for the derivation): where     is the fragility function for damage level  .For each damage threshold, fragility can be obtained for a desired building class considering that the damage data provides Bernoulli variables (binary values) of whether the considered damage level was exceeded or not for given IM levels.For damage threshold  , all buildings with an observed damage level   will have a probability equal to zero, while those with   will have an assigned probability equal to one.In other words, for building i and damage state j, the Bernoulli variable Y ij indicates whether building i is in damage state j: where IM i is the intensity evaluated at the location of building i.A Bernoulli variable is defined by one parameter which is     herein.This latter is usually linked to a linear logarithmic predictor in the form: where  , and  , are regression constants for damage level j.We have employed generalized linear regression (e.g., Agresti 2012) with different link functions "logit", "probit", and "cloglog", to define probability function  as following: The logit link function is equivalent to presenting   with a Logistic regression function.The probit link function is equivalent to a lognormal cumulative distribution function for   .In the cloglog (complementary log-log) transformation, the link function at the location of building i can be expressed as  ln ln 1  .It is noted that the generalized linear regression based on maximum likelihood estimation (MLE) is available in many statistical software packages (e.g., MathWorks, Python, R).
In the following, we have referred to the general methodology of fitting fragility model to data -one damage state at a time-the "Basic method".In the Basic method, the probability of exceeding damage level j is equal to the probability function defined in Equation (5); that is,      .This method for empirical fragility curve parameter estimation is addressed in detail in the Section "Results", under "MLE-Basic" method.The fragility curves obtained under the "MLE-Basic" method could potentially cross, leading to the ill condition that    0. To overcome this, a hierarchical fragility modeling approach has been adopted like that in De Risi et al. (2017a).

Hierarchical fragility modelling
Equation (2) for 0   , and given IM i , can also be written as follows using the product rule in probability: The term      ,  embedded in Equation ( 6) denotes the conditional probability that the damage exceeds the damage threshold  knowing that it has already exceeded the previous damage level  given IM i .By making       ,  (see Equation 5, which is positive definite), we ensure that the fragility curve of a lower damage level will not fall below the fragility curve of the subsequent damage threshold (the ill condition of    0 does not take place).Hence, Equation ( 6) can be expanded as follows (see Appendix B for derivation): In this way, the fragility curves are constructed in a hierarchical manner by first constructing the "fragility increments"   | .Note that for the last damage state  , the probability    , which is also equal to the fragility of the ultimate damage threshold  , i.e.
see Equation 2), can be estimated by satisfying the CE condition: Accordingly, the fragility for other damage levels     , where 0   , can be obtained from Equation (2) by starting from the fragility of the higher threshold     , and adding successively    (see Equation 7) as follows: As a result, the set of hierarchical fragility models based on Equation ( 9) has 2  model parameters with the vector   , ,  , ,  0:  1 .Obviously, with reference to Equation (8), no model parameter is required for the last damage level which is derived by satisfying the CE condition.The vector  of the proposed hierarchical fragility models can be defined by two different approaches: 1) MLE method: a generalized linear regression model (as explained in previous section) is used for the conditional fragility term       ,  for the j th damage state DS j (see Equation 7, 0   ).Herein, we need to work with partial damage data so that all buildings in DS j (with an observed damage    ) will be assigned a probability equal to zero, while those in higher damage states (with   ) will be assigned a probability equal to one (i.e., in order to model the conditioning on   , the domain of possible damage levels is reduced to   ).2) Bayesian model class selection (BMCS): employing the Bayesian inference for model updating to obtain the joint distribution of the model parameters.
Detailed discussion about these two approaches, namely "MLE" and "BMCS", for parameters estimation of empirical fragility curves are provided in Section "Results".

Bayesian model class selection (BMCS) and parameter inference using adaptive MCMC
We use the Bayesian model class selection (BMCS) herein to identify the best link model to use in the generalized linear regression scheme.However, the procedure is general and can be applied to a more diverse pool of candidate fragility models.BMCS (or model comparison) is essentially Bayesian updating at the model class level to make comparisons among candidate model classes given the observed data (e.g., Beck andYuen 2004, Muto andBeck 2008).Given a set of   candidate model classes  ,  1:   , and in the presence of the data D, the posterior probability of the k th model class, denoted as   | can be written as follows: It can be shown (see Appendix C, Muto and Beck 2008) that logarithm of the evidence (called logevidence) ln  | can be written as: where Ω  is the domain of  , and  | ,  is the likelihood function conditioned on model class  ."Term 1" denotes the posterior mean of the log-likelihood, which is a measure of the average data fit to model  ."Term2" is the relative entropy (Kullback andLeibler 1959, Cover andThomas 1991) between the prior   | and the posterior   |,  of  given model  , which is a measure of the distance between the two PDFs.The latter Term 2 measures quantitatively the amount of information (on average) that is "gained" about  from the observed data D. It is interesting that Term 2 in the log-evidence expression penalizes for model complexity; i.e., if the model extracts more information from data (which is a sign of being a complex model with more model parameters), the log-evidence reduces.The exponential of the log-evidence,  | , is going to be implemented directly in Equation ( 10), to provide the probability attributed to the model class  .More details on how to estimate the two terms in Equation ( 12) are provided in the Section "Results".
The likelihood  | ,  can be derived, based on point-wise intensity information, as the likelihood of  , buildings being in damage state DS j (considering that ∑  ,  ), according to data D defined before: The posterior distribution   |,  can be found based on Bayesian inference: where  is a normalizing constant.In lieu of additional information (or preferences), the prior distribution,   | , can be estimated as the product of marginal normal PDFs for each model parameter, i.e., a multivariate normal distribution with zero correlation between the pairs of model parameters  (see Appendix D).More detail about an efficient prior joint PDF is provided in the Section "Results".To sample from the posterior distribution   |,  in Equation ( 14), an adaptive MCMC simulation routine (see Appendix E) is employed.MCMC is particularly useful for drawing samples from the target posterior, while it is known up to a scaling constant  (see Beck and Au 2002); thus, in Equation ( 14), we only need un-normalized PDFs to feed the MCMC procedure.The MCMC routine herein employs the Metropolis-Hastings (MH) algorithm (Metropolis et al. 1953, Hasting 1970) to generate samples from the target joint posterior PDF   |,  .

Calculating the hierarchical fragilities and the corresponding confidence intervals based on the vector of model parameters 𝜽 𝒌
For each realization of the vector of model parameters  , the corresponding set of hierarchical fragility curves can be derived based on the procedure described in the previous sections.Since we have realizations of the model parameters drawn from the joint PDF   |,  (based on samples drawn from adaptive MCMC procedure, see also Appendix E), we can use the concept of Robust Fragility (RF) proposed in Jalayer et al. 2017 (see also Jalayer et al. 2015, andJalayer andErahimian 2020) to derive confidence intervals for the fragility curves.RF is defined as the expected value for a prescribed fragility model considering the joint probability distribution for the fragility model parameters  .The RF herein can be expressed as: where    ,  is the fragility given the model parameters  associated with the model  (it has been assumed that once conditioned on fragility model parameters  , the fragility becomes independent of data D);   |, is the expected value over the vector of fragility parameters  for model  .The integral in Equation ( 15) can be solved numerically by employing Monte Carlo simulation with N d generated samples from the vector  as follows: where    ,  , is the fragility given the l th realization ( 1:  ) of the model parameters  for model  .Based on the definition represented in Equation ( 15) and Equation ( 16), the variance   |, , which can be used to estimate a confidence interval for the fragility considering the uncertainty in the estimation of  , is calculated as follows: , , (Eq.16) 1 , , , , The empirical fragilities derived through the hierarchical fragility procedure are not necessarily attributed to a lognormal distribution.Hence, we have derived equivalent lognormal statistics (i.e., the median and dispersion) for the resulting fragility curves.The median intensity,  , for a given damage level, is calculated as the IM corresponding to 50% probability on the fragility curve.The logarithmic standard deviation (dispersion) of the equivalent lognormal fragility curve at the onset of damage threshold,  , is estimated as half of the logarithmic distance between the IMs corresponding to the probabilities of 16% ( ) and the 84% ( ) on the fragility curve; thus, the dispersion can be estimated as  0.50 ln   ⁄ .The overall effect of epistemic uncertainties (due to the uncertainty in the fragility model parameters and reflecting the effect of limited sample size) on the median of the empirical fragility curve is considered through (logarithmic) intensity-based standard deviation denoted as  (see Jalayer et al. 2020). can be estimated as half of the (natural) logarithmic distance (along the IM axis) between the median intensities (i.e., 50% probability) of the RF's derived with 16% (denoted as  ) and 84% ( ) confidence levels, respectively; i.e.,  0.50 ln   ⁄ .The RF and its confidence band, the sample fragilities  , (where  1:  ), the equivalent lognormal parameters   and  of the RF, the epistemic uncertainty  , and finally the intensities  and  are shown in Figure 2d to Figure 6d in the following Section 3.

Case Study 1: The 2009 South Pacific Tsunami
The central South Pacific region-wide tsunami was triggered by an unprecedented earthquake doublet (Mw 8.1 and Mw 8.0) on September 29, 2009, between about 17:48 and 17:50 UTC (Goff and Dominey-Howes 2009).The tsunami seriously impacted numerous locations in the central South Pacific.Herein, the damage data related to the brick masonry residential (1 storey) and Timber residential buildings associated with the reconnaissance survey sites of American Samoa and Samoa islands were utilized.Based on the observed damage regarding different indicators (see Reese et al. 2011 for more details on damage observation), each structure was assigned a damage state between (DS 0 and DS 5 ).The original data documented in Reese et al. (2011) reporting the tsunami flow depth and the attributed damage state to each surveyed building can be found on the site of the European Tsunami Risk Service (https://eurotsunamirisk.org/datasets/).The five damage levels ( 5) and a description of the indicators leading to the classification of the damage states are given in Table 1 based on Reese et al. (2011).

Case Study 2: The 2018 Sulawesi-Palu Tsunami
On Friday 28 September 2018, at 18:02 p.m. local time, a shallow strike-slip earthquake of moment magnitude 7.5 occurred near Palu City, Central Sulawesi, Indonesia followed by submarine landslides, a tsunami, and massive liquefaction caused substantial damage (Muhari et al. 2018, Rafliana et al. 2022).In Sulawesi, more than 3300 fatalities and missing people, 4400 serious injuries and 170,000 people were displaced by earthquake, tsunami, landslides, liquefaction or building collapse, or combinations of these hazards (Paulik et al. 2019, Mas et al. 2020).Herein, the damage data related to the non-engineered unreinforced clay brick masonry (1 & 2 storey) and non-engineered light timber buildings locaed in Palu City were utilized.Based on the observed damage (see Paulik et al. 2018 for more details on damage observation), each structure was assigned a damage state between (DS 0 and DS 3 ).The original data reporting the tsunami flow depth and the attributed damage state to each surveyed building can be found as supplementary material to Paulik et al. (2018).The three damage levels ( 3) and a description of the indicators leading to the classification of the damage state are given in Table 2.

The building classes
Table 3 illustrates the building classes, for which fragility curves are obtained based on the proposed procedure and based on the databases related to the two Tsunami events described above.The taxonomy used for describing the building class matches the original description used in the raw databases.The number of data points available for different building classes showcases both classes with large number of data available, e.g., brick masonry 1 storey (South Pacific) and non-engineered brick masonry 1 storey (Sulawesi), and classes with few data points available, e.g., timber residential (South Pacific) and non-engineered masonry 2 storeys and Timber (Sulawesi).The fifth column in the table shows the the proportion of the number of damage levels for which observed data is available N (see Section 2.1) to the total number of damage levels in the corresponding damage scales, namely N DS +1=6 for South Pacific and N DS +1=4 for Sulawesi tsunami events (to include level 0).If the ratio is equal to unity, it indicates that data is available for all the damage levels from 0 to N DS .Note that the number of fragility curves derived is going to be equal to N-1, that is, equal to the number of damage levels for which observed damage data is available minus one.For each building class considered, we have considered the set of candidate models consisting of the fragility models resulting from the three alternative link functions used in the generalized linear regression in Equation ( 5).That is,  refers to hierarchical fragility modelling based on "logit";  refers to hierarchical fragility modelling based on "probit";  refers to hierarchical fragility modelling 335 based on "cloglog".For each model, both the MLE method using the MATLAB generalized regression toolbox and the BMCS using the procedure described in the previous section are implemented.

Fragility modelling using MLE
The first step towards fragility assessment by employing the MLE method (see Section 2.3) is to define the vector of model parameters   , ,  , , where   1:  1 where vector index is 340 defined in Section 2.1 as the vector of damage level indices (in ascending order) for which observed damage data is available and N is length of index.To accomplish this, the model parameters  , ,  , are obtained by fitting the link functions in Equation ( 5) to conditional fragility      ,  according to Equation (6).Herein, we have used MATLAB as a statistical software package (developed by MathWorks) to estimate the maximum likelihood of model parameters 345  , ,  , using the following MATLAB command: glmfit log  ,  , ′binomial′, ′link′, ′model′ .
The ′model′ will be either ′logit′, ′probit′, or ′comploglog′.For each damage level D j+1 ,  1    , the vector  is the IM's for which the condition   is satisfied;  is the column vector containing one-to-one probability assignment to the IM data in  with zero (=0.0) assigned to those data corresponding to DS j (   ) and one (=1.0) to those related to higher damage 350 states (with   ).
The vectors defining the MLE of the model parameters,  , are presented in Table 4 for each of the building classes listed in Table 3 and for each of the three models  ,  , and  defined in Section 3.4.Given the model parameter  , the damage state probability   | can be estimated based on the recursive Equation (7) and Equation (8).Then, the fragility for the ultimate damage level is 355 calculated first based on Equation (8).For the lower damage thresholds, the empirical fragility is derived based on the Equation ( 9).The resulting hierarchical fragility curves by employing the direct fragility assessment given  , i.e.,    ,  for   2:  , are shown later in the next section by comparison with those obtained from the BMCS method.360

Fragility modelling using BMCS
In the first step, the model parameters are estimated for each model class separately.For each model 365 class  , the model parameters  are estimated through the adaptive MCMC method described in detail in Appendix E which yields the posterior distribution in Equation ( 14).With reference to Equation ( 14), the prior joint PDF   | is a multivariate normal PDF with zero correlation between the pairs of model parameters (see Appendix D).The vector of the mean values,   is set to be the MLE tabulated in Table 2 (  related to  ).We have attributed a high value for the coefficient of 370 variation (more than 3.20 herein) for each of the model parameters.Appendix F illustrates the histograms representing the drawn samples from the joint posterior PDF   |,  for a selected building class.
The RF curves derived from the hierarchical fragility curves (see Section 2.5) and the corresponding plus/minus one standard deviation ( 1) intervals from Equation ( 16) and Equation ( 17) are also 375 plotted in Figure 2a to Figure 6a  Figure 2d to 6d also illustrate all the fragility parameters described in Section 2.5 including the 395 equivalent lognormal parameters  and  , the epistemic uncertainty in the empirical fragility assessment  , and also the intensities  ,  ,  , and  (the latter two are IMs at the median, i.e. 50% probability, from the RF minus/plus one standard deviation, respectively.For all 5 buildings classes considered (see Table 3),  ,  , and  are tabulated in Table 3 for all damage thresholds associated to model classes  to  .400

Model selection
With reference to Equation ( 12), the log-evidence ln  | , can be estimated by subtracting Term 2 from Term 1. Term 1 denotes the posterior mean of the log-likelihood, and the Term 2 is the relative entropy between the prior and the posterior.Within the BMCS method, these two terms are readily computable.
Given the samples generated from the joint posterior PDF's  , Term 1 (=Average Data Fit) can be seen as the expected value of the log-likelihood over the vector of fragility parameters  given the model  , i.e.,   |, ln  | .Term 2 (=Relative Entropy) is calculated as the expected value of information gain or entropy between the two PDF's posterior and prior over the vector  given the model  , i.e.,   |, ln   |,    | ⁄ .It is noted that based on Jensen's inequality, the mean information gain (relative entropy) of posterior compared to the prior is always non-negative (see e.g., Jalayer et al. 2012, Ebrahimian andJalayer 2021).Hence, Term 2 should always be positive.Herein,   |,  is constructed by an adaptive kernel density function see Equation E5, Appendix E as the weighted sum (average) of Gaussian PDFs centered among the samples  given model  (k=1:3).The prior   | is a multivariate normal PDF, respectively with the mean and covariance described previously for each model (see Equation D1 in Appendix D).Table 4 shows the results for model class selection for all 5 buildings classes considered.The last column illustrates the posterior probability (weight) of the model   | according to Equation ( 10) assuming that the prior

𝑃 𝕄
(where k=1:3).The best model for each building class is shown with a blue color.
For instance, for Class 1 (masonry residential) for South Pacific Tsunami, Model class  (using a complementary log-log "cloglog" transformation of  to the linear logarithmic space, see Equation 5) is preferred, since it has an overall larger difference between data fit and mean information gain, which leads to a higher the log-evidence.The posterior weights (last column of Table 4, see also Equation 10) of 6%, 11% and 83% are stabilized through different runs of the BMCS method with around 2% changes.It should be noted that in Figures 2 to 6, we reported directly the fragility results for the "best" fragility model class (i.e., the one that maximizes log evidence) identified based on the procedure described here.

The "Basic" (MLE-basic) method: fitting data to one damage state at a time
In the Basic method (see Section 2.2), the fragility     is obtained by using a generalized linear regression model according to Equation ( 5) with "logit", "probit" or "cloglog" link function fitted to the damage data ( where  1: 3).With reference to the MLE method described previously, the vector  herein is the IM associated to all damage data (and not partial, as in the hierarchical fragility method described in Section 3.3), and  is the column vector of one-to-one probability assignment to the IM data in  with zero (=0) assigned to those data with an observed damage threshold   , and one (=1) to those with   .Thus, for the empirical fragility associated with the damage threshold  , and based on the model  , there are two model parameters to be defined, namely   0 ,  1  .As noted previously, there might be conditions (depending on the quantity of the observed damage data), where a part of the fragility of damage threshold  lies below the fragility of the higher damage level  , indicating that    0. This is due to the fact that in the traditional method, there is no explicit requirement to satisfy    0 as compared to the proposed method.The MLE of model parameters  ,  for the damage levels D j ,   2:  } associated with the building classes in Table 3 are presented in Table 5. Figure 7 compares the fragility assessment obtained based on MLE-based hierarchical fragility modeling (see also the MLE-based curves in Figure 2b to Figure 6b) with the result of fragility assessment by employing the MLE-Basic method for the "best" Model Class  (k  {1,2,3}) identified according to the procedure outlined in the previous section.It is noted that the fragility functional form is different between the two methods.MLE-based fragility assessment given  uses Equation (7) to Equation (9) to construct hierarchical fragility curve given that the conditional fragility term       ,  , j  1:  1 } has one of the functional forms in Equation ( 5).However, the fragility assessment using MLE-Basic method employs directly one of the expressions in Equation ( 5) (corresponding to  , k=1:3) to derive the fragility curve     | (based on the whole damage data) and   2:  .This difference manifests itself in Figure 7a (for brick masonry residential, Class 1, South Pacific Tsunami) the deviation between the two fragility models for higher damage thresholds D 4 and D 5 .The deviations between the fragility curves are particularly noticeable at higher IM values (with exceedance probability >50%); however, their medians are quite similar.In 7b for (Timber residential buildings, Class 2 South Pacific Tsunami) and 7e (Light informal timber buildings, Class 3, Sulawesi-Palu tsunami), we can observe that fragility curves intersect in the case of MLE-Basic fragility assessment.However, they do not intersect for 510 hierarchical fragility curves.The intersection points of the consequent damage states  with  when using the MLE-Basic fragility estimation method are shown with color stars on each figure.Table 6 reports the fragility assessment parameters of the MLE and MLE-Basic methods for the damage thresholds D index(2) to D index(N) with the equivalent lognormal parameters  and  (explained in 520 Section 2.5) for  to  for all five classes considered.The medians are almost identical among the four models while there are higher dispersion estimates for MLE method derived by hierarchical fragility modelling.Discussion: The results outlined in this section show fragility assessment for two different datasets 535 corresponding to observed damaged in the aftermath of South Pacific and Sulawesi-Palu tsunami events.We have demonstrated the versatility of the proposed workflow and tool for hierarchical fragility assessment both for cases in which a large number of data points are available (e.g., Class 1, brick masonry residential, South Pacific Tsunami, Class 1, one-storey non-engineered masonry, Palu-Sulawesi Tsunami) and cases where very few data points are available (e.g., Class 2, timber residential, 540 South Pacific Tsunami, Class 3, non-engineered light timber, Sulawesi-Palu Tsunami).Moreover, we demonstrated how the proposed workflow avoids crossing fragility curves (e.g., Class 2, timber residential, South Pacific Tsunami, Class 3, non-engineered light timber, Sulawesi-Palu Tsunami).The results illustrated for the five building classes demonstrate that the proposed workflow for hierarchical fragility assessment can be applied in cases in which data points are not available for all the damage 545 levels within the damage scale.

Conclusion
An integrated procedure based on Bayesian model class selection (BMCS) for empirical hierarchical fragility modeling for a class of buildings or infrastructure is presented.This procedure is applicable to fragility modelling for any type of hazard as long as the damage scale consists of mutually exclusive 550 and collectively exhaustive (MECE) damage states and the observed damage data points are independent.This simulation-based procedure can: 1) perform hierarchical fragility modeling for MECE damage states; 2) estimate the confidence interval for the resulting fragility curves; 3) select the simplest model that fits the data best (i.e., maximizes log evidence) amongst a suite of candidate fragility models (herein, alternative link functions for generalized linear regression are considered).The 555 proposed procedure is demonstrated for empirical fragility assessment based on observed damage data to masonry residential (1 storey) and timber residential buildings due to the 2009 South Pacific Tsunami in the American Samoa and Samoa Islands and non-engineered masonry buildings (1 and 2 storeys) and non-engineered light timber buildings due to the 2018 Sulawesi-Palu Tsunami.It is observed that:  For each model class, the same set of simulation realizations is used to estimate the fragility parameters, the confidence band, and the log evidence.The latter, which consists of two terms depicting the goodness of fit and the information gain between posterior distribution resulting from the observed data and the prior distribution, is used to compare the candidate fragility models to identify the model that maximizes the evidence. Hierarchical fragility assessment can be done also based the maximum likelihood estimation (MLE) and the available statistical toolboxes (e.g., MATLAB's generalized linear model).For each damage level, the reference domain should be the subset of data that exceeds the consecutive lower damage level, instead of taking the entire set of data points as reference domain.Note that the basic fragility estimation ("MLE-Basic", non-hierarchical fragility model) fits the damage data for each damage level at a time.In other words, the reference domain is set to all damage data. The procedure is applicable also to cases in which observed data is available only for a subset of the damage levels within the damage scale.The number of fragility curves is going to be equal to the total number of damage levels for which data is available minus one.This means, in order to have at least one fragility curve, one needs to have data available at least for two damage levels. Although the resulting fragility curves are not lognormal (strictly speaking), equivalent statistics work quite well in showing the fragility curves (median and logarithmic dispersion) and the corresponding epistemic uncertainty (logarithmic dispersion). The proposed BMCS method and the one based on MLE lead to essentially the same set of parameters' estimates for hierarchical fragility estimation.However, the latter does not readily lead to the confidence band and log evidence. Using the basic method for fragility estimation (MLE-Basic) leads to results that are slightly different from the hierarchical fragility curves.The difference grows for higher damage levels.It is to note that following the basic method "MLE-Basic" led to ill-conditioned results (i.e., fragility curves crossing) in some of the cases (Class 2 for South Pacific Tsunami, and Class 3 for Sulawesi-Palu Tsunami, both Timber constructions) studied in this work.
The major improvement offered by this method is in providing a tool that can fit fragility curves to a set of hierarchical levels of damage or loss in an ensemble manner.This method, which starts from prescribed fragility models and explicitly ensures the hierarchical relation between the damage levels, is very robust to cases where few data points are available and/or where data is missing for some of the damage levels.This tool provides confidence bands for the fragility curves and performs model selection among a set of viable link functions for generalized regression.It is to note that the proposed method is in general applicable to hierarchical vulnerability modelling for human or economic loss levels and to different types of hazards, if (1) the defined levels are mutually exclusive and collectively exhaustive; and (2) a suitable intensity measure (IM) can be identified.

Appendix A: The derivation of Equation (2)
The probability of being in damage state DS j for a given intensity measure IM can be estimated as follows: where the upper-bar sign stands for the logical negation and is read as "NOT", and (+) defines the logical sum and is read as "OR".The above derivation is based on the rule of sum in probability and considering the fact that the two statements   and   are mutually exclusive (ME); thus, the probability of their logical sum is the sum of their probabilities.

Appendix B: The derivation of Equation (7)
The probability of being in damage state DS j (where j≥1) given the intensity measure evaluated at the location of building i, denoted as IM i , based on Equation ( 6) can be expanded in a recursive format as follows: where (+) defines the logical sum and is read as "OR".The above derivation is based on the rule of sum in probability and considering the fact that the recursive statements in the second term expressed generally as   •   , where 0   1, are ME; hence, the probability of their logical sum is the sum of their probabilities.It is to note that in case where j=0, the above equation can be written as: Appendix C: The derivation of log-evidence in Equation ( 13) From an information-based point of view, the logarithm of the evidence (log-evidence), denoted as ln  | , can provide a quantitative measure of the amount of information as evidence of model  .Moreover, the posterior PDF   |,  (see Equation 14) over the domain of the model parameters Ω  given the k th model is equal to unity.Thus, ln  | can be written as follows: Since the log-evidence is independent of , we can bring it inside the integral, and do some simple manipulation (also using the relation in Equation 11) as follows:

Appendix D: Multivariate normal distribution and generating dependent Gaussian variables
Let us assume that the vector of parameters for the kth model is set to ; i.e.,   .A multivariate normal PDF can be expressed as follows: where n is the number of components (uncertain parameters) of vector   ,  1:  ;   is the vector of the mean value of ; S is the covariance matrix.The positive definite matrix S n×n can be factorized based on Cholesky decomposition as S=LL T , where L n×n is a lower triangular matrix (i.e., for all j>i, L ij = 0 where L ij denotes the (i, j)-entry of the matrix L).A Gaussian vector  n×1 with mean   and covariance S can be generated as follows: where Z n×1 is a vector of standard Gaussian i.i.d.random variables with zero mean 0 n×n , and covariance equal to the identity matrix I n×n .To verify the properties of , we know that with reference to Equation (D2), it should have a mean equal to   and a covariance matrix equal to S. The expectation of , denoted as E(), can be estimated as: The covariance matrix of  can be written as: Thus, the vector  can be written according to Equation (D2).

 
prior ratio likelihood ratio proposal ratio will be repeated.To solve this problem, Beck and Au (2002) introduce a sequence of PDFs that bridge the gap between the prior PDF and the target posterior PDF.This issue will be more explored hereafter under the adaptive MCMC.Finally, it can mathematically be shown that (see Beck and Au 2002) if the current sample  i is distributed as p(ꞏ|D), the next sample  i+1 is also distributed as p(ꞏ|D).

Adaptive Metropolis-Hastings algorithm (adaptive MCMC)
The adaptive MH algorithm (Beck and Au 2002) introduces a sequence of intermediate candidate evolutionary PDF's that resemble more and more the target PDF.Let {p 1 , p 2 ,…, p Nchain } be the sequence (chain) of PDF's leading to p(|D)=p Nchain , where Nchain is the number of chains and each chain contains N d samples (as indicated subsequently).The following adaptive simulation-based procedure is employed: Step 1: Simulate N d samples { 1 ,  2 , …,  Nd } (1) , where the superscript (1) denotes the first simulation level or the first chain (nc=1 where nc denotes the chain number/simulation level), with the target PDF p 1 as the first sequence of samples.Instead of accepting or rejecting a proposal for  involving all its components simultaneously (called block-wise updating scheme), it might be computationally simpler and more efficient for the first chain to make proposals for individual components of , one at a time (called component-wise updating approach).In the block-wise updating, the proposal distribution has the same dimension as the target distribution.For instance, if the model parameters involve n uncertain parameters (e.g., the vector of model parameters  in this paper has  2 variables for each of the three models  ,  , and  ), we design an n-dimensional proposal distribution, and either accept or reject the candidate state (with all n variables) as a block.The block-wise updating approach can be associated with high rejection rates.This may cause problem when we want to generate the first sequence of samples (first chain).Therefore, we have utilized the more stable component-wise updating for the first chain.We start from the first variable and generate a candidate state based on a proposal distribution for this individual component, and finally accept or reject it based on MH algorithm.Note that in this stage, we have varied the current component and kept the other variables in vector  constant.Then, we move to the next components one by one and do the same procedure while taking into account the previous (updated) components.Therefore, what happens in the current step is conditional on the updated parameters in the previous steps.
Step 2: Construct a kernel density function  (1) as the weighted sum (average) of n-dimensional Gaussian PDFs centered among the samples { 1 ,  2 , …,  Nd } (1) , with the covariance matrix S (1) of the samples  i (1) and the weights associated to each sample as w i where i=1: N d as follows (see Ang et al. 1992, Au andBeck 2002): The kernel density  (1) constructed in Equation (E2) approximates p 1 .The kernel function  can be viewed as a PDF consisting of bumps at  i , where width w i controls the common size of the bumps.Therefore, a large value of w i tends to over-smooth the kernel density, while a small value may cause noise-shaped bumps.In view of this, w i can be assumed to have a fixed width (= w), or alternatively the adaptive kernel estimate can be employed (Ang et al. 1992, Au andBeck 1999) that is defined for each sample  i , i=1: N d .The adaptive kernel has better convergence and smoothing properties over the fixedwidth kernel estimate.The fixed width w is estimated as follows (Epanechnikov 1969) where N dist is the number of distinct samples (N dist ≤ N d ).For one-dimensional problems (n=1), this leads to the well-known fixed-width value of 4 3 ⁄  ⁄ ⁄ .The reason for using N dist is due to the fact that for the next simulation levels, where we are going to use a block-wise updating approach in the MCMC scheme, one may be faced with rejection of candidate states within the Markov chain.Thus, we need to count the distinct samples.In the adaptive kernel method, the idea is to vary the shape of each bump so that a larger width (flatter bump) is used in regions of lower probability density.Following the general strategy used in the past (see Ang et al. 1992, Au andBeck 1999), the adaptive band width w i for the i th sample  i can be written as   , where the local bandwidth factor  i can be estimated as follows: where 0≤  ≤1.0 is the sensitivity factor, and  i ) is calculated based on Equation (E2) where = i , with the choice of fixed-width w in Equation (E3).The denominator in Equation ( E4) is a geometric mean of the kernel estimator at all N d points.The value of  =0.50 is employed herein as also suggested by other research endeavors (Abramson 1982, Ang et al. 1992, Au and Beck 1999).It is numerically more stable to estimate the denominator in Equation (E4) as ∏ κ  ⁄ .
Step 3: Simulate N d Markov chain samples { 1 ,  2 , …,  Nd } (2) with the target PDF p 2 as the second simulation level (nc=2).We use  (1) as the proposal distribution q(ꞏ) in Equation (E1) in this stage to generate the second chain of samples.To generally simulate sample  from the kernel  (nc) (where nc=1:Nchain), we generate a discrete random index from the vector [1, 2, …, N d ] with the corresponding weights  ,  , ⋯ ,  using an inverse transformation sampling; if index=j, then generate  from the Gaussian PDF  j , where:

Figure 1 :
Figure 1: Graphical representation of damage levels Dj and damage states DSj, where j=0:NDS Damage states  ,  , … ,  are mutually exclusive and collectively exhaustive (MECE) if an only if   •   0 (if  ,  0:  ) and ∑    1; (ꞏ) denotes the logical product and is read as "AND".In simple words, the damage states are MECE if being in one damage state excludes all others and if all the damage states together cover the entire range of possibilities in terms of damage.The ensemble of MECE damage states DS j , j=0:N DS is usually referred to as the damage scale (e.g., the EMS98, Grünthal 1998)The proposed methodology herein is also applicable to fragility assessment in cases where observed damage data is not available for some of damage levels.Let index be the vector of j values (j=0: N DS ) indicating damage levels N j for which observed data is available (j values are in ascending order).The new damage scale formed as   ,   , … ,   , where N is the length of vector index, is also MECE.It is noteworthy that the number of fragility curves derived in this case is going to be equal to N-1.In the following, for simplicity and without loss of generality, we have assumed that observed data is available for all damage levels, i.e., index={0:N DS }, that is, N DS =N DS -1.However, the proposed methodology is also applicable to the modified damage scale formed by damage level indices in vector index(1:N).We will later see examples of such application in the case studies.

Sulawesi
corresponding to Classes 1-2 South Pacific Tsunami and Classes 1-3 Sulawesi-Palu, for one of the model classes  (k  {1,2,3}) and for the damage thresholds D j ,   2:  .The colors of the hierarchical robust fragility curves, labled as D j -BMCS, match closely those shown in Tables1 and 2. The corresponding 1 confidence interval curve, which reflects the uncertainty in the model parameters, is shown as a light grey area with different color intensities.380 Figures 2b to Figure 6b compare the hierarchical robust fragility and its confidence interval, with the result of hierarchical fragility assessment based on maximum likelihood estimation (see previous Section 3.5), labeled as D j -MLE.The fragility curves are shown with similar colors (and darker intensity) and with the same line type (and half of the thickness) of the corresponding robust fargility curves.The first observation is that the results of MLE-based fragilities and the BMCS-based fragilities 385 are quite close in all damage thresholds (as expected, see Jalayer and Erahimian 2020).Moreover, the BMCS provides also the confidence bands for the fragility curves, which cannot be directly provided by the MLE method.To showcase an individual fragility curve, Figure 2c to Figure 6c illustrate the empirical fragility curves associated with the l th realization of the vector of model parameters  , for model class  (where l is defined on each figure separately), i.e.,    ,  , (see Section 390 2.5).Figures 2d to Figure 6d illustrate the robust fargility curve associated with the ultimate damage threshold D index(N) , together with all the sample fragilities.The intensity values for which the damage level is not exceeded are shown with blue circles having the probability equal to zero.Other IMs that lead to the exceedance of the damage level are shown with red circles with a probability equal to one.

D
depth [m] Probability of exceeding damage level MLE-based fragility assessment, Model 2, Palu-Sulawesi Tsunami, Class 3 Let us define the vector of model parameters  for model class  as   , ,  , ,  0:  1 .We use the Bayes theorem to write the "evidence"  | provided by data D for model  as follows:

Table 4 .
The model parameters  .

Table 5 .
The Model parameters  .