For a given data f and its average mean square error AMSE, the function returns a vector of the optimal split with the average mean square errors on the left and right of the splitting point, respectively.

opt_split(f, AMSE, M = 5)

Arguments

f

n x nx matrix. where n is number of samples (rows) and nx reperesents the grid size in functional data interpreptation, AMSE is the total of mean square errors computed rowwise

AMSE

integer. the average mean square errors of f computed over its range.

M

integer. the minimal number of points between the optimal split and the two ends of the iterval. The default is 10. The program will return Na if there are less than 2*M+1 points in the range f.

Value

A list made of three numeric values: opt_ix, AMSE_L and AMSE_R. The first numiric value opt_ix is the optimal split (knot), and AMSE_L, AMSE_R are the average mean square errors left and right the spliting point, respectively.

References

Nassar, H., Podgórski, K. (2019) Empirically driven orthonormal bases for functional data analysis. Preprint. Department of Statistics, Lund University.

See also

split for constructing split at a given knot;

Examples

## Example: n=10 f=rbetafda(n) nx=dim(f)[2] AMSE = amse(f) ### Total mean square error for whole the samples opt_split(f,AMSE)
#> [[1]] #> [1] 483 #> #> [[2]] #> [1] 0.06773946 #> #> [[3]] #> [1] 0.3171577 #>