collinearity error with control vs treatment test for multiple subjects
- Dominant language
- R
- Stars
- 102
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reported handle_design_parameter error and the example formula using subject and condition. Reproduce the model-matrix rank failure with a multi-subject control/treatment design, then determine whether the supported design or its guidance needs clarification. Done means the expected two-condition analysis can be run or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100