# NOT RUN {
# Example 1: Let F be a standard normal cumulative distribution function then
f_N<-function(s){dnorm(s, mean = 0,sd = 1)} # density function of N(0,1)
y=rnorm(100)
momQBAD(y=y,f=f_N,alpha=0.5) # If alpha is known with alpha=0.5
momQBAD(y=y,f=f_N) # If alpha is unknown
# Example 2: Let F be a standard Laplace cumulative distribution function then
f_La<-function(s){0.5*exp(-abs(s))} # density function of Laplace(0,1)
momQBAD(y=y,f=f_La,alpha=0.5) # If alpha is known with alpha=0.5
momQBAD(y=y,f=f_La) # If alpha is unknown
# }
Run the code above in your browser using DataLab