0

I'm very new to R and need to calculate some things for my thesis with the fastSOM package. I already created the necessary cov matrix (4x4 matrix). Now to run the calculation for the spillovers, I need a variable "A". As stated in the package description, A has to be "Either a 3-dimensional array with A[„h] being MA coefficient matrices of the same dimension as Sigma or a list thereof."

That's the point where I am stuck since I have little clue how to create this A for my given problem.

I hope someone can help me out here. Thanks a lot.

  • 1
    Post code that creates a valid example. Look up “how to make a great reproducible example in R” – IRTFM Oct 19 '19 at 10:34
  • The code for an easy example is: N <- 10 Sigma <- crossprod(matrix(rnorm(N*N),nrow=N)) H <- 10 A <- array(rnorm(N*N*H),dim=c(N,N,H)) soi(Sigma,A) In my case, I created Sigma as a covariance matrix of stock returns on different financial markets over 3 years. Now I stuck in creating the corresponding A – Economist93 Oct 19 '19 at 11:43
  • Are you sure that will deliver a valid covariance matrix? My memory is that they need to be symmetric and positive-definite. Also do NOT use comments do deliver code. See [ask] – IRTFM Oct 20 '19 at 02:53

0 Answers0