Multilevel modeling with small N and large number of observations

#1
I'd like some general help figuring out which statistical approaches might be useful for my current situation. I'm working with:
  • A sample of 9 subjects; id
  • A 'time' variable (measured in seconds [0...~15000]) consisting of about 15,000 observations per subject; time
  • A continuous dependent variable: tissue pH; pH
  • One factor variable: levels = Before, During, and After an intervention occurs intervention
I would like to be able to evaluate whether or not the intervention variable is associated with changes pH over time, accounting for within-subject correlation.
I attempted to fit a mixed model using R's lme4 package, which looked like:
# First model:
model1 <- lmer(pH ~ 1 + time*intervention + (1 + time | id), data = mydata)
# Did not converge

# Removed the interaction variable to see if that was the issue:
model2 <- lmer(pH ~ 1 + time + (1 + time | id), data = mydata)
# Still would not converge
So I'm wondering what the issue might be. Is it a sample size issue? Is it the number of observations? Or am I going about this completely the wrong way? I've searched all this website and in several books on longitudinal analysis and multilevel analysis over multiple weeks, and have yet to find someone with a similar situation. I would greatly appreciate any suggestions anyone has to offer.
 

noetsi

Fortran must die
#2
If you are really running multilevel modeling (I am not certain what you mean by that, it means to do regression nested inside groups to me) then 9 groups are not enough. 30 groups would be the minimum you would consider (although there are transformations to address this if you have the right software, I am not sure how R does this as I work only in SAS). My multilevel thread raises these issues.

Multilevel models with too many random effects commonly do not converge, although again I am not sure that is what you are running [I work within this only for cross-sectional data never time series/test-retest approaches].