powered by
Calculate the max absolute error of the cos method for different parameters given a vector of x.
LogErrorCosPdf(x, f, Chf, a, b, N)
A matrix that contains the log max error for different parameters
vector of observations
the true p.d.f.
the characteristic function
the lower limit of the truncation interval
the upper limit of the truncation interval
the number of cos term for summation
N <- c(1:200) L <- c(10, 20, 60, 100, 1000) a <- -L / 2 b <- L / 2 x <- seq(-5, 5, by = 10 / (32 - 1)) LogErrorCosPdf(x, dnorm, NormChf, a, b, N)
Run the code above in your browser using DataLab