Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data type of "sigma" #6

Open
cjvanlissa opened this issue Jan 10, 2019 · 2 comments
Open

Data type of "sigma" #6

cjvanlissa opened this issue Jan 10, 2019 · 2 comments
Assignees

Comments

@cjvanlissa
Copy link
Owner

Sigma is now an atomic vector, covariance matrix, or list of covariance matrices. Would it not be more practical to use an array? List implies that the covariance matrices can have different dimensions - but this seems like something that should not be allowed.

@xingu123
Copy link
Collaborator

Indeed, covariance matrices should have the same dimension in Bain. I used list because 1. it is easier to use than arrary with which users should understand which dimension is for the number of matrices. To me it is easier to construct a list of matrices rather than a three dimension array. 2. it is easier to handle as we can use length(), lapply() et al. functions on it.

@cjvanlissa
Copy link
Owner Author

I'm not sure I agree that it is easier for us to use. Array is a simpler datatype than list. With three-dimensional arrays, for example, you can just use apply(x, 3, ...) across the third dimension, and instead of length you can use dim()[3].
For end users, however, you might be right that it's easier to understand. I'll keep this issue open for a bit, because I had a bug which could be traced back to the different data types sigma can have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants