i'm currently analyzing longitudinal data which every subject's observation is obtained by hourly. (time points may greater than years)
More specifically, subject represents solar panels and covariates like Treatment, irradiation, humidity.. etc are obtained by subject for every time points.
Treatment is given in certain random time points $t_i$ for each subject $i$, where $ 1\leq t_i \leq n_i$. ($n_i$ represents the observed number of data points for subject $i$)
Here, Treatment level is binary type like A(not given), B(given) and i'm interested in whether Treatment B is statistically significant.
Is there any kind of statistical test / model for this kind of data?