Under development

Do everything not involving theta outside of the psiFUN

The following example compares two estFUNs. The first performs manipulations of data outside of the “inner” psiFUN function. The second performs the manipulations within the returned psiFUN.

Now, compare the speed:

## 
## Attaching package: 'geex'
## The following object is masked from 'package:methods':
## 
##     show
##    user  system elapsed 
##   2.101   0.071   2.576
##    user  system elapsed 
##  12.861   0.662  13.726

Use method = "simple" for computing numerical derivatives

The default for the function numDeriv::jacobian uses the “Richardson” method for computing numerical derivatives, which requires multiple evaluations of each psiFUN. The “simple” method is much faster, though less accurate. See the numDeriv::jacobian help page for further options.

##    user  system elapsed 
##   1.572   0.042   1.710
##    user  system elapsed 
##   0.739   0.029   0.791