Well, I have finally decided to write some econometrics routines in F#. I first did this type of stuff in FORTRAN when I was a grad student, so I figured I'd try to see if I could still figure it all out.
But, first things first.
We need routines to Transpose a matrix and to Multiply two matrices.
My transpose method is this:
--------------------------------------------------------------
//
// Let's make up some data
//
let n = 6
let k = 3
// Create data array - n x k
let x0 = Array2D.zeroCreate<float> n k
x0.[0,0] <- 1.0
x0.[1,0] <- 1.0
x0.[2,0] <- 1.0
x0.[3,0] <- 1.0
x0.[4,0] <- 1.0
x0.[5,0] <- 1.0
x0.[0,1] <- 22.0
x0.[1,1] <- 4.0
x0.[2,1] <- 13.0
x0.[3,1]...