For a given data f and a given split i, the function returns vector of two values of the average mean square errors on the left and righe intevals generated by this split.

split(f, i)

Arguments

f

data of an n x nx matrix, where n is number of samples (rows) and nx reperesents the grid size

i

an integer withen the range of the object, i.e \((1 , (nx-1))\), indecates the split.

Value

vector of two average mean square errors (AMSE_L, AMSE_R):left and righr 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

opt_split

Examples

n=10 f=rbetafda(n) nx=dim(f)[2] xx=vector() for( i in 1:499){ Q=split(f,i) xx[i]=Q[1]*i/nx+Q[2]*(nx-i)/nx } plot(xx)