Skip to contents

Draw a correlated sample of spectral accelerations

Usage

sampleSaCorr(uhs, Tn, rho, NS)

Arguments

uhs

data.table with columns Tn, p, Sa (must include p == "mean").

Tn

numeric vector; the first element is the reference period Tn[1], e.g., 0.01 or 0.00. It does not have to be sorted.

rho

numeric vector of length length(Tn) - 1; correlations between the reference period Tn[1] and each remaining period.

NS

integer, Monte Carlo sample size.

Value

matrix of dimension NS x length(Tn) with Sa draws (g).

Examples

if (FALSE) { # \dontrun{
uhs <- data.table::data.table(
  Tn = c(0, 0, 0, 1, 1, 1),
  p  = c("0.16", "mean", "0.84", "0.16", "mean", "0.84"),
  Sa = c(0.3, 0.5, 0.7, 0.1, 0.2, 0.3)
)
rho <- rhoBJ(Tn = 1.0, T0 = 0.01)
mat <- sampleSaCorr(uhs, Tn = c(0, 1), rho = rho, NS = 100)
} # }