I have two matrices, both 46175 * 741 (Rows of variables by columns of individuals/observations). Matrix A contains a categorical (perhaps dependent) variable (0/1/2 or NA) and Matrix B is continuous and independent (Ranging from 0 to a couple 100).
I want to see if there is a relationship between these data. Firstly, am I correct in thinking that LDA in R is a valid way to test this? If so, how exactly do I run this?
z <- lda(data= MatrixA , x= MatrixB, grouping=MatrixB) is the closest I've gotten, but it doesn't work. I get:
z <- lda(data= MatrixA , x= MatrixB, grouping=MatrixB) Error in lda.default(x, grouping, ...) : nrow(x) and length(grouping) are different Data Snippet:
Matrix A ------------------------- SampleA SampleB SampleC NA 0 1 NA NA NA 1 2 0 0 0 0 Matrix B ----------------------- SampleA SampleB SampleC 0 0 0 83 124 56 39 45 5 12714 12477 8751 The matrices contain data on the same individiuals, in the same order of columns and rows. Matrix A contains genotypes (genetic information) that is either 0/1/2 or could not be obtained (NA). MatrixB is the number of reads aligned to that region. Zero in this is therefore not the same as zero in MatrixA and is more similar to its NA.
strof MatrixA and MatrixB ? What are those matrices? $\endgroup$