Wim De Neys
email: wim.de-neys@parisdescartes.fr

Analytic Engagement And The Perils Of Reframing The Dual-And Single-Process Models Debate

In a previous article, I questioned whether the debate between dual-and single-process models of thinking is empirically tractable and argued that psychological scientists should leave it behind. Dewey (in press) suggests that by reframing the debate in cognitive modeling terms it might become tractable and consequential. More specifically, he proposes that focusing on the question as to whether analytic engagement (i.e., the process by which additional resources are allocated to a reasoning problem) is discrete or continuous might allow us to settle the debate. Here I illustrate how this suggestion will likely face the same tractability problems as the original defining features approach that it is supposed to replace.

Introduction

Proponents of single-and dual-process models of thinking have debated for decades whether there is a qualitative or only quantitative difference between intuition and deliberation. In a previous article [START_REF] De Neys | On dual-and single-process models of thinking[END_REF], I reviewed classic arguments and claimed that the current evidence does not allow us to decide the debate. Next, I questioned whether it was possible to settle the debate based on empirical evidence, and argued that even if it was, it would be irrelevant for psychologists because it does not advance the understanding of the processing mechanisms underlying thinking. My main conclusion was that it is time for empirical scientists to leave the debate behind and focus on more critical questions concerning the nature of intuitive and deliberate thinking.

In an interesting commentary, Dewey (in press) suggests that framing the debate in cognitive modeling terms might make it tractable and consequential. What is laudable is that Dewey moves beyond a simple generic claim by developing a concrete theoretical account (see also [START_REF] Dewey | Analytic engagement in single-and dual-process theories[END_REF]). Dewey's proposal focuses on analytic engagement: the process of engaging additional cognitive resources to the reasoning task at hand (e.g., De Neys, 2017;[START_REF] Pennycook | What makes us think? A three-stage dual-process model of analytic engagement[END_REF][START_REF] Thompson | Intuition, reason, and metacognition[END_REF]. Put differently, the process that allows us to switch from mere intuitive to more deliberate thinking. Dewey argues that determining whether analytic engagement is discrete or continuous allows us to settle the debate. He posits that a qualitative dual-process model needs to entail that analytic engagement is discrete: The engagement signal has only two states-"on" or "off"-and once it's switched on, it leads to a discrete amount of deliberation. A single-process model would entail that analytic engagement is continuous. A gradual increase in the analytic engagement signal leads to a gradual increase in deliberation (see [START_REF] Dewey | Analytic engagement in single-and dual-process theories[END_REF], for a detailed account).

I believe Dewey points to a critical question and from a purely theoretical point of view, his suggestion is not unreasonable. The problem is that as soon as we would want to dig into any actual empirical testing, we'll presumably run into the same old issues that plague the classic defining features approach. I'll illustrate this with three simple examples.

First, the proposal puts a lot of explanatory burden on the analytic engagement process. If we want to make any a priori predictions here we need to know how it needs to be conceptualized (i.e., what counts as analytic engagement?) and how we can empirically measure whether it's discrete or continuous in nature. In the ongoing work on conflict detection during thinking that Dewey refers to, the engagement signal is typically operationalized as intuitive doubt in one's response as reflected in a processing slow-down or confidence decrease relative to a baseline, for example (e.g., [START_REF] Bago | Advancing the specification of dual process models of higher cognition: a critical test of the hybrid model view[END_REF][START_REF] De Neys | Bias and conflict a case for logical intuitions[END_REF][START_REF] Pennycook | What makes us think? A three-stage dual-process model of analytic engagement[END_REF]. This readily raises the threshold question. Would a nanosecond slow-down or a 0.01% confidence decrease count as an engagement signal? If not, how do we agree on and determine where the threshold lies? Without such a threshold it will be hard to decide the debate. To illustrate, imagine that after we observe some initial analytic engagement and discrete deliberation, the engagement signal shows a further nanosecond increase (i.e., slow-down). We next observe that this does not lead to any measurable additional deliberation. At this point, Dewey's dual-process theorist can argue that the discrete view is supported. A further engagement signal increase does not lead to further deliberation. However, the single process proponent would simply argue that the signal increase has not reached its minimal threshold yet. So to arrive at a tractable and consequential prediction we need the single-and dual-process theorist to agree on a threshold again. The defining features debate has shown just how problematic this can be.

Second, in addition to the engagement threshold, we also need to decide on what counts as "more" or "non-discrete" deliberation. Empirical testing of the claim will require that we set a defining feature (e.g., computational capacity, speed, … ) so that we know what to measure and decide on a threshold again. Imagine that dual-and single-process theorists agree on the analytic engagement signal threshold. They observe that this threshold is hit and that the signal further increases with one unit (whatever they decided this unit to be). Next, they observe that following the one unit increase, a person reasons for an additional nanosecond longer or allocates 0.01% more computational resources to the reasoning process. Would Dewey's dual-process theorist ever agree that this qualifies as additional non-discrete deliberation? If not, where does the threshold lie or-more generallyhow close does the mapping between variation in the engagement signal and subsequent variation in deliberation need to be, to be qualified as discrete or continuous?

Third, this problem is further exacerbated by the fact that we'll need to distinguish between initial and subsequent deliberation. It is reasonable to assume that after initial deliberation, a reasoner can decide there is a need for additional deliberation (e.g., a problem is not resolved after some initial deliberation and one decides to work harder on it). Therefore, Dewey specifies that his proposal only concerns the initial deliberation engagement. Hence, even in Dewey's dual-process model, there might be further (discrete or continuous) resources allocated to additional deliberation after the initial discrete deliberation stage. But how are we to differentiate between initial and subsequent deliberation? Imagine that the single model proponent observes that after what they consider to be initial engagement, there is a further increase in deliberation beyond the initial deliberation amount. They argue this supports the continuous view. However, the dual-process proponent could simply argue that this results from subsequent deliberation following the initial discrete deliberation. To make predictions here we need to define a threshold or set a criterion. For example, initial deliberation amounts to x time/resources allocated to the problem; anything above x equals subsequent deliberation. How are we ever going to decide on this criterion? Here too the old threshold problem is back in full swing.

In sum, as soon as we'd want to start running empirical studies to decide the re-framed debate we risk being back at square one and we'll still need single-and dual-process proponents to agree on a threshold at which an increase in a continuous measure would be taken as evidence of a true qualitative/quantitative difference. At this point, all we'll have done is to move from a debate as to what counts as a defining feature to a debate as to what counts as discrete or continuous engagement.

Dewey realizes the potential problem. He acknowledges that the actual empirical testing might be difficult or impossible. Nevertheless, he remains optimistic about the possibility of resolving the debate. I'm afraid that given the experience with the defining features approach, I'm far more pessimistic here 1 .

That being said, I do want to stress that Dewey points to an interesting question. Discussions of analytic engagement in the dual (or single) process literature have typically focused on whether deliberation is engaged [START_REF] De Neys | Logic, fast and slow: Advances in dual-process theorizing[END_REF][START_REF] Pennycook | What makes us think? A three-stage dual-process model of analytic engagement[END_REF] and less on the question as to how the amount of deliberation is decided on (although see Ackerman and Thompson, 2017 2 ). An organism that wants to avoid wasting scarce resources needs some means of adjusting the amount of limited resources it allocates to a problem. Hence, the more general question as to how well-calibrated the engagement process is (and what cues are being used to inform the decision, for example), is an interesting one. If we decide on some practical boundaries and operational definitions, we should manage to get at least a rudimentary indication of how fine-grained or sensitive the mapping is (e.g., more fine-or coarse-grained-or, if you wish, more discrete or more continuous like). Although I have no hopes that such experiments will ever satisfy the hardcore single-and dual-process theorists, they should contribute to a better specification of the analytic engagement process.

This underscores my general point that to advance our knowledge of human thinking it is more useful to focus on specific empirical questions rather than on theoretical arguments as to how we need to frame (or re-frame) quantitative and qualitative processing differences. My advice for single-and dual-process theorists therefore stands: drop the quantitative vs qualitative debate and focus directly on the outstanding empirical work.

Acknowledgments

I thank the Agence Nationale de la Recherche for their support (ANR-16-CE28-0010-01). I also thank Bence Bago and Caleb Dewey for a stimulating discussion.


I Castillo

J-M Loubes

Estimation of the distribution of random shifts deformation

Keywords: Semiparametric statistics, Order two properties, Penalized Maximum Likelihood, Practical algorithms. Subject Class. MSC-2000: 62G05, 62G20

, semiparametric estimators are obtained in our discrete framework and their performance studied. From these estimates we construct a nonparametric estimator of the target density. Both rates of convergence and an algorithm to construct the estimator are provided.

Introduction

Our aim is to estimate the common density ϕ of independent random variables θ j , j = 1, . . . , J n , with distribution µ, observed in a panel data analysis framework in a translation model. More precisely, consider J n unknown curves t → f [j] (t) sampled at multiple points t ij = t i = i/n, i = 1, . . . , n, with random i.i.d. translation effects θ j , j = 1, . . . , J n , in the following regression framework

Y ij = f [j] (t ij -θ j ) + σε ij , i = 1, . . . , n, j = 1, . . . , J n , (1)
where ε ij are independent standard normal N (0, 1) random noise and are independent of the θ j 's, while σ is a positive real number which is assumed to be known. The number of points per curve is denoted by n while J n stands for the number of curves.

Equation [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF] describes the situation often encountered in biology, data mining or econometrics (see e.g [START_REF] Rønn | Nonparametric maximum likelihood estimation for shifted curves[END_REF] or [START_REF] Chafai | Maximum likelihood for a certain class of inverse problems: an application to pharmakocinetics[END_REF]) where the outcome of an experiment depends on a random variable θ which models the case where the data variations take into account the variability of each individual: each subject j can react in a different way within a mean behaviour, with slight variations given by the unknown curves f [j] . Estimating ϕ, the density of the unobserved θ j 's, enables to understand this mean behaviour.

Nonparametric estimation of ϕ belongs to the class of inverse problems for which the subject of the inversion is a probability measure, since the realizations θ j are warped by unknown functions f [j] 's. Here, these functions are unknown, hence the underlying inverse problem becomes more than harmful as sharp approximations of the θ j 's are needed to prevent flawed rates of convergence for the density estimator. While the estimation of parameters, observed through their image by an operator, traditionally relies on the inversion of the operator, here the repetition of the observations enables to use recent advances in semiparametric estimation to improve the usual strategies developed to solve such a problem.

Note that estimation of such warping parameters have been investigated by several authors using nonparametric methods for very general models, see for instance [START_REF] Gasser | Searching for structure in curve samples[END_REF][START_REF] Kneip | Statistical tools to analyze data representing a sample of curves[END_REF], or [START_REF] Wang | Synchronizing sample curves nonparametrically[END_REF]. However little attention is paid to the law of these random parameters. Moreover, as said previously, sharp estimates of the parameters are required to achieve density estimation, which requires semiparametric methods.

Our approach consists, first, in the estimation of the shifts θ j while the functions f [j] play the role of nuisance parameters. We follow the semiparametric approach introduced in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] in the Gaussian white noise framework and extend it to the discrete regression framework. This provides sharp estimators of the unobserved shifts, up to order 2 expansions. Alternative methods can be found in [START_REF] Gamboa | Shifts estimation with M-estimators[END_REF] or [START_REF] Vimond | Asymptotic efficiency of shifts estimators with M-estimators to appear in[END_REF]. These preliminary estimates enable, in a second time, to recover the unknown density ϕ of the θ j 's as if the shifts were directly observed, at least if J n is not significatively larger than n. This paper also provides a practical algorithm, for both the semiparametric and the nonparametric steps. The first step is the most difficult one: to build practicable semiparametric estimators, we propose an algorithm which refines the one proposed in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF] for the period model and relies on the previously obtained second order expansion.

