Closed edridgedsouza closed 3 months ago
Diagnosed the issue here. The NA values were caused because of my experimental design, where each image was from a different sample. In the mixed model, the + (1|subject)
term naturally breaks the model in a way that isn't the case for the simple linear model. A simple fix would be to display an error/warning message when running the lmer test so the user is aware their input experimental design is incompatible with a mixed model, and that the regular lm can be invoked by omitting the subject
parameter in spicy()
.
Hi Edridge,
Thanks for pointing this out! The spicy()
function has now been updated to reflect these recommended changes, and converts the mixed model to a linear model when there's a 1-to-1 mapping between the images and the subjects.
When I run
spicy
on my data, the functions will finish running, but any downstream functions will break because the resulting objects don't have any coefficients. Inspecting the objects, I see NA values in the data frame which has only an(Intercept)
column, and NA as well in thep.values
slot. I'm not sure how to reproduce this fully, but I obtained the x and y locations from seurat'sGetTissueCoordinates()
function.This is what I ran:
My first instinct was to think that I simply have no significant results, but I then even if that were the case, I would still be able to see a large value in the p.value slot. So I'm wondering if there's a way to fix my input so that I don't keep getting these NAs and missing coefficient columns. Tracing back through the source I think it has something to do with this block of code but I'm not sure how exactly I can prevent or fix it.