search for: tnlogl

Displaying 1 result from an estimated 1 matches for "tnlogl".

Did you mean: nlogl
2011 Aug 17
2
An example of very slow computation
...xp(theta[4]) -sum(dnorm(dat[,2],mean=pred,sd=sigma, log=TRUE)) } theta<-rep(-2,4) fand<-nlogL(theta) fsim<-negll(theta) cat("Check fn vals: expm =",fand," simple=",fsim," diff=",fand-fsim,"\n") cat("time the function in expm form\n") tnlogL<-microbenchmark(nlogL(theta), times=100L) tnlogL cat("time the function in simpler form\n") tnegll<-microbenchmark(negll(theta), times=100L) tnegll ftimes<-data.frame(texpm=tnlogL$time, tsimp=tnegll$time) # ftimes boxplot(log(ftimes)) title("Log times in nanoseconds for...