Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions install_requirements.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,21 @@ requirements <- c(
'igraph',
'coda',
'R6',
##'nimble', ## add back in later
'testthat',
'pracma', ## for AD
'numDeriv', ## for AD
'mvQuad',
'RTMB',
'polynom'
## 'lme4' ## for test-ADlaplace.R
'polynom',
'nimble'
## 'lme4'
)

for(package in requirements) {
install.packages(package)
}

## Apparently a bug in Matrix (as of early 2024) is causing an issue (https://bioconductor.org/packages/devel/bioc/vignettes/dreamlet/inst/doc/errors.html) that is causing test-ADlaplace.R failures when fitting a model with lmer.
## Apparently a bug in Matrix (as of early 2024) is causing an issue (https://bioconductor.org/packages/devel/bioc/vignettes/dreamlet/inst/doc/errors.html) that is causing Laplace test failures when fitting a model with lmer.
install.packages('lme4', type = 'source')


## later, remove below:
install.packages('devtools')
library(devtools)
devtools::install_github('nimble-dev/nimble', ref = 'no-laplace', subdir = 'packages/nimble', INSTALL_opts = c("--install-tests"))
## remove until here

2 changes: 0 additions & 2 deletions nimbleQuad/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ RoxygenNote: 7.3.2
Collate:
quadratureRules.R
quadratureGrids.R
nodeUtils.R
Laplace.R
buildNestedApprox.R
runNestedApprox.R
summaryUtils.R
normTooling.R
16 changes: 8 additions & 8 deletions nimbleQuad/R/Laplace.R
Original file line number Diff line number Diff line change
Expand Up @@ -3293,7 +3293,7 @@ runAGHQ <- function(AGHQ, pStart,
#' @param paramNodes a character vector of names of parameter nodes in the
#' model; defaults are provided by \code{\link[nimble]{setupMargNodes}}.
#' Alternatively, \code{paramNodes} can be a list in the format returned by
#' \code{setupMargNodes}, in which case \code{randomEffectsNodes},
#' \code{\link[nimble]{setupMargNodes}}, in which case \code{randomEffectsNodes},
#' \code{calcNodes}, and \code{calcNodesOther} are not needed (and will be
#' ignored).
#' @param randomEffectsNodes a character vector of names of continuous
Expand Down Expand Up @@ -3394,15 +3394,15 @@ runAGHQ <- function(AGHQ, pStart,
#' match those here (except for a few arguments which are taken from control
#' list elements here).
#'
#' \code{setupMargNodes} tries to give sensible defaults from
#' \code{\link[nimble]{setupMargNodes}} tries to give sensible defaults from
#' any combination of \code{paramNodes}, \code{randomEffectsNodes},
#' \code{calcNodes}, and \code{calcNodesOther} that are provided. For example,
#' if you provide only \code{randomEffectsNodes} (perhaps you want to
#' marginalize over only some of the random effects in your model),
#' \code{setupMargNodes} will try to determine appropriate choices for the
#' \code{\link[nimble]{setupMargNodes}} will try to determine appropriate choices for the
#' others.
#'
#' \code{setupMargNodes} also determines which integration dimensions are
#' \code{\link[nimble]{setupMargNodes}} also determines which integration dimensions are
#' conditionally independent, i.e., which can be done separately from each
#' other. For example, when possible, 10 univariate random effects will be split
#' into 10 univariate integration problems rather than one 10-dimensional
Expand All @@ -3420,16 +3420,16 @@ runAGHQ <- function(AGHQ, pStart,
#' you must provide a \code{randomEffectsNodes} argument to indicate which
#' they are.
#'
#' It can be helpful to call \code{setupMargNodes} directly to see exactly how
#' It can be helpful to call \code{\link[nimble]{setupMargNodes}} directly to see exactly how
#' nodes will be arranged for Laplace approximation. For example, you may want
#' to verify the choice of \code{randomEffectsNodes} or get the order of
#' parameters it has established to use for making sense of the MLE and
#' results from the \code{summary} method. One can also call
#' \code{setupMargNodes}, customize the returned list, and then provide that
#' \code{\link[nimble]{setupMargNodes}}, customize the returned list, and then provide that
#' to \code{buildLaplace} as \code{paramNodes}. In that case,
#' \code{setupMargNodes} will not be called (again) by \code{buildLaplace}.
#' \code{\link[nimble]{setupMargNodes}} will not be called (again) by \code{buildLaplace}.
#'
#' If \code{setupMargNodes} is emitting an unnecessary warning, simply use
#' If \code{\link[nimble]{setupMargNodes}} is emitting an unnecessary warning, simply use
#' \code{control=list(check=FALSE)}.
#'
#' @section Managing parameter transformations that may be used internally:
Expand Down
4 changes: 2 additions & 2 deletions nimbleQuad/R/buildNestedApprox.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@
#' Laplace approximation to marginalize over all continuous latent nodes
#' (both random and fixed effects) in a model.
#'
#' \code{buildNestedApprox} uses \code{setupMargNodes} (in a multi-step process)
#' \code{buildNestedApprox} uses \code{\link[nimble]{setupMargNodes}} (in a multi-step process)
#' to try to give sensible defaults from
#' any combination of \code{paramNodes}, \code{latentNodes},
#' \code{calcNodes}, and \code{calcNodesOther} that are provided.
#'
#' \code{setupMargNodes} also determines which integration dimensions are
#' \code{\link[nimble]{setupMargNodes}} also determines which integration dimensions are
#' conditionally independent, i.e., which can be done separately from each
#' other. For example, when possible, 10 univariate random effects will be split
#' into 10 univariate integration problems rather than one 10-dimensional
Expand Down
54 changes: 0 additions & 54 deletions nimbleQuad/R/nodeUtils.R

This file was deleted.

124 changes: 0 additions & 124 deletions nimbleQuad/R/normTooling.R

This file was deleted.

2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-AGHQ.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library(nimbleQuad)
# Tests of AGH Quadrature approximation
source(system.file(file.path('tests', 'testthat', 'test_utils.R'), package = 'nimble'))
source(system.file(file.path('tests', 'testthat', 'AD_test_utils.R'), package = 'nimble'))
EDopt <- nimbleOptions("enableDerivs")
BMDopt <- nimbleOptions("buildModelDerivs")
nimbleOptions(enableDerivs = TRUE)
Expand Down
2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-laplace.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library(nimbleQuad) # to get nimbleQuad's names first
# Tests of Laplace approximation
source(system.file(file.path('tests', 'testthat', 'test_utils.R'), package = 'nimble'))
source(system.file(file.path('tests', 'testthat', 'AD_test_utils.R'), package = 'nimble'))
EDopt <- nimbleOptions("enableDerivs")
BMDopt <- nimbleOptions("buildModelDerivs")
nimbleOptions(enableDerivs = TRUE)
Expand Down
2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-laplace2.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library(nimbleQuad) # to get nimbleQuad's names first
# Tests of Laplace approximation
source(system.file(file.path('tests', 'testthat', 'test_utils.R'), package = 'nimble'))
source(system.file(file.path('tests', 'testthat', 'AD_test_utils.R'), package = 'nimble'))
EDopt <- nimbleOptions("enableDerivs")
BMDopt <- nimbleOptions("buildModelDerivs")
nimbleOptions(enableDerivs = TRUE)
Expand Down
2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-laplace3.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library(nimbleQuad) # to get nimbleQuad's names first
# Tests of Laplace approximation
source(system.file(file.path('tests', 'testthat', 'test_utils.R'), package = 'nimble'))
source(system.file(file.path('tests', 'testthat', 'AD_test_utils.R'), package = 'nimble'))
EDopt <- nimbleOptions("enableDerivs")
BMDopt <- nimbleOptions("buildModelDerivs")
nimbleOptions(enableDerivs = TRUE)
Expand Down
2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-nested-fit.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source(system.file(file.path('tests', 'testthat', 'test_utils.R'), package = 'nimble'))
source(system.file(file.path('tests', 'testthat', 'AD_test_utils.R'), package = 'nimble'))
EDopt <- nimbleOptions("enableDerivs")
BMDopt <- nimbleOptions("buildModelDerivs")
nimbleOptions(enableDerivs = TRUE)
Expand Down
2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-nested-interface.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source(system.file(file.path('tests', 'testthat', 'test_utils.R'), package = 'nimble'))
source(system.file(file.path('tests', 'testthat', 'AD_test_utils.R'), package = 'nimble'))
EDopt <- nimbleOptions("enableDerivs")
BMDopt <- nimbleOptions("buildModelDerivs")
nimbleOptions(enableDerivs = TRUE)
Expand Down
2 changes: 0 additions & 2 deletions nimbleQuad/tests/testthat/test-quadrature.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
library(nimbleQuad)
library(testthat)
# Tests of Quadrature Rules and Grids for numerical integration:

test_that("Check Basic Quad Rules work.", {
Expand Down
Loading