functionaldata / tPACE

Testing version of fdapace
Other
31 stars 22 forks source link

[FPCA] Procedure when no specified mean BW and no method to estimate it #60

Closed MichaelJStein closed 2 years ago

MichaelJStein commented 2 years ago

Hi,

Regarding the FPCA function with sparse data: Could you please elaborate on the procedure when there is no specified bandwidth value for the smoothed mean function as well as no method to estimate it (e.g. CV).

I think lines 58-60 of the SetOptions function apply in this case:

if(is.null(userBwMu) && methodBwMu == 'Default'){ # bandwidth choice for mean function is using CV or GCV
    userBwMu = 0.05 * diff(range(unlist(t)));   
  } 

I'm wondering why this is. Why 5% of the support? Also I do not understand the comment (choice is using CV..).

Thank you very much for explaining!

aegajardo commented 2 years ago

Hi,

The default choice for the bandwidth of the smoothed mean curve is 5% of the observed time range when no data-adaptive methods are selected in the option 'methodBwMu' of the FPCA function in fdapace or when the bandwidth is not directly provided via the option 'userBwMu'. Currently, the data-adaptive methods implemented to obtain the bandwidth are 'CV' and 'GCV' (please refer to the documentation in the option 'methodBwMu').

Regarding the comment in lines 58-60 of SetOptions function, this comment should actually appear just afterwards in line 61. Thanks for pointing this out. This will be fixed in the next version.

MichaelJStein commented 2 years ago

Thanks for the reply! How was the choice for 5% (or 10% for the covariance function) motivated?

aegajardo commented 2 years ago

Hi, so on average and empirically this choice has worked reasonably well for different data but you could use a data-adaptive way to obtain the mean and covariance bandwidths (using option 'methodBwMu' and 'methodBwCov') or directly input these bandwidths as user-specified with the options 'userBwMu' and 'userBwCov'.