Test whether time of maximum differs across two groups Suppose I have 10 repeated measurements of a quantitative variable $X$ of the individuals within two groups (let's call them A and B). For each group, I have the estimated means of variable $X$ at the 10 time points, that is, $$\hat{\mu}_1^A, \hat{\mu}_2^A, \ldots, \hat{\mu}_{10}^A$$ and $$\hat{\mu}_1^B, \hat{\mu}_2^B, \ldots, \hat{\mu}_{10}^B,$$
and the corresponding $10 \times 10$ variance-covariance matrices of these estimates.
Tests of $$H_0: \mu_t^A = \mu_t^B$$ (for $t = 1, \ldots, 10$) can be easily conducted using Wald-type tests (with an appropriate correction for multiple testing) with: $$z = \frac{\hat{\mu}_t^A - \hat{\mu}_t^B}{\sqrt{Var(\hat{\mu}_t^A) + Var(\hat{\mu}_t^B)}}.$$
Now I want to test whether the time point of the maximum within each group differs across the two groups. I suppose the null hypothesis could be written as $$H_0: t = t' \; \text{for} \max({\mu}_t^A) \; \text{and} \max({\mu}_{t'}^B).$$ What would be a way of testing that?
EDIT: Some R code to simulate data to play with.
library(MASS)

### number of individuals in the two groups
n1 <- 50
n2 <- 50

### assume a flat trajectory with a single peak at times 4 and 6 in the respective groups
mu1 <- rep(0,10)
mu2 <- rep(0,10)
mu1[4] <- 1
mu2[6] <- 1

### make the raw data autocorrelated with an AR1 structure
V1 <- 5 * toeplitz(ARMAacf(ar=.7, lag.max=9))
V2 <- 5 * toeplitz(ARMAacf(ar=.7, lag.max=9))

### simulate raw data
X1 <- mvrnorm(n1, mu1, V1)
X2 <- mvrnorm(n2, mu2, V2)

### observed means over time in each group
m1 <- apply(X1, 2, mean)
m2 <- apply(X2, 2, mean)

### find time of the maximum mean in each group
tmax1 <- which(m1 == max(m1))
tmax2 <- which(m2 == max(m2))

### plot means over time in each group
plot(1:10, m1,  type="o", pch=19, ylim=range(c(m1,m2)), col="red", xlab="Time", ylab="Mean")
lines(1:10, m2, type="o", pch=19, ylim=range(c(m1,m2)), col="blue")
points(tmax1, max(m1), pch=19, cex=2, col="red")
points(tmax2, max(m2), pch=19, cex=2, col="blue")

And an example of what the resulting plot looks like.

 A: Well, I'm not entirely sure whether I found an answer... but my idea won't fit into a comment. So I'll post and see what the smarter people here point out.
As I commented above, I'd bootstrap the max time within each group, but stratified by individual - by resampling rows of X1 and X2:
library(boot)
b1 <- boot(X1,statistic=function(X,index)which.max(apply(X[index,],2,mean)),10000)
b2 <- boot(X2,statistic=function(X,index)which.max(apply(X[index,],2,mean)),10000)

Then we can look at the distribution of the differences in the bootstrapped maxima:
foo <- b1$t-b2$t
ecdf(foo)(0)
hist(foo,breaks=seq(-10.5,10.5))


Now, the ecdf at zero tells us that 96.89% of differences are less than zero, which in some circles would be enough to claim $p<0.05$ and call it a day ;-) However, I really don't understand where the two peaks in the histogram come from. Does anybody have an idea?
(Fun question, anyway...)

EDIT: just for kicks, here is the other approach that could reasonably be taken - tabulate the max times for each individual by group and perform a $\chi^2$ test:
incidence <- cbind(
    table(factor(apply(X1,1,which.max),levels=1:10)),
    table(factor(apply(X2,1,which.max),levels=1:10)))
chisq.test(incidence)