Beyond the shift estimation case, which involves a symmetry assumption on f [j] , our procedure may be applied to semiparametric models where an explicit penalized profile likelihood is available and well-behaved estimators of the θ j 's can be obtained. A particularly important example in applications is the estimation of the period of an unknown periodic function, see for instance [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF]. Given a sequence of J n experiments like the one considered in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF], one might be interested in estimating the law of the corresponding periods of the signals. In this case one can also consider applying our method, under some conditions made explicit in the sequel.

The paper falls into the following parts. In Section 2, semiparametric estimators θ j of the realizations of the shift parameters are proposed, and sharp bounds between θ j and θ j are provided. Then, in Section 3, a nonparametric estimator of the unknown distribution is considered while rates of convergence are provided in the case where µ admits a density, in the general model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF] under the condition that the θ j 's can be sufficiently well approximated. In Section 4, the practical estimation problem is considered and a simulation study is conducted. Technical proofs are gathered in Section 5.

Semiparametric Estimation of the shifts

In this Section, we provide, for each fixed j, semiparametric estimators of the j th realization θ j of the random variable θ, observed in Model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF]. To build this estimates, we follow the method introduced by Dalalyan, Golubev and Tsybakov in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] for a continuoustime version of the translation model. We obtain analogues of two of their results in our discrete-time model: a deviation estimate stated in Lemma 2.3 and a second order expansion for the estimators stated in Lemma 2.4. We also establish a new result in Lemma 2.5, which enables to control the bias of the estimates. The particular form of the estimators and the second order expansion will not be used to build the density estimator in Section 3.

Hence, conditionally to the event θ j = θ, we construct an estimator θ j and establish asymptotic results for the conditional distribution θ j | θ j = θ , gathered in Lemmas 2.3, 2.4 and 2.5. In the remaining of this Section, since j is fixed, the index j in the notation is dropped (for instance Y ij is simply denoted by Y i ). We shall denote by . the L 2 -norm on [0, 1] and by . ∞ the L ∞ -norm on R.

Shift estimation in the discrete time translation model

The model reduces to, assuming for simplicity that σ = 1,

Y i = f (t i -θ) + ε i i = 1, . . . , n, (2)
where f is a symmetric function satisfying some additional assumptions detailed below and t i = i/n. The corresponding problem is the one of semiparametric estimation of the center of symmetry in a discrete framework.

Working assumptions in the translation model

We assume that the support Θ of the distribution µ of the random variable θ is compact and contained in an interval of diameter upper-bounded by 1/2

(A1) Θ = {θ, |θ| τ 0 }, where τ 0 is such that 0 < τ 0 < 1/4.
The function f is assumed to be symmetric (that is, f (x) = f (-x) for all real x) and periodic with period 1 with Fourier coefficients denoted by

f k , k 1, (A2) f (t) = √ 2 k 1 f k cos(2πkt), where f k = √ 2 1 0 f (t) cos(2πkt)dt.
Let C 2 (R) denote the set of all twice continuously differentiable functions on R. We assume that there exist ρ > 0 and C 0 < +∞ such that f belongs to the set F defined by

(A3) F = F (ρ, C 0 ) = {f ∈ C 2 (R), f 2 1 ρ, f ′′ 2 C 0 }.

Conditions (A1)-(A3

) can be seen as working assumptions and are essentially the same as in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF]. Assuming periodicity of f is not a drawback since, in practice, the function f is compactly supported and can easily be periodicized. The assumption that f belongs to C 2 (R) is handy in particular for proving the second order properties of the estimator. Note also that for simplicity in the definitions of the classes, as in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] we have assumed that the Fourier coefficient for k = 0, that is

1 0 f (u)du, is zero.
Identifiability in model (2) follows from : symmetry, 1-periodicity of the functions (note that assuming that f 2 1 ρ implies that f cannot be periodic of smaller period) and the fact that the diameter of Θ is less than 1/2. Note also that within this framework, the Fisher information for estimating θ j for a fixed j is, as n tends to +∞, given by {1 + o(1)}n f ′ 2 .

Construction of the estimator

Let us define an estimator θ of the shift θ in model ( 2) by

θ = argmax τ ∈Θ k 1 h k 1 n n i=1 cos(2πk(t i -τ ))Y i 2 , (3)
where (h k ) is a sequence of real numbers in [0, 1] satisfying some conditions made precise in the following subsection. The sequence (h k ) is called sequence of weights or filter.

