# NOT RUN {
##----- A toy example -------
set.seed(0)
n <- 100
x = seq(1/n, 1,length.out = n)
y0 = 0*x; y0[x>0.5] = 1
y = y0 + rnorm(n, sd = 0.1)
# For 'amias' object
fit <- amias(y, k = 1)
print(fit)
# For 'samias' object
fit <- samias(y, kmax = 5)
print(fit)
# }
Run the code above in your browser using DataLab