Skip to content

Matrix multiplication with correlated vector components #40

Description

@charvey23

Very excited to have come across this code and implement it for my experimental analysis! I have been running into one issue when implementing the code. I have a vector of values each of which has an uncertainty associated with it and each value of the vector is correlated to the others. I have attempted to set correlation following this convention:
correl(vec[1],vec[2]) <- some_number
This does not throw an error however I then print correl(vec[1],vec[2]) and it returns NULL as if it had not been set.

My fix has been to break down all of my vector components (i.e. vec1 = vec[1], vec2 = vec[2]) then assign the correlation to vec1 and vec2. This is not a clean solution because I need to multiple this vector by a matrix so this leads to hand writing out matrix multiplications which is tedious. I really would like to keep the known correlation between the vector components because in matrix multiplication they are being added together and I would like to keep track of that error.

On that note, the matrix operator %*% does not seem to be overloaded to bring along the errors even if I didn't need to hand write out the equations due to the correlation issues.

Am I misunderstanding how to set correlations between different elements of a vector/matrix? If not, could I request this feature and the %*% overload be added if possible as it would save a lot of time?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions