Build a measurement-error covariance from marginal variances and a correlation
Source:R/dgp.R
build_sigma_u.RdAssembles a J x J covariance with the supplied marginal variances on the
diagonal and a common pairwise correlation rho off the diagonal. Used to
configure the multivariate surrogate noise in generate_aft_data().
Usage
build_sigma_u(sigma_u_sq = c(2, 2.5, 3), rho = 0.4)Examples
build_sigma_u(c(2.0, 2.5, 3.0), rho = 0.4)
#> [,1] [,2] [,3]
#> [1,] 2.0000000 0.8944272 0.9797959
#> [2,] 0.8944272 2.5000000 1.0954451
#> [3,] 0.9797959 1.0954451 3.0000000