# Comparing two curves of medical longitudinal data

I study the use of the emergency treatment by children with asthma at home using electronic monitoring devices. For each child, I will have the date and time of each actuation of their emergency treatment. Thus, on a x-axis corresponding to time, I have for each asthma attack the following patterns:

Child A: ++++++++  +   + +     +         +
Child B: +++      ++++        ++++        ++++     +++
Child Etc.


I also know if children were improved after their use of treatment (= success) or not (= failure). I am interested in determining the pattern of use of treatment associated with success (in other words, I would like to know if it is better to use a lot of treatment in the early phase then decrease quickly like child A, or to give few puffs every X minutes like child B, or any other pattern, like child etc.). I have no a priori idea of the pattern I will find, thus my idea would be to model the pattern of use of treatment for asthma attacks were symptoms improved (= success), and the pattern of use of treatment for asthma attacks were symptoms did not improved (= failure), and to compare the two patterns.

I would be very interested in your ideas on whether it would make sense to compare the two "patterns of use", and how from a statistical perspective.

There's a risk here of circular logic, related to the problem of survivorship bias. The pattern of treatment use might be due to the probability of treatment success rather than the other way around, as you would like to infer.

For an extreme example, say that a child has a mild asthma attack that might well have resolved on its own. The child takes just one emergency treatment, and the attack ends. With many cases like that, under your interpretation of patterns you might be tempted to say that a single emergency treatment is the "best" pattern.

Similar problems might arise with any attempts to interpret differences in patterns of treatment as a function of eventual treatment success. Discuss these issues carefully with colleagues who understand the subject matter well.

• I think that's the big problem here, it's not clear which way round the causality is. E.g. lots of treatment/not stopping, because not improving, or not improving because too much treatment etc. The proper study design would be a randomized study, where every treatment decision along the way gets randomized, which sounds incredibly challenging to do in practice (so understand where the OP is coming from with trying to do this with observational data). Mar 16 at 15:35
• One potential idea is to model each treatment decision (take another dose or not), which at a minimum would have to take into account how the patient is doing after the previous decision to treat/not treat (you may not have the necessary resolution over time). Mar 16 at 15:35