# NOT RUN {
p <- c(10 , 0.1 , 0.1)
d <- rdavies(50,p)
system.time(print(maximum.likelihood(d)))
#observe how long this takes.
#The time is taken in repeated calls
#to pdavies(), which uses uniroot().
system.time(print(least.squares(d)))
#Much faster.
# }
Run the code above in your browser using DataCamp Workspace