R Under development (unstable) (2024-09-21 r87186 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(glmm) Loading required package: trust Loading required package: mvtnorm Loading required package: Matrix Loading required package: parallel Loading required package: doParallel Loading required package: foreach Loading required package: iterators > theta<-1 > delta<-1E-8 > > #check derivatives for bernoulli using finite differences > this<-bernoulli.glmm()$cp(theta)*delta > that<-bernoulli.glmm()$cum(theta+delta)-bernoulli.glmm()$cum(theta) > all.equal(this,that) [1] TRUE > > this<-bernoulli.glmm()$cpp(theta)*delta > that<-bernoulli.glmm()$cp(theta+delta)-bernoulli.glmm()$cp(theta) > all.equal(this,that) [1] TRUE > > #check derivatives for poisson using finite differences > this<-poisson.glmm()$cp(theta)*delta > that<-poisson.glmm()$cum(theta+delta)-poisson.glmm()$cum(theta) > all.equal(this,that) [1] TRUE > > this<-poisson.glmm()$cpp(theta)*delta > that<-poisson.glmm()$cp(theta+delta)-poisson.glmm()$cp(theta) > all.equal(this,that) [1] TRUE > > > > proc.time() user system elapsed 1.31 0.21 1.51