The estimator θ is similar to the estimator θ P M L proposed in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF]: here the integral in their definition is replaced by the equivalent discrete sum in the discrete-time model. As we sketch below, the estimator (3) arises in a natural way by using a penalized profile likelihood method as in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], though here in an approximate way only, First one turns the study of the regression model into the study of a sequence of independent submodels. Let us introduce, for any k 1,

x k = 1 n n i=1 √ 2 cos(2πkt i )Y i , ξ k = 1 √ n n i=1 √ 2 cos(2πkt i )ε i . x * k = 1 n n i=1 √ 2 sin(2πkt i )Y i , ξ * k = 1 √ n n i=1 √ 2 sin(2πkt i )ε i .
Note that x k and x * k are observed. Using the fact that Y i follows (2),

x k = cos(2πkθ)f k + d k,n + 1 √ n ξ k , (4)
x * k = sin(2πkθ)f k + d * k,n + 1 √ n ξ * k , (5)
where d k,n , d * k,n are terms of difference between the Fourier coefficient and its approximation:

d k,n = √ 2 1 n n i=1 cos(2πkt i )f (t i -θ) - 1 0 cos(2πkt)f (t -θ)dt .
The term d * k,n is obtained in a similar way replacing the cosine by a sine. We would like to underline two important facts about the previous quantities. First, since the ε i 's are Gaussian N (0, 1), the variables (ξ k , ξ * k ) k 1 are also Gaussian and, since we assume that t i = i/n, using the orthogonality of the trigonometric basis over this system of points, they are in fact independent standard Normal. Second, it is important to note that both d k,n and d * k,n are non-random and bounded uniformly in θ. We will use more precise bounds in function of k and n in the proofs, see Lemma 5.1 in Section 5.

The penalized profile likelihood method is as follows. For each integer k and τ ∈ Θ, let us define the quantity p τ (x k , x * k , f k ) as

1 √ 2π 3 exp - n 2 (x k -cos(2πkτ )f k -d k,n ) 2 - n 2 (x * k -sin(2πkτ )f k -d * k,n ) 2 - f 2 k 2σ 2 k .
This is the usual likelihood corresponding to the observation (x k , x * k ) with an additional penalization term -f 2 k /2σ 2 k , where σ k has to be chosen. The profile likelihood technique (see [START_REF] Van Der | Asymptotic statistics[END_REF]Chap. 25]), consists in "profiling out" the nuisance parameter f k by setting

f * k (τ ) = argmax f k p τ (x k , x * k , f k ) θ P M L = argmax τ ∈Θ k 1 p τ (x k , x * k , f * k (τ )).
Here a difficulty is that d k,n and d * k,n depend on f k . However, if we neglect those terms, we can follow the calculations made in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] and we obtain that θ P M L is the maximizer of

k 1 h k 1 n n i=1 cos(2πkτ )x k + sin(2πkτ )x * k 2 ,
which is exactly the same as (3) if we set

h k = σ 2 k /(σ 2 k + n -1
). Thus the criterion (3) can be obtained by an approximate profile likelihood method. Yet, it is not trivial to see at this point if having neglected the terms d k,n , d * k,n in the construction of the estimator can have a negative influence over the behavior of the criterion (3). In fact, we will see in the sequel that this is not the case, and that (3) can lead to a very good estimator, even at second order, provided a sensible choice of (h k ) is made.

Asymptotic behavior of the shifts estimators

First let us precise some technical assumptions we make on the sequence of weights (h k ) in the definition (3) of the estimator. These are the same as Assumptions B and C in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], except that here we also restrict ourselves to a finite number of nonzero weights.

Assumptions on the sequence of weights (h k )

Let the sequence (h k ) be such that h 1 = 1, 0 h k 1 for all k 1 and assume that there are positive constants D 1 and ρ 1 such that (C1) The number of weights such that h k = 0 is finite.

(C2) k 1 (2πk) 2 h 2 k 1/2 ρ 1 (log 2 n) max k 1 (2πk)h k . (C3) k 1 h k (2πk) 4 D 1 n. (T ) k 1 (1 -h k )(2πk) 2 f 2 k 2 = o k 1 (1 -h k ) 2 (2πk) 2 f 2 k .
The first condition is quite natural to make the estimator feasible in practice, Conditions (C2) and (C3) precise the range of the sequence (h k ). Condition (T) allows to obtain second order properties, see the proof of Lemma 2.4.

Remark 2.1. As noted in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], conditions (C1), (C2), (C3) and (T) are fulfilled for a quite wide range of weights. For instance, the sequences (h k = 1 1 k N (T ) ), also called projection weights, satisfy the preceding conditions since (C2) and (C3) are satisfied respectively for N(T ) C log 4 n and N(T ) Cn 1/5 , while condition (T) is always satisfied for projection weights since k N (T ) (2πk) 2 f 2 k → 0, as n → +∞, due to (A3).

Remark 2.2. It is also be possible to consider random, data-driven, weights. This approach is considered in [START_REF] Dalalyan | Stein shrinkage and second-order efficiency for semiparametric estimation of the shift[END_REF].

Asymptotic properties

For easiness of reference in Section 3, it is convenient here to make the dependence in j explicit again. In the following Lemmas, f [j] ′ and f

[j]
k respectively denote the derivative and the Fourier coefficients of f [j] . Lemmas 2.3 and 2.4 are respectively analogues of Lemma 5 and Theorem 1 in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] here in a discrete regression framework, which seems to be closer to practical applications. Though it seems natural that the cited results extend to our context, it is not obvious that the extra terms induced by the discretization of the model, for instance the d n,k 's introduced above, do not interfere with the rates, in particular at the second order. But we prove that they eventually do not, see the proof of the Lemmas in Section 5. Lemma 2.3 (Deviation bound). Assume that (A), (C), (T) are fulfilled. For any K > 0 and any positive integer n, denote x n = K √ log n. There exist positive constants c 1 , c 2 such that for any K > 0, for n large enough, uniformly in j ∈ {1, . . . , J n }, θ j ∈ Θ and f

[j] ∈ F , it holds P √ n| θ j -θ j | > x n |θ j c 1 exp(-c 2 x 2 n ). ( 6
) Lemma 2.4 (Second order Expansion). Assume that (A), (C), (T) are fulfilled. Let us denote R n [h, f [j] ] = ∞ k=1 (2πk) 2 [(1 -h k ) 2 f [j] 2 k + h 2 k /n]. Uniformly in j ∈ {1, . . . , J n }, θ j ∈ Θ and f [j] ∈ F , as n tends to +∞, E ( θ j -θ j ) 2 |θ j = 1 n f [j] ′ 2 1 + (1 + o(1)) R n [h, f [j] ] f [j] ′ 2 . (7)
Lemma 2.4 implies that, conditionally to θ j , the estimator θ j is efficient for estimating θ j at the first order. It also provides an explicit form for the second order term of the quadratic risk. The explicit expression of this term is not needed to establish the convergence rate of the plug-in estimator in Section 3. Nevertheless it justifies the choice of the filter made in Section 4. Indeed, we see from ( 7) that an appropriate filter (h k ) is a filter such that R n [h, f [j] ] is as small as possible.

The following Lemma 2.5 is new with respect to [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF]. It ensures that the conditional law of θ j is centered at θ j , up to a O(log n/n) term.

Lemma 2.5 (Asymptotical Bias). Assume (A), (C), (T) and that there exists a positive constant D such that for any f ∈ F , it holds

k 1 k 2 |f k | D.
Then, uniformly in j ∈ {1, . . . , J n }, as n tends to +∞,

E ( θ j -θ j )|θ j = O log n n . (8)
This Lemma requires only slightly more regularity on f than a second derivative bounded in L 2 , which is what condition (A3) imposes, that is k 1 k 4 f 2 k C 0 . It enables us to have slightly broader framework for our results in Section 3. However, one can still obtain interesting results without using this Lemma, see Remark 3.5 after Theorem 3.3.

Case of the period model

Let us now consider the period model mentioned in the introduction, where symmetry of the functions is not assumed. The random variables θ j arise this time as period of periodic functions. The observations in a fixed and equally spaced design are

