require(mvtnorm)
x = mvrnorm(n = 100, mu = c(0,0), Sigma = 3*diag(2))
y = rmvt(n = 100, sigma = diag(2), df = 2)
scaleCurve(x, y, method = "Projection", plot = TRUE)
## comparing of two scale curves - normal distribution and mixture of normal distributions
x = mvrnorm(100, c(0,0), diag(2))
y = mvrnorm(80, c(0,0), diag(2))
z = mvrnorm(20, c(5,5), diag(2))
scaleCurve(x, rbind(y,z), method = "Projection", name = "N", name_y = "Mixture of N")Run the code above in your browser using DataLab