# NOT RUN {
## Simple definition of the function:
pobs
# }
# NOT RUN {
<!-- %packageDescription("Matrix")% for debugging checks / Matrix -->
# }
# NOT RUN {
## Draw from a multivariate normal distribution
d <- 10
set.seed(1)
P <- Matrix::nearPD(matrix(pmin(pmax(runif(d*d), 0.3), 0.99), ncol=d))$mat
diag(P) <- rep(1, d)
n <- 500
x <- MASS::mvrnorm(n, mu = rep(0, d), Sigma = P)
## Compute pseudo-observations (should roughly follow a Gauss
## copula with correlation matrix P)
u <- pobs(x)
plot(u[,5],u[,10], xlab=quote(italic(U)[1]), ylab=quote(italic(U)[2]))
# }
# NOT RUN {
## All components: pairwise plot
pairs(u, gap=0, pch=".", labels =
as.expression( lapply(1:d, function(j) bquote(italic(U[.(j)]))) ))
# }
Run the code above in your browser using DataLab