Y ij = f [j] i nθ j + ε ij i = -n/2, . . . , n/2 , j = 1, . . . , J n , (9)
where the θ j 's belong to a compact interval in ]0, +∞[ and the 1-periodic functions f [j] fulfill some smoothness assumptions, for instance the ones assumed in [START_REF] Castillo | Semi-parametric second-order efficient estimation of the period of a signal[END_REF] in the Gaussian white noise framework. It is established in [START_REF] Castillo | Semi-parametric second-order efficient estimation of the period of a signal[END_REF] that the penalized profile likelihood method yields estimators satisfying, with appropriate rescaling, statements similar to ( 6) and ( 7), in the continuoustime model, see [START_REF] Castillo | Semi-parametric second-order efficient estimation of the period of a signal[END_REF]Lemma 11 and Theorem 1].

Hence one can apply the method of this paper for estimating the law of the θ j 's in model ( 9), provided one can transpose the proofs of ( 6)- [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] for the continuous-time model in terms of the discrete framework, as is done here in Section 5 for the shift model.

Nonparametric estimation of the distribution µ

We are interested in the estimation of the distribution of the unobserved sample θ 1 , . . . , θ Jn in model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF]. We shall assume that the number of curves J n tends to +∞. Our approach is based on the assumption that, along each curve, one can estimate in an appropriate way the corresponding θ j .

More precisely, the realizations θ 1 , . . . , θ Jn are unknown but we assume that they can be approximated by some preliminary estimators θ j,n , for j = 1, . . . , J n , denoted for simplicity θ j in the sequel. Definition 3.1. We say that the random variables θ 1 , . . . , θ Jn approximate the sample θ 1 , . . . , θ Jn if for each j, the variable θ j is built using the observations Y 1j , . . . , Y nj (i.e is measurable with respect to these observations) and satisfies the deviation bound [START_REF] Chafai | Maximum likelihood for a certain class of inverse problems: an application to pharmakocinetics[END_REF] given in Lemma 2.3.

Note in particular that with this definition, the random variables θ j are independent. The fact that (6) holds roughly means that the θ j 's are approximated by the θ j 's at almost parametric rate with an exponential control of the deviation probability.

In Section 2, we have studied in details a possible way of obtaining θ j 's satisfying this approximation property in model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF]. However, we would like to point out that the results of Section 3 hold as long as the θ j 's are approximations of the θ j 's in model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF] in the sense of Definition 3.1 (for Theorem 3.3 below, we shall also assume that (8) holds), which possibly allows using estimators produced by other methods. Extensions to frameworks beyond model (1) could also be considered.

A discrete estimator of µ.

A first way to define an estimator of µ is to consider a plug-in version of the usual empirical distribution, defined using the preliminary estimates θ j as

µ Jn = 1 J n Jn j=1 δ b θ j . (10)
The empirical distribution computed with the conditional estimators of the shifts provides a consistent approximation of the distribution of the true random shifts, in a weak sense.

Theorem 3.2 (Weak consistency of the plugged empirical measure). Assume (6), that Θ is compact and that there are positive finite constants α and B such that J n Bn α and J n → +∞. Then it holds µ Jn Jn→∞ ⇀ µ almost surely,

which means that for all continuously differentiable compactly supported function g,

µ Jn g = 1 J n Jn j=1 g( θ j ) → µg = E(g(θ)) almost surely.
Proof. For g a continuously differentiable compactly supported function, we get that

µ Jn g = 1 J n Jn j=1 g( θ j ) -g(θ j ) (I) + 1 J n Jn j=1 g(θ j ) (II).
The law of large numbers ensures that, almost surely, (II)

Jn→∞ -→ E(g(θ)). (12)
Now Taylor upper bound leads to

| 1 Jn Jn j=1 g( θ j ) -g(θ j ) | 1 Jn Jn j=1 g ′ ∞ | θ j -θ j |. If g ′ ∞ = 0,
then the previous quantity is equal to zero. Now consider the case g ′ ∞ = 0. Hence, using prior bound and (6), we get for any λ 0

P | 1 J n Jn j=1 [g( θ j ) -g(θ j )]| λ | θ 1 , . . . , θ Jn Jn j=1 P | θ j -θ j | λ g ′ ∞ | θ j c 1 J n exp -c 2 λ 2 n f [j] ′ 2 g ′ 2 ∞
, which is uniform in (θ j ) j=1,...,Jn . Then, choosing λ = c log n/n leads to the following bound.

P | 1 J n Jn j=1 [g( θ j ) -g(θ j )]| λ c 1 J n n -α n α-c 2 c 2 f [j] ′ 2 / g ′ 2 ∞ .
For c large enough, namely for all η 0, c

2 (1 + α + η) g ′ 2 ∞ /(c 2 f [j] ′ 2
), we can write

P | 1 J n Jn j=1 [g( θ j ) -g(θ j )]| c log n n c 1 n -(1+η) .
Borel Cantelli's Lemma enables us to conclude that a.s.

1 J n Jn j=1 [g( θ j ) -g(θ j )] Jn→+∞ -→ 0. ( 13
)
Finally ( 12) and ( 13) prove the result.

Hence, we have constructed a discrete estimator of the law of the random shifts. Nevertheless, in many cases this estimator is too rough when the law of the unknown effect has a density, said ϕ, with respect to Lebesgue's measure. That is the reason why, in the following, a density estimator is built, for which we provide functional rates of convergence.

Estimation of the density of the random deformation

Consider the following kernel estimator of ϕ, the density of the unobserved θ j 's in model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF], based on a kernel K, to be specified in the following, and on the quantities θ j . For all x in Θ, let us define

φ(x) = 1 J n h n Jn j=1 K x -θ j h n . (14)
In this subsection, we shall assume that the quantities θ j satisfy the approximation property stated in Definition 3.1 and also the control on their expectation provided by [START_REF] Dalalyan | Stein shrinkage and second-order efficiency for semiparametric estimation of the shift[END_REF].

We have checked in Section 2 that both properties are fulfilled under some regularity conditions for the estimators θ j built in Section 2.1.

Let us denote by H M (β, L) the set of all densities ϕ with support included in the interval [-τ 0 , τ 0 ] = Θ, which belong to the Hölder class H(β, L) (see [START_REF] Tsybakov | Introduction à l'estimation non-paramétrique[END_REF], p.5) and are uniformly bounded by a positive constant M.

For clarity in the following statement, we shall assume that for n large enough, either J n (n/ log n) 2β+1 β+2 or the converse inequality hold, for β defined below (otherwise use a subsequence argument). Theorem 3.3 (Rate of convergence of the nonparametric estimator). Let us assume that ϕ belongs to the class H M (β, L) for some positive L and M and with β > 1. Assume moreover (6), [START_REF] Dalalyan | Stein shrinkage and second-order efficiency for semiparametric estimation of the shift[END_REF] and that the kernel K is smooth, compactly supported, of order ⌊β⌋. Then the kernel estimator φ defined by (14) achieves the following rates of convergence, as n and J n tend to +∞,

sup x∈Θ sup ϕ∈H M (β,L) E [ φ(x) -ϕ(x)] 2 =      O J -2β 2β+1 n , if J n (n/ log n) 2β+1 β+2 O (n/ log n) -2β β+2 , if J n (n/ log n) 2β+1 β+2 (15)
Thus the classical rate of convergence J

-2β 2β+1 n
of density estimators over Hölder classes H(β, L), with β > 1, is maintained, provided the number of curves J n does not exceed (n/ log n) 2β+1 β+2 . In fact, it can be checked, using standard lower bound techniques, that in model ( 1), the minimax rate of convergence of the pointwise mean-squared risk for the estimation of ϕ over the considered Hölder-class is not faster than constant times

J -2β 2β+1 n
, which yields the rate-optimality of the procedure in this model in the first case of the Theorem. In the other case, the number of points per curve n becomes the limiting factor, and a slower rate specified by [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF] is obtained. Whether this second rate is optimal is an open question.

Our results can be interpreted as follows. The inverse problem is drastically reduced when the number of observations per subject increases, enabling, in a way, to invert the convolution operator. A nonparametric estimation of the density of the unobserved parameter in a regression framework can only be achieved if there are numerous observations for each curve. In our case, the fact that asymptotics can be taken both in J n and in n enables us to estimate first, for each curve, the random effect and then plug the values to estimate the density. If the number of observations per curve is small, as it is usually the case in pharmacokinetics, such techniques cannot be applied and we refer to [START_REF] Chafai | Maximum likelihood for a certain class of inverse problems: an application to pharmakocinetics[END_REF] for an alternative methodology.

Proof. For simplicity in the notation, we assume throughout the proof that the θ j 's are identically distributed -let us recall that they are independent -, which enables us to just deal with j = 1. If this is not the case, then one can still use the independence and then bound the different quantities arising j by j. Also we denote h n simply by h.

First note that the bias-variance decomposition is, for any x in Θ,

E [ φ(x) -ϕ(x)] 2 = (E[ φ(x)] -ϕ(x)) 2 + E [ φ(x) -E( φ(x))] 2 = b(x) 2 + v(x).
Let us denote by ∆ the quantity θ1θ 1 . Note that, by definition of θ1 , ∆ is a measurable function of (θ 1 , {ε i1 } i=1,...,n ). In the sequel, we denote ∆ = g(θ 1 , ε). 6), the probability of its complement is negligible.

Let us denote by

A 1 = {| θ 1 -θ 1 | D(n -1 log n) 1/2 }. Using (
A Taylor expansion of the kernel K at the order k yields the existence of a random variable Z such that

1 h EK θ 1 -x h = 1 h EK θ 1 -x h + ∆ h = 1 h EK θ 1 -x h (16)
+ 1 h E ∆ h K ′ θ 1 -x h (17)
+ 1 h E ∆ 2 h 2 K ′′ θ 1 -x h (18)
+ . . . + 1 h E ∆ k-1 h k-1 K (k-1) θ 1 -x h (19)
+ 1 h E ∆ k h k K (k) Z -x h . ( 20
)
Note that, by the usual properties of a kernel of order ⌊β⌋, see e.g., [21, Theorem 1.1], for some positive constant C it holds

|(16) -ϕ(x)| Ch β .
It is assumed that the θ j 's satisfy [START_REF] Dalalyan | Stein shrinkage and second-order efficiency for semiparametric estimation of the shift[END_REF], thus

(17) = 1 h E E(∆|θ 1 ) 1 h K ′ θ 1 -x h |(17)| C log n nh 1 h K ′ u -x h ϕ(u)du C log n nh |K ′ (v)| ϕ(x + vh)dv C log n nh ϕ ∞ |K ′ |.
Splitting (18) using A 1 and its complement,

|(18)| C log n nh 2 ϕ ∞ |K ′′ |.
By the same argument,

|(19)| C k-1 p=3 log n nh 2 p C log n nh 2 ,
as soon as log n/(nh 2 ) → 0. Finally,

|(20)| C h log n nh 2 k C √ nh log n n k-1 h 2k+1 1/2 Thus b(x) 2 c h 2β + 1 nh log 2 n nh 3 + 1 nh log k n n k-1 h 2k+1 . ( 21
)
The variance term is bounded by

v(x) 1 J n h 2 E K θ 1 -x + ∆ h 2 1 J n h 2 E E K θ 1 -x + g(θ 1 , ε) h 2 ε 1 J n h 2 E K u -x + g(u, ε) h 2 ϕ(u)du 1 J n h E K v - g(x + hv, ε) h 2 ϕ(x + hv)dv C J n h ϕ ∞ K ∞ .
Finally, choosing k large enough in [START_REF] Tsybakov | Introduction à l'estimation non-paramétrique[END_REF], we obtain, for any x in Θ,

E [ φ(x) -ϕ(x)] 2 c h 2β + 1 nh log 2 n nh 3 + C J n h ϕ ∞ K ∞ (22)
To obtain the rate of convergence of φ, we distinguish two cases, depending on whether the second or the third term in the preceding display is dominant.

• If J n (n/ log n) 2β+1 β+2 , then choosing h n = n -1 2β+1 implies that 1 nh log 2 n nh 3 C Jnh , leading to the rate E [ φ(x) -ϕ(x)] 2 cJ -2β 2β+1 n . • If J n (n/ log n) 2β+1 β+2 , then choosing h n = (log n/n) 1 β+2 , implies that 1 nh log 2 n nh 3 C Jnh , leading to the rate E [ φ(x) -ϕ(x)] 2 cn -2β β+2 .
Other choices of h n can easily be seen to lead to slower rates when optimizing [START_REF] Van Der | Asymptotic statistics[END_REF].

Remark 3.4. Note that the difficulty of the proof relies on the fact that, a priori, ∆ = θ1θ 1 and θ 1 are not independent, see for instance the expression of the shift estimator given by (3). Thus one cannot easily change variables in integrals of the type K u-x+g(u,ε) h ϕ(u)du since g depends on u.

Remark 3.5. Theorem 3.3 requires the conditions β > 1 and ( 8) to be fulfilled. However, if one (or both) of these two conditions is not assumed, then it is not difficult to check from the preceding proof, using the rough bound |( 17

Simulations

In this Section, we first present how the shift estimators studied in Section 2 can be numerically implemented. The estimation method proposed here is interesting on its own, since it provides a numerically tractable semiparametric estimator of the translation parameter and generalizes the penalization method proposed in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF]. Second, we construct the nonparametric estimator of the density defined in Section 3.2 and illustrate its behavior on both simulated data and real data. We point out that in the considered examples, we deal with the case where f [j] = f which is often used in practice where individual effects is only expressed through a warping effect of a main behaviour modeled by a (common) unknown function f .

Numerical algorithm for shift estimation and extensions

To compute explicitly θn given by (3) for each curve, one has to choose an appropriate filter (h k ). According to Lemma 2.4, a good choice of weights should make the remainder term R n [h, f [j] ] small. The authors in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] determined a sequence (h k ) -roughly, a wellchosen sequence of Pinsker weights -such that the second-order term is optimal from the minimax point of view. However, this choice depends on the regularity parameter of the function f [j] , which are not known in practice.

Here we use an adaptation of the penalization technique introduced in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF] to determine an appropriate sequence (h k ). However, contrary to that paper, where only projection weights h k = 1 |k| K are considered, note that the criterion (3) enables the use of a much broader variety of weights (h k ), provided these satisfy conditions (C)-(T). As explained below, the use of Pinsker weights, see [START_REF] Vimond | Asymptotic efficiency of shifts estimators with M-estimators to appear in[END_REF], enables a smoothing in the criterion which improves estimation with respect to [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF].

We also would like to mention an alternative method based on a data-driven choice of the filter, proposed in [START_REF] Dalalyan | Stein shrinkage and second-order efficiency for semiparametric estimation of the shift[END_REF]. This method is very interesting in particular from the theoretical point of view, since it achieves an optimal minimax second-order term and is adaptive to the regularity of f [j] . But the method is asymptotic in nature and, though it performs well for not too complicated signals, our method seems more appropriate for complicated signals (that is, with possibly many non-zero Fourier coefficients) f [j] , as in the laser vibrometry example below.

Consider the class of Pinsker-type weights, depending on the parameters K and β, defined by

h k = 1 -(k/K) β + , k 0, ( 23
)
and K is called the length of the sequence of weights.

Hence a sequence of weights is characterized by the pair (β, K). To simplify, we fix the value of β and take β = 3. Thus the family of weights depends on the single parameter K. For any filter sequence of length K, we define

Λ K (τ ) = K k=1 h k 1 n n i=1 cos(2πk(t i -τ ))Y i 2 , (24)
where Y i , i = 1, . . . , n is the data corresponding to one curve in model (1). To make the estimator feasible, we take the values of τ in a fixed regular grid of mesh 1/m: {τ 1 , . . . , τ i+1 = τ 1 + i/m, . . . , τ max }, of range inferior to 1/2 (let us recall that the diameter of Θ has to be bounded above by 1/2). Let us define

τ (K) = argmax τ 1 ,...,τmax Λ K (τ ), M(K) = τ 1 ,...,τmax Λ K (τ ).
Penalization. We would like to find an adapted sequence of weights, or equivalently an integer K. This is done, as in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF] or [START_REF] Castillo | Semi-parametric second-order efficient estimation of the period of a signal[END_REF], using a penalization method. Let

K(α) = argmax K 1 ,...,Kmax {-M(K) + αK}. ( 25
)
The parameter α should yield a trade-off between the fit with the data and the filter length K that can be viewed as the complexity of the chosen model. We use a datadriven method to find an appropriate α. The idea is to detect the changes in the convex hull of the function K → -M(K). Let us recall the following lemma from [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF].

Lemma 4.1. There exist two sequences

K 1 = 1 < K 2 < • • • , and α 0 = +∞ > α 1 > • • • , with :
α p = max Kp<K Kmax M(K p ) -M(K) K p -K = M(K p+1 ) -M(K p ) K p+1 -K p , p 1,
and such that ∀ α ∈ (α p ; α p+1 ], K(α) = K p .

Note that connecting the points (K i , M(K i )) gives the convex hull of the function K → -M(K) over the points K 1 , . . . , K max . Let us define our estimator of the period as

τ * = argmax τ i p : b τ (Kp)=τ i {α p-1 -α p }. ( 26
)
In words, the estimator chooses the point at which the cumulated jump in the derivative is the highest. Note that different values α * of α led to such an estimator, which satisfies the identity τ * = τ ( K(α * )).

Illustration of the algorithm. with 100 points. Note that, due to the high level of the noise (small amplitude of the signal with respect to the noise variance), it is difficult to detect visually the changes in the criterion behavior. Nevertheless the algorithm succeeds in finding the true shift.

The number of significative harmonics of f 1 is roughly 100, thus if we knew f 1 , taking K of the order of 100 would be a reasonable choice in view of (3). In fact, for k much larger than 100, the corresponding elements in the sum of squares in (3) are mainly noise. As we see in Figure 1, with the choice of τ given in (26), our algorithm chooses K in the appropriate interval.

Compared to the method used in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF], the use of the Pinsker-type weights (23) allows a smoothing with respect to projection weights, making the detection of main jumps in the convex hull of K → -M(K) less sensible to local irregularities of K → M(K), which slightly improves estimation. An extensive numerical comparison of the use of the two type of weights, which is beyond the scope of this paper, is carried out in [START_REF] Castillo | Penalized profile likelihood methods and second order properties in semiparametrics[END_REF] in the case of the period model for discrete design and gains of 10 to 20 % in the estimation of θ are observed for a laser vibrometry example with the unknown f similar to the function f 1 above.

The period model. We note that this algorithm can also be implemented for the period model ( 9) and more generally if the penalized profile likelihood is known in a closed form. For the period model, the algorithm follows the description above, once one replaces the cosine in ( 24) by its equivalent cos(2πk(t i /τ )). A numerical study is carried out in [START_REF] Castillo | Penalized profile likelihood methods and second order properties in semiparametrics[END_REF], leading to similar conclusions than the one presented here.

Numerical algorithm for density estimation

Once obtained the estimators of the realizations θ j , j = 1, . . . , J, we can build the estimator of the density ϕ defined by [START_REF] Kneip | Statistical tools to analyze data representing a sample of curves[END_REF]. We illustrate the good behaviour of our algorithm with three examples. The first one shows that important features of the target density such as bimodality can be detected with our method. The second example shows that even with quite involved functions, for which the semiparametric step is not easy, the methods performs well, at least if the signal to noise ratio is not too small. The third example deals with a practical application where symmetry can be seen as a sensible assumption. Simulated data (I). The function f is the sine function on an half period, while the law of the shift θ is a bimodal mixture of compactly supported densities. We perform 50 random translation of the original curve with n = 100 observations per curve. In Figure 2, we present the observed curves in model [START_REF] Bates | Nonlinear mixed effects models for repeated measures data[END_REF]. To study the performance of the estimator described in this paper, we first computed the preliminary estimates θj obtained by the semiparametric method of Section 2, using the practical algorithm of Section 4. This set of values was then used to build two nonparametric estimators of the density ϕ, denoted respectively SPGaussian and SPepanech, using [START_REF] Kneip | Statistical tools to analyze data representing a sample of curves[END_REF] and respectively a Gaussian kernel and Epanechnikov kernel. The smoothing parameters are chosen by cross-validation. We compare their performance with an estimate constructed the following way. Using the algorithm described in [START_REF] Wang | Synchronizing sample curves nonparametrically[END_REF], applied in the shape invariant model and following the lines of Section 3.3 in [START_REF] Wang | Synchronizing sample curves nonparametrically[END_REF], we compute nonparametrically the values of the warping parameter, used to align the curves to the true shape. Then, using Epanechnikov kernel, we build the corresponding density estimator, denoted by NPplug.

Figure 3 carries out the comparison between the preceding estimators. Visually, the estimators SPGaussian and SPepanech detect the density shape and bimodality and SPepanech matches slightly better the density amplitude. The nonparametric-based kernel estimator NPplug catches the global shape of the bimodal density but is too rough, since the method it relies on is far too general with respect to the semiparametric method designed to handle this particular situation. Hence, plugging a semiparametric preliminary estimate into a kernel-type estimator leads to a tractable estimator of the density of the shifts without knowledge of the shape of the warped function. Simulated data (II). We consider a function similar to the one introduced in the preceding subsection: f (x) = cos (100 cos(π(x -0.35))). Such functions appear for example in laser vibrometry and are studied in [START_REF] Lavielle | Semiparametric estimation of the frequency of unknown periodic functions and its application to laser vibrometry signals[END_REF] and [START_REF] Castillo | Semi-parametric second-order efficient estimation of the period of a signal[END_REF] for the period estimation problem. In this case, the semiparametric estimation step is crucial since the data are fuzzy. In Figure 4 we represent the original curve (left picture) and both the true shift density ϕ and the Real data. We present in Figure 5 an estimation conducted on real data. This data, provided by ACI-NIM MIST-R (http://www.lsp.ups-tlse.fr/Fp/Loubes/ACI.html), are daily velocities of vehicles on a motorway on the suburbs of Paris.

After a preliminary classification which aims at building groups of homogenous curves, we obtain several functional sets, each one representing a particular daily behaviour, as pointed out in [START_REF] Loubes | Luis Road trafficking description and short term travel time forecasting, with a classification method[END_REF]. For one group we get curves starting and ending at the maximal speed, while presenting some typical patterns which stand for a standard traffic-jam feature, repeated mornings and afternoons. Due to classification, the different features have been split into different classes, as pointed out in [START_REF] Gamboa | Shifts estimation with M-estimators[END_REF]. Hence the curves present some symmetrical aspect but the starting hours of these traffic jams change slightly around a mean time, starting sooner or later each day. Hence, the shift model can be used here, as done also in [START_REF] Gamboa | Shifts estimation with M-estimators[END_REF].

In this study, we get a set of 32 curves with n = 180 observations which corresponds to a velocity measured every 8 minutes during a day, see the left-hand side of Figure 5. Understanding roadtrafficking behaviour, involves first finding a mean pattern but also studying the density of the random shifts, in order to understand the reasons of this changes around the mean behaviour. The bimodal feature of the estimated density, see the right-hand side of Figure 5, can be later understood as the consequence of different weather conditions on the road network.

Appendix

First let us state a useful result about the control of Fourier coefficients by discrete approximations, which will be used in the sequel to control remainder terms. Let us denote

f k = 1 n n i=1 √ 2 cos(2πk(t i -θ))f (t i -θ) (27)
g k = 1 n n i=1 √ 2 sin(2πk(t i -θ))f (t i -θ). (28)
| f k -f k | C k n ∧ 1 and | g k | C k n ∧ 1 , (29)
where a ∧ b denotes the minimum of the two reals a and b.

Proof. For any continuously differentiable function ϕ on the interval [0, 1] and

t i = i/n, it holds 1 n n i=1 ϕ(t i ) - 1 0 ϕ(u)du = n i=1 t i t i-1 (ϕ(t i ) -ϕ(u))du .
If ϕ ′ ∞ denotes the supremum norm of the derivative of ϕ on [0, 1], we have

1 n n i=1 ϕ(t i ) - 1 0 ϕ(u)du n i=1 t i t i-1 ϕ ′ ∞ |t i -u|du ϕ ′ ∞ n i=1 (t i -t i-1 ) 2 /2 = ϕ ′ ∞ 2n .
Now let us apply the preceding to the functions ϕ 1 (u) = cos(2πk(uθ))f (uθ) and ϕ 2 (u) = sin(2πk(uθ))f (uθ) respectively. By symmetry and 1-periodicity of f , we have

1 0 ϕ 2 (u)du = 0. For any real u, |ϕ ′ 1 (u)| 2πk f ∞ + f ′ ∞
, and, similarly, the same bound holds for |ϕ ′ 2 (u)|. Now observe that f ∞ and f ′ ∞ are bounded if f belongs to the class F . Indeed, if f ∈ F , then f ′ is continuously differentiable and 1-periodic thus it is the limit of its Fourier series. For any u ∈ [0, 1], we have

f ′ (u) = k 1 (-2πk)f k sin(2πku).
To see that the latter quantity is bounded it suffices to check that the series kf k converges. This is a consequence of Cauchy-Schwarz inequality and (A3) since

k 1 k|f k | k 1 k 4 f 2 k 1/2 k 1 k -2 1/2 is bounded. Similarly, f ∞ is bounded by k 1 |f k |, which is bounded if f is in F , which implies that f k -f k
and g k are bounded by a constant times k/n. The fact that they are also bounded by a constant follows from the fact that f ∞ is bounded over F . Lemma 5.2. Assume that conditions (A1)-(A3) and (C1)-(C3) are fulfilled. Then for some positive constant C, denoting h

′ 2 = k 1 (2πk) 2 h 2 k , k 1 h 2 k k 6 Cn 2 , k 1 h k k 2 |f k | C h ′ log 2 n and k 1 h k k 2 |f k (f k -f k )| C h ′ n .
Proof of Lemma 5.2. Note that for any integer k, we have

h 2 k k 6 h k k 4 max k 1 h k k 2
. The latter maximum is smaller than the corresponding sum over k which, due to (C3), is at most D 1 n. Using (C3) again, one obtains the first inequality. Then due to (C2),

k 1 h k k 2 |f k | max k 1 h k k k 1 k|f k | C h ′ log 2 n ,
which yields the second inequality. Finally, using (29) and the Cauchy-Schwarz inequality,

k 1 h k k 2 |f k (f k -f k )| C n k 1 h k k 3 |f k | C n k 1 h 2 k k 2 1/2 k 1 k 2 f 4 k 1/2
, which yields the third inequality using (A3).

We can now turn to the proofs of Lemmas 2.3, 2.4 and 2.5. We shall work conditionally to the event θ j = θ. To abbreviate the notation, we omit the index j and drop the notation |θ j ). Thus the expectations in the following should be understood at fixed θ j .

The main novelty with respect to [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] consists in proving that the arguments used by the authors in that paper can be adapted in the discrete setting, by showing that the arguments still go through when working with the discrete approximations f k and g k instead of f k and 0 respectively. Proof of Lemma 2.3. The contrast function to maximize is, according to (3),

L(τ ) = k 1 h k 1 n n i=1 √ 2 cos(2πk(t i -τ ))Y i 2 = k 1 h k cos(2πk(θ -τ )) f k -sin(2πk(θ -τ )) g k + 1 √ n (cos(2πkτ )ξ k + sin(2πkτ )ξ * k ) 2 , (30)
where f k and g k are defined by ( 27)-(28). The criterion L(τ ) is the sum of three terms

L(τ ) = η 0 (τ ) + 2 √ n f ′ η 1 (τ ) + 1 n η 2 (τ ), where η 0 (τ ) = k 1 h k [cos(2πk(θ -τ )) f k -sin(2πk(θ -τ )) g k ] 2 η 1 (τ ) = f ′ -1 k 1 h k [cos(2πk(θ -τ )) f k -sin(2πk(θ -τ )) g k ][cos(2πkτ )ξ k + sin(2πkτ )ξ * k ] η 2 (τ ) = k 1 h k [cos(2πkτ )ξ k + sin(2πkτ )ξ * k )] 2 .
Note that this is the analog of the decomposition of [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], p. 185, except that here the quantity cos(2πk(θτ )) f k + sin(2πk(θτ )) g k replaces cos(2πk(θτ ))f k . Let us see how the argument is further modified. The stochastic term η 2 is exactly the same as in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF]. The term η 1 is such that its derivative η ′ 1 is a zero-mean stationary Gaussian process and one has

E(η ′ 1 (τ ) 2 ) = f ′ -2 k 1 h 2 k (2πk) 2 ( f 2 k + g 2 k ), E(η ′′ 1 (τ ) 2 ) = 4 f ′ -2 k 1 h 2 k (2πk) 4 ( f 2 k + g 2 k ).
So, η ′ 1 (τ ) has a variance bounded from below by a constant times f 2 1 which is bounded away from zero for n large enough due to (29) and (A3). Moreover, the variance of η ′′ 1 is bounded. Hence one can apply Rice formula as in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] to obtain that there are some positive constants C and D, such that for all x > 0,

P(sup τ ∈Θ |η ′ 1 (τ )| > x) C exp(-Dx 2 ), (31)
which is the result obtained in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF]. Finally we deal with η 0 by writing

η 0 (τ ) = k 1 h k cos 2 (2πk(τ -θ)) f 2 k -2 cos(2πk(τ -θ)) sin(2πk(τ -θ)) f k g k + sin 2 (2πk(τ -θ)) g 2 k = γ 0 (τ ) + γ 1 (τ ) + γ 2 (τ ).
We have that γ ′ 0 (θ) = 0 and γ ′′ (θ) -(2π) 2 f 2 1 is bounded away from zero due to (29) and (A3). Thus, similarly to [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], one has γ 0 (τ )γ 0 (θ) -C|τ -θ| 2 for all τ ∈ Θ. Now note that for all real τ ,

|γ 1 (τ ) + γ 2 (τ )| k 1 2 f k g k + g 2 k .
Hence using (29), the sum γ

1 (τ ) + γ 2 (τ ) is a O(1/n) uniformly in τ .
The argument is now completed as follows. Using the obtained bounds, for any positive x,

P θ | θ -θ| n f ′ 2 > x P θ sup √ n f ′ |τ -θ|>x (L(τ ) -L(θ)) 0 P θ sup √ n f ′ |τ -θ|>x η 0 (τ ) -η 0 (θ) + 2 f ′ √ n (η 1 (τ ) -η 1 (θ)) + 1 n (η 2 (τ ) -η 2 (θ)) 0 P θ sup √ n f ′ |τ -θ|>x η 0 (τ ) -η 0 (θ) + |τ -θ| sup t∈Θ 2 f ′ |η ′ 1 (t)| √ n + |η ′ 2 (t)| n 0 P θ sup √ n f ′ |τ -θ|>x -C + O(n -1 ) |τ -θ| 2 + 1 |τ -θ| sup t∈Θ 2 f ′ |η ′ 1 (t)| √ n + |η ′ 2 (t)| n 0 . Now setting x = x n = K(log n) 1/2
, for some positive constants C 1 and C 2 we have

P θ | θ -θ| n f ′ 2 > x n P θ √ n f ′ x n sup t∈Θ 2 f ′ |η ′ 1 (t)| √ n + |η ′ 2 (t)| n -C + O(n -1 ) x n P θ sup t∈Θ |η ′ 1 (t)| Cx n + P θ sup t∈Θ |η ′ 2 (t)| C √ nx n .
This is further bounded using (31) for the first term and Lemma 3 in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] for the second term, which concludes the proof.

Before we turn to the proof of Lemma 2.4, we state a Lemma which summarizes the properties of the criterion L, see Equation (30), and its derivatives. Note that it is in particular a natural adaptation of Lemma 6 in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF]. Lemma 5.3. Uniformly over θ ∈ Θ and f ∈ F , as n → +∞,

E(L ′ (θ) 2 ) = 4 n k 1 (2πk) 2 h 2 k f 2 k + (1 + o(1)) h ′ 2 n (32) E(L ′′ (θ)) = -2 k 1 h k (2πk) 2 f 2 k + o h ′ 2 n . (33)
Moreover, uniformly over θ ∈ Θ and f ∈ F , as n → +∞,

E{L ′′ (θ) -E(L ′′ (θ))} 2 = O(n -1 ) and E sup ζ∈Θ L (3) (ζ) 2 = O(1). (34)
Proof of Lemma 5.3. Let us denote

ξ k (θ) = 1 n n i=1 √ 2 cos(2πk(t i -θ))ε i and ξ * k (θ) = 1 n n i=1 √ 2 sin(2πk(t i -θ))ε i .
Simple calculations from (30) lead to

L ′ (θ) = 2 k 1 h k (2πk)( f k + n -1/2 ξ k (θ))( g k + n -1/2 ξ * k (θ)) (35) L ′′ (θ) = 2 k 1 h k (2πk) 2 -( f k + n -1/2 ξ k (θ)) 2 + ( g k + n -1/2 ξ * k (θ)) 2 (36)
From (35) we deduce that

E(L ′ (θ) 2 ) = 4 k 1 h 2 k (2πk) 2 f 2 k n + 1 n 2 +4 k 1 h 2 k (2πk) 2 f k 2 g k 2 + 1 n {2f k ( f k -f k ) + ( f k -f k ) 2 } + g k 2 n +8 k =l h k h l (2πk)(2πl) f k f l g k g l .
The second term in the last display is bounded using first (29) and then Lemma 5.2, by O( h ′ /n 2 ), which is a o( h ′ 2 /n 2 ) since due to (C2), the norm h ′ tends to +∞. To bound the third term, note that it is bounded above by the square of

k 1 h k k| f k g k | C n k 1 h k k 2 |f k | + k 3 n C n h ′ log 2 n + 1 ,
using Lemma 5.2. The corresponding square is thus a o( h ′ 2 /n 2 ). For the second derivative, from (36) we deduce that

E(L ′′ (θ)) = 2 k 1 h k (2πk) 2 (-f k 2 + g k 2 ) ( 37
)
E{L ′′ (θ) -E(L ′′ (θ))} 2 = 16 n k 1 h 2 k (2πk) 4 ( f k 2 + g k 2 + 1 n )
and proceeding as for (35), using (29) and Lemma 5.2, one obtains (33) and the first part of (34). Finally, the result about L (3) is obtained as follows. Proceeding as in Lemma 6 in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], one easily sees that sup ζ∈Θ

|L (3) (ζ)| C k 1 h k k 3 f k 2 + g k 2 + 1 n (ξ 2 k + ξ * k 2 ) .
The deterministic part of the last display is bounded by a constant times

k 1 h k k 3 2f 2 k + 2( f k -f k ) 2 + g k 2 C k 1 h k k 3 f 2 k + k 3 k n C ′ .
To obtain the first inequality, using (29) we have bounded one f k -f k and one g k by Ck/n and the other ones by a constant. The second inequality is obtained using (A3) and (C3), which concludes the proof of the Lemma.

Note that all the dependence in f k and g k has vanished in Lemma 5.3, replaced by results in function of f k only. In fact, the results of this Lemma are exactly the ones used in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF] to prove the second order expansion, so in fact using this observation there is nothing left to prove to obtain Lemma 2.4. We include however the end of the proof for completeness.

Proof of Lemma 2.4. As in [START_REF] Dalalyan | Penalized Maximum Likelihood and Semiparametric Second Order Efficiency[END_REF], the proof is in two steps. The first step is to prove that τ defined by the following relation has the desired second order expansion,

L ′ (θ) + ( τ -θ)E(L ′′ (θ)) = 0. ( 38
)
Let us evaluate E(( τθ) 2 I n (f )), where I n (f ) = n f ′ 2 . From (32) and (33) it follows

E(( τ -θ) 2 I n (f )) = 1 + f ′ -2 k 1 (h 2 k -1)(2πk) 2 f 2 k + f ′ -2 h ′ 2 (1 + o(1))/n × 1 + f ′ -2 k 1 (h k -1)(2πk) 2 f 2 k + o( h ′ 2 /n) -2
.

Let us expand the square at the denominator and then use a Taylor expansion of the function x → (1 + x) -1 . Then, one computes the product with the numerator and uses assumption (T). One obtains

E(( τ -θ) 2 I n (f )) = 1 + (1 + o(1)) f ′ -2 R n (h, f ),
which is the desired expansion for τ . In a second step, we prove that θ and τ are close enough. It is sufficient to do this on the set A 1 = {| θ -θ| D(n -1 log n) 1/2 } since the probability of its complement is negligible due to Lemma 2.3. By definition of θ, we have L ′ ( θ) = 0. By Taylor's expansion,

0 = L ′ ( θ) = L ′ (θ) + ( θ -θ)L ′′ (θ) + ( θ -θ) 2 2 L (3) (ζ),
for some random variable ζ, which can also be written 0 = L ′ (θ) + ( θθ)E(L ′′ (θ))

+( θ -θ)[L ′′ (θ) -E(L ′′ (θ))] + ( θ -θ) 2 2 L (3) (ζ). ( 39
)
Subtracting ( 38) and (39), one obtains

E ( θ -τ ) 2 1 A 1 E(L ′′ (θ)) 2 2E ( θ -θ) 2 {L ′′ (θ) -E(L ′′ (θ))} 2 1 A 1 + E ( θ -θ) 4 sup ζ∈Θ |L (3) (ζ)| 2 1 A 1 .
Using (34) and the definition of A 1 , one obtains E(( θτ ) 2 I n (f )1 A 1 ) Cn -1 log 2 n which is a o(R n (h, f )). Finally, by similar arguments, one also sees that E(( θτ )( τθ)1 A 1 ) is a o(R n (h, f )) which concludes the proof.

Proof of Lemma 2.5:

Proof. Starting from (39), using the triangle and Cauchy-Schwarz inequalities,

E ( θ -θ) E(L ′′ (θ)) |E(L ′ (θ))| +(E( θ -θ) 2 ) 1/2 E[L ′′ (θ) -E(L ′′ (θ))] 2 1/2 + 1 2 E ( θ -θ) 2 sup ζ∈Θ |L (3) (ζ)| .
The first term on the right-hand side of the last display can be bounded using (29),

E(L ′ (θ)) = 2 k 1 h k (2πk) f k g k C k 1 h k k 2 |f k | n + k 3 n 2 ,
which is a O(n -1 ) due to the assumption on f and (C3). To bound the second term, we use (34) and the fact that the result of Lemma 2.4 implies E( θθ) 2 = O(n -1 ).

We note that the latter relation could also be checked directly, similarly to the proof of Lemma 2.4 but without keeping second order terms. To bound the third term, we use Cauchy-Schwarz inequality

E ( θ -θ) 2 sup ζ∈Θ |L (3) (ζ)| E ( θ -θ) 4 1/2 E sup ζ∈Θ |L (3) (ζ)| 2 1/2
. Now with A 1 = {| θ -θ| D(n -1 log n) 1/2 }, due to Lemma 2.3, E(( θθ) 4 ) = E(( θθ) 4 1 A 1 ) + E(( θθ) 4 1 A c 1 ) C(log n/n) 2 + C exp(-dD 2 log n).

Choosing D large enough, we obtain that the third term is a O(log n/n). The fact that |E(L ′′ (θ))| is bounded from above and below by positive constants, which follows from (37) and (A3)-(C3), yields the announced result.

Figure 1

 1 illustrates this algorithm with f equal to f 1 (x) = 0.015 * cos{100 cos(π(xτ ))}. The first graph represents the criterion -M(K) together with, in dotted line, its convex hull. The stem diagram represents the differences α p-1 -α p corresponding to the points K p . Finally the estimated shifts for the different values of K are represented by the last graph. The numerical parameters are the following: n = 800, and the true shift parameter τ = 0.35. The grid for τ is the regular grid of [0.25, 0.75]

Figure 1 :

 1 Figure 1: Finding the parameter α

Figure 2 :

 2 Figure 2: Simulated shifted curves.

Figure 3 :

 3 Figure 3: Estimators of the shifts density.

Figure 4 :

 4 Figure 4: Simulated laser vibrometry-type functions

Figure 5 :

 5 Figure 5: Real data: velocities curves

Acknowledgments. The authors are grateful to Professor Alexandre Tsybakov for an insightful remark concerning this work. We also thank a referee whose comments lead us to correct a mistake in a previous version of this work.