Skip to contents

What this vignette helps you do

This vignette is for analysts who need to quantify how logarithmic spectral-acceleration prediction residuals at two oscillator periods tend to vary together. Given two periods in seconds, rhoBJ() returns one dimensionless Pearson correlation coefficient using the empirical model of Baker and Jayaram (2008).

The result describes one period pair. It does not construct, validate, or sample a correlation matrix, and it does not validate downstream site or displacement calculations.

Symbols and units

Symbol Meaning and unit
T0T_0 First oscillator period, in seconds
TnT_n Second oscillator period, in seconds
TminT_{\min} min(T0,Tn)\min(T_0,T_n), in seconds
TmaxT_{\max} max(T0,Tn)\max(T_0,T_n), in seconds
ε(T)\varepsilon(T) Dimensionless natural-log residual between observed and predicted spectral acceleration at period TT
C1,C2,C3,C4C_1,C_2,C_3,C_4 Dimensionless intermediate terms in the published equation
ρ\rho Dimensionless Pearson correlation between ε(T0)\varepsilon(T_0) and ε(Tn)\varepsilon(T_n)

The public mapping is:

  • T0 supplies T0T_0 and defaults to 0.01 seconds.
  • Tn supplies TnT_n.
  • rhoBJ() derives TminT_{\min}, TmaxT_{\max}, and C1C_1 through C4C_4 internally.
  • The returned length-one value is ρε(T0),ε(Tn)\rho_{\varepsilon(T_0),\varepsilon(T_n)}. The residual itself is a statistical quantity, not a function argument.

rhoBJ() depends on the two periods, not on magnitude or distance arguments. Exchanging T0 and Tn leaves TminT_{\min} and TmaxT_{\max} unchanged, so the coefficient is symmetric.

Published model and package convention

Baker and Jayaram fitted the equations below to empirical correlations between logarithmic spectral-acceleration prediction residuals. They support periods from 0.01 through 10 seconds. The fitted form has no physical interpretation and should not be extrapolated beyond that interval (Baker and Jayaram, 2008).

The package adds one numerical convention that is not part of the paper: an input period less than or equal to zero is silently replaced by 0.01 seconds. The default T0 = 0.01 is therefore also used by the package as a numerical proxy for peak ground acceleration. For a positive period outside the published interval, rhoBJ() warns and still returns the unsupported extrapolated value.

Equations

Following Baker and Jayaram (2008), Equations 5 and 6, define Tmin=min(T0,Tn)T_{\min}=\min(T_0,T_n) and Tmax=max(T0,Tn)T_{\max}=\max(T_0,T_n). All periods and numerical period constants in these equations are expressed in seconds.

C1=1cos[π20.366ln(Tmaxmax(Tmin,0.109))]. C_1 = 1-\cos\left[ \frac{\pi}{2}-0.366\ln\left( \frac{T_{\max}}{\max(T_{\min},0.109)} \right) \right].

For Tmax<0.2T_{\max}<0.2,

C2=10.105[111+exp(100Tmax5)]×TmaxTminTmax0.0099, \begin{aligned} C_2 = 1 &-0.105\left[ 1-\frac{1}{1+\exp(100T_{\max}-5)} \right] \\ &\quad\times \frac{T_{\max}-T_{\min}}{T_{\max}-0.0099}, \end{aligned}

and C2=0C_2=0 otherwise. The remaining intermediate terms are

C3={C2,Tmax<0.109,C1,otherwise, C_3 = \begin{cases} C_2, & T_{\max}<0.109,\\ C_1, & \text{otherwise}, \end{cases}

and

C4=C1+0.5(C3C3)[1+cos(πTmin0.109)]. C_4 = C_1 + 0.5\left(\sqrt{C_3}-C_3\right) \left[1+\cos\left(\frac{\pi T_{\min}}{0.109}\right)\right].

The pairwise coefficient is

ρε(T0),ε(Tn)={C2,Tmax<0.109,C1,Tmin>0.109,min(C2,C4),Tmax<0.2,C4,otherwise. \rho_{\varepsilon(T_0),\varepsilon(T_n)} = \begin{cases} C_2, & T_{\max}<0.109,\\ C_1, & T_{\min}>0.109,\\ \min(C_2,C_4), & T_{\max}<0.2,\\ C_4, & \text{otherwise}. \end{cases}

The public arguments map directly to T0T_0 and TnT_n; the return value is ρε(T0),ε(Tn)\rho_{\varepsilon(T_0),\varepsilon(T_n)}. The function performs no random sampling and needs no seed.

Worked example

The following explicit pairs cover the package’s 0.01-second proxy, equal periods, and separated periods. mapply() calls rhoBJ() once for each row because the public function accepts scalar period inputs.

PeriodPairs <- data.frame(
  T0 = c(0.01, 0.3, 0.3, 1.0),
  Tn = c(0.30, 0.3, 1.0, 5.0)
)
PeriodPairs$rho <- mapply(
  FUN = rhoBJ,
  Tn = PeriodPairs$Tn,
  T0 = PeriodPairs$T0
)
PeriodPairs
#>     T0  Tn       rho
#> 1 0.01 0.3 0.7953519
#> 2 0.30 0.3 1.0000000
#> 3 0.30 1.0 0.5734689
#> 4 1.00 5.0 0.4444251

The equal-period row returns one: a residual is perfectly correlated with itself. The other rows remain positively associated, while their smaller coefficients indicate weaker linear co-variation than the equal-period case. These coefficients describe association, not causation or a physical interaction between oscillator periods.

Symmetry is directly visible by reversing a pair:

RhoForward <- rhoBJ(Tn = 1.0, T0 = 0.3)
RhoReverse <- rhoBJ(Tn = 0.3, T0 = 1.0)
identical(RhoForward, RhoReverse)
#> [1] TRUE

Applicability and limits

  • Use the model only for a pair of finite scalar periods expressed in seconds.
  • Treat 0.01 through 10 seconds as the supported published domain.
  • Do not interpret the empirical equation as a physical model or rely on its extrapolation outside the supported domain.
  • Equal periods return approximately one, and reversing the periods returns the same coefficient.
  • The function returns only one pairwise coefficient. It does not establish the validity of any assembled matrix, sampling procedure, or downstream calculation.
  • Successful in-domain calls do not use the random-number generator, mutate inputs, or read or write files. Positive out-of-domain periods produce a warning.

Read the complete rhoBJ() function contract for its inputs, return value, warnings, errors, and side effects. The method authority is Baker and Jayaram (2008).