Skip to content

collinearity error with control vs treatment test for multiple subjects #9

@shobhitagrawal1

Description

@shobhitagrawal1

Hi,
Really interesting work and really thankful for the general ease of use!
The data I have has several subjects,each belonging to either control or treatment so the formula i am trying is
lemur(sce, design = ~ subject + condition, n_embedding = 30, test_fraction = 0.5)
however I am getting this error

Error in handle_design_parameter(design, data, col_data) :
The model matrix seems degenerate ('matrix_rank(design_matrix) < ncol(design_matrix)'). Some columns are perfectly collinear. Did you maybe include the same coefficient twice?

Now my understanding is that the one-hot encoding for each of control and treatment is being declared as collinear, could you please tell me how one can run a typical multi-subject (assuming them to be biological replicates) two condition analysis ..

appreciate any help.
thanking you
shobhit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions