Multiple covariates use case
Hello authors of sccomp!
Not a bug here, but just wondering what the correct way to specify this regression is. I'm trying to regress cell type abundance (as specified by the 'annot' column) on grade (factor), whilst controlling for subtype (factor) and age (integer). The code isn't working as is. Hard to report what the problem is right now so just posing an open question in case I'm missing something obvious.
Thanks!
sccomp_result =
seurat |>
sccomp_estimate(
formula_composition = ~ grade + subtype + age,
.sample = batch,
.cell_group = annot,
bimodal_mean_variability_association = TRUE,
cores = 16
) |>
sccomp_remove_outliers(cores = 1) |> # Optional
sccomp_test()
Thanks!
Hello Andrew, can you please copy/paste the full error, and an anonimised dataset to reproduce the error?
Thanks.
Ah realized I was supposed to put patient id in the sample slot not single cell ids... this was the final regression that I did.
sccomp_result =
seurat |>
sccomp_estimate(
formula_composition = ~ grade + subtype + age + (1|batch),
.sample = donor,
.cell_group = annot,
bimodal_mean_variability_association = TRUE,
cores = 16
) |>
sccomp_remove_outliers(cores = 1) |> # Optional
sccomp_test()