Skip to contents

Transforms a rock spectrum represented at each oscillator period as a finite lognormal mixture into the corresponding site spectrum, integrating the site factor of evaluateSiteFactor() over the rock PGA of each component with Gauss-Hermite quadrature. Every quadrature node becomes one component of the returned mixture, so the result is again an analytic mixture: summarizeMixture() reduces it to quantiles and mean, and refineSiteMixture() chooses the order.

Usage

integrateSiteMixture(mixture, VS30, Vref, model, order)

Arguments

mixture

A table with one row per (Tn, k) and columns Tn (oscillator period, s), k (component label), muLn, sigmaLn (natural-log location and scale, sigmaLn non-negative) and w (positive weights summing to one at every period). It must hold the PGA rows (Tn == 0), and every component used at another period must have a PGA row of the same label.

VS30

One target velocity in m/s.

Vref

One reference velocity in m/s; 760 or 3000 unless it equals VS30.

model

Site factor model of evaluateSiteFactor(), "ST20" or "ST17".

order

One integer, at least 2: Gauss-Hermite nodes per component.

Value

A data.table with Tn (s), k, muLn, sigmaLn and w, ordered by Tn and k: the site spectrum as a lognormal mixture at every period, conditional on the target velocity and the model, its population being that of the rock mixture. mixture is not modified.

Mathematics

At period \(T_n\) the rock component \(k\) gives \(\ln S_a \sim N(\mu_k, \sigma_k)\) with weight \(w_k\), and the component of the same label at \(T_n = 0\) gives \(\ln PGA \sim N(\mu_{0k}, \sigma_{0k})\). With the Gauss-Hermite rule of order nodes \(x_m\) and weights \(\omega_m\) normalized to one (Golub-Welsch, weight \(e^{-x^2}\)), the PGA nodes are \(\ln PGA_{km} = \mu_{0k} + \sqrt{2} \sigma_{0k} x_m\). With \(\rho = \rho_{BJ}(\max(T_n, 0.01), 0.01)\) of correlateResiduals(), \(\rho_k = \rho\) and \(r_k = \sigma_k / \sigma_{0k}\) when \(\sigma_{0k} > 0\) and both zero otherwise, the ordinate conditional on the PGA node is $$\ln S_a \mid PGA_{km} \sim N(\mu_k + \rho_k r_k (\ln PGA_{km} - \mu_{0k}), \sqrt{1 - \rho_k^2}\, \sigma_k),$$ and with \((\mu_F, \sigma_F)\) of the factor at \(PGA_{km}\) the site component \((k, m)\), labelled "k:m", is $$\mu_{km} = \mu_k + \rho_k r_k (\ln PGA_{km} - \mu_{0k}) + \mu_F, \quad \sigma_{km} = \sqrt{(1 - \rho_k^2) \sigma_k^2 + \sigma_F^2}, \quad w_{km} \propto w_k \omega_m,$$ the weights renormalized to one at every period. The site residual is taken independent of the rock residual given PGA. When VS30 equals Vref the site mixture is the rock mixture. No random numbers are drawn; the error of the order is not measured here (see refineSiteMixture()).

Examples

Mixture <- data.table::CJ(Tn = c(0, 0.2, 1), k = c("a", "b"))
Mixture[, `:=`(muLn = log(0.4) + 0.1 * (k == "b") - 0.5 * Tn, sigmaLn = 0.5, w = 0.5)]
#> Key: <Tn, k>
#>       Tn      k       muLn sigmaLn     w
#>    <num> <char>      <num>   <num> <num>
#> 1:   0.0      a -0.9162907     0.5   0.5
#> 2:   0.0      b -0.8162907     0.5   0.5
#> 3:   0.2      a -1.0162907     0.5   0.5
#> 4:   0.2      b -0.9162907     0.5   0.5
#> 5:   1.0      a -1.4162907     0.5   0.5
#> 6:   1.0      b -1.3162907     0.5   0.5
integrateSiteMixture(Mixture, VS30 = 360, Vref = 760, model = "ST20", order = 16)
#>        Tn      k        muLn   sigmaLn            w
#>     <num> <char>       <num>     <num>        <num>
#>  1:   0.0    a:1 -4.07227009 0.3001148 7.489074e-11
#>  2:   0.0   a:10 -0.45403220 0.3436244 7.916919e-02
#>  3:   0.0   a:11 -0.11870193 0.3611579 2.364238e-02
#>  4:   0.0   a:12  0.22174094 0.3825849 3.633469e-03
#>  5:   0.0   a:13  0.57309755 0.4081712 2.629925e-04
#>  6:   0.0   a:14  0.94382934 0.4384487 7.650016e-06
#>  7:   0.0   a:15  1.34910175 0.4746981 6.547366e-08
#>  8:   0.0   a:16  1.82717329 0.5207557 7.489074e-11
#>  9:   0.0    a:2 -3.50358254 0.3003439 6.547366e-08
#> 10:   0.0    a:3 -3.02819994 0.3008427 7.650016e-06
#> 11:   0.0    a:4 -2.60101580 0.3018383 2.629925e-04
#> 12:   0.0    a:5 -2.20495637 0.3036751 3.633469e-03
#> 13:   0.0    a:6 -1.83102926 0.3068213 2.364238e-02
#> 14:   0.0    a:7 -1.47334911 0.3118378 7.916919e-02
#> 15:   0.0    a:8 -1.12732332 0.3193112 1.432843e-01
#> 16:   0.0    a:9 -0.78886995 0.3297702 1.432843e-01
#> 17:   0.0    b:1 -3.97373306 0.3001390 7.489074e-11
#> 18:   0.0   b:10 -0.36857139 0.3477454 7.916919e-02
#> 19:   0.0   b:11 -0.03417474 0.3661471 2.364238e-02
#> 20:   0.0   b:12  0.30555261 0.3883849 3.633469e-03
#> 21:   0.0   b:13  0.65637637 0.4147003 2.629925e-04
#> 22:   0.0   b:14  1.02672026 0.4456183 7.650016e-06
#> 23:   0.0   b:15  1.43171486 0.4824275 6.547366e-08
#> 24:   0.0   b:16  1.90958764 0.5289893 7.489074e-11
#> 25:   0.0    b:2 -3.40603575 0.3004142 6.547366e-08
#> 26:   0.0    b:3 -2.93188287 0.3010072 7.650016e-06
#> 27:   0.0    b:4 -2.50617067 0.3021766 2.629925e-04
#> 28:   0.0    b:5 -2.11177498 0.3043029 3.633469e-03
#> 29:   0.0    b:6 -1.73961030 0.3078852 2.364238e-02
#> 30:   0.0    b:7 -1.38367598 0.3134972 7.916919e-02
#> 31:   0.0    b:8 -1.03927050 0.3217098 1.432843e-01
#> 32:   0.0    b:9 -0.70223368 0.3330086 1.432843e-01
#> 33:   0.2    a:1 -3.58828671 0.3450321 7.489074e-11
#> 34:   0.2   a:10 -0.46681244 0.3673727 7.916919e-02
#> 35:   0.2   a:11 -0.19685655 0.3787511 2.364238e-02
#> 36:   0.2   a:12  0.07287302 0.3938000 3.633469e-03
#> 37:   0.2   a:13  0.34747420 0.4130450 2.629925e-04
#> 38:   0.2   a:14  0.63403632 0.4371810 7.650016e-06
#> 39:   0.2   a:15  0.94463103 0.4675207 6.547366e-08
#> 40:   0.2   a:16  1.30866511 0.5076983 7.489074e-11
#> 41:   0.2    a:2 -3.08754701 0.3451057 6.547366e-08
#> 42:   0.2    a:3 -2.66940417 0.3452724 7.650016e-06
#> 43:   0.2    a:4 -2.29450167 0.3456234 2.629925e-04
#> 44:   0.2    a:5 -1.94836816 0.3463151 3.633469e-03
#> 45:   0.2    a:6 -1.62383262 0.3475966 2.364238e-02
#> 46:   0.2    a:7 -1.31656173 0.3498302 7.916919e-02
#> 47:   0.2    a:8 -1.02331791 0.3534919 1.432843e-01
#> 48:   0.2    a:9 -0.74111888 0.3591422 1.432843e-01
#> 49:   0.2    b:1 -3.48958897 0.3450398 7.489074e-11
#> 50:   0.2   b:10 -0.38566132 0.3699590 7.916919e-02
#> 51:   0.2   b:11 -0.11759127 0.3821534 2.364238e-02
#> 52:   0.2   b:12  0.15060473 0.3980531 3.633469e-03
#> 53:   0.2   b:13  0.42400998 0.4181382 2.629925e-04
#> 54:   0.2   b:14  0.70967072 0.4430713 7.650016e-06
#> 55:   0.2   b:15  1.01960323 0.4741517 6.547366e-08
#> 56:   0.2   b:16  1.38315470 0.5150296 7.489074e-11
#> 57:   0.2    b:2 -2.98978386 0.3451287 6.547366e-08
#> 58:   0.2    b:3 -2.57286688 0.3453290 7.650016e-06
#> 59:   0.2    b:4 -2.19953592 0.3457469 2.629925e-04
#> 60:   0.2    b:5 -1.85533185 0.3465620 3.633469e-03
#> 61:   0.2    b:6 -1.53304251 0.3480526 2.364238e-02
#> 62:   0.2    b:7 -1.22823411 0.3506118 7.916919e-02
#> 63:   0.2    b:8 -0.93752186 0.3547381 1.432843e-01
#> 64:   0.2    b:9 -0.65776130 0.3609965 1.432843e-01
#> 65:   1.0    a:1 -2.55586619 0.4830057 7.489074e-11
#> 66:   1.0   a:10 -0.54196296 0.4947013 7.916919e-02
#> 67:   1.0   a:11 -0.33906813 0.4989103 2.364238e-02
#> 68:   1.0   a:12 -0.13105602 0.5040429 3.633469e-03
#> 69:   1.0   a:13  0.08523912 0.5102441 2.629925e-04
#> 70:   1.0   a:14  0.31473814 0.5177549 7.650016e-06
#> 71:   1.0   a:15  0.56664019 0.5270498 6.547366e-08
#> 72:   1.0   a:16  0.86466261 0.5393789 7.489074e-11
#> 73:   1.0    a:2 -2.25556568 0.4831000 6.547366e-08
#> 74:   1.0    a:3 -2.00195930 0.4832934 7.650016e-06
#> 75:   1.0    a:4 -1.77113922 0.4836532 2.629925e-04
#> 76:   1.0    a:5 -1.55383916 0.4842672 3.633469e-03
#> 77:   1.0    a:6 -1.34510261 0.4852373 2.364238e-02
#> 78:   1.0    a:7 -1.14173939 0.4866696 7.916919e-02
#> 79:   1.0    a:8 -0.94139007 0.4886650 1.432843e-01
#> 80:   1.0    a:9 -0.74208270 0.4913144 1.432843e-01
#> 81:   1.0    b:1 -2.45592985 0.4830159 7.489074e-11
#> 82:   1.0   b:10 -0.44238490 0.4956949 7.916919e-02
#> 83:   1.0   b:11 -0.23950674 0.5001036 2.364238e-02
#> 84:   1.0   b:12 -0.03150689 0.5054394 3.633469e-03
#> 85:   1.0   b:13  0.18477940 0.5118461 2.629925e-04
#> 86:   1.0   b:14  0.41427212 0.5195659 7.650016e-06
#> 87:   1.0   b:15  0.66616973 0.5290776 6.547366e-08
#> 88:   1.0   b:16  0.96418900 0.5416456 7.489074e-11
#> 89:   1.0    b:2 -2.15566854 0.4831281 6.547366e-08
#> 90:   1.0    b:3 -1.90210703 0.4833548 7.650016e-06
#> 91:   1.0    b:4 -1.67133581 0.4837702 2.629925e-04
#> 92:   1.0    b:5 -1.45408548 0.4844673 3.633469e-03
#> 93:   1.0    b:6 -1.24539620 0.4855504 2.364238e-02
#> 94:   1.0    b:7 -1.04207511 0.4871238 7.916919e-02
#> 95:   1.0    b:8 -0.84176130 0.4892837 1.432843e-01
#> 96:   1.0    b:9 -0.64248251 0.4921149 1.432843e-01
#>        Tn      k        muLn   sigmaLn            w
#>     <num> <char>       <num>     <num>        <num>