First-time poster here. I would like to hear your input on how to analyse the data from the following study.

I plan to do an **exploratory analysis** of the changes in the immune cell frequencies (flow cytometry data) over time upon infection. **Four volunteers** were enrolled in a controlled human infection trial and then followed up at **six time points**. The follow-up time was long enough until the volunteers can be considered to have a chronic infection before the infections were abrogated.

I am primarily interested to see which immune cell subsets that changed over the period of infection (i.e. the effect of time with cell frequencies as the outcome). Due to the natural history of infection (acute & chronic), I expect **nonlinear** changes of the cell frequencies over time (such as a rapid increase of the cell frequencies during the acute phase and then decrease, and so on). Multiplicity is a concern as I am looking at many immune cell subsets. Thanks to the recent *BBR Course Video Series*, I am considering to do Bayesian analysis of such data.

Unfortunately, I have no practical experience in analysing nonlinear repeated measures data and also Bayesian data analysis. At this point, I could think of doing a model comparison of the full model *(cell frequencies ~ time)* against the null *(cell frequencies ~ 1)* to get the answer to which cell subsets change throughout infection. I have also heard about GAM, but my knowledge is merely scratching the surface.

This is, I repeat, an *exploratory study*. However, I would like to get the most out of it (without P-hacking) so that I can do a future study with more individuals as well as a smaller set of immune cells to be investigated.

I look forward to your input.

1 Like

my understanding: at 6 time points you have counts for numerous cell subsets within individuals

how many cell subsets?

Yes, you’re right. We are limiting ourselves to ~30 cell subsets but it can be more than that.

i wonder if this is relevant: Handling Multiplicity in Neuroimaging Through Bayesian Lenses with Multilevel Modeling it’s a paper ive mentioned on here before

personally i would begin with a visual inspection: counts over time for each cell subset, one plot per individual, a grid of 4, just to see what is going on. But the above paper maybe gives the rigour needed

edit: if you cant access the paper, here is the preprint: https://www.biorxiv.org/content/10.1101/238998v2.full.pdf

1 Like

Thanks! I am sure that it is impossible for me to come across this paper without you pointing it out. This paper is highly relevant as it also tackles the problem of multiple testing (my case: multiple cell subsets; their case: multiple regions of brain scans) and multiple comparisons (repeated measurements). Too bad the algorithm is embedded in some software that I am totally not familiar with. However, I can see that it seems to be implemented with `brms`

. A bit of digging around may help me to find the `R`

implementation of this method.

Again, thanks for the paper!

This paper is interesting as it allows ‘information sharing’ across the cell types, which cannot be done by simply doing (cell type ~ week) multiple times for all cell types. But seems a bit complicated to implement myself in R…

If I do mixed effects model with `brms`

for all the cell types then it would also be possible, right? So something like:

```
model <- brm(cell ~ week + (1|subject), data = data, family = binomial, weights = totalCells)
```

`cell`

is the count of a certain cell type in an individual, and `totalCells`

as the amount of total cells that were analysed.

Or to have a smooth term, to accommodate the changes of cell frequency over the course of infection:

```
model2 <- brm(cell ~ s(week) + (1+week|subject), data = data, family = binomial, weights = totalCells)
```

1 Like

i need to have a closer look at the paper. i’ve been intending to dig into it for some time ie intending to implement it, but i’m a sas user and would code in that, i likely won’t get to it for a while…