File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -797,8 +797,8 @@ buildOneAGHQuad1D <- nimbleFunction(
797797 gr_rehatwrtp <<- hesslogLikwrtpre / negHessian
798798 if (quadTransform_ == " center" ){
799799 # # If not scaling then the gr wrt to sigma = 0.
800- gr_sigmahatwrtp <<- nimNumeric( value = 0 , length = p_indices )
801- gr_sigmahatwrtre <<- 0
800+ gr_sigmahatwrtp <<- grlogdetNegHesswrtp * 0
801+ gr_sigmahatwrtre <<- grlogdetNegHesswrtre * 0
802802 }else {
803803 # # dsigma_hat/dp (needed at real scale)
804804 sigma_hat <- 1 / sqrt(negHessian )
@@ -2233,7 +2233,8 @@ buildAGHQ <- nimbleFunction(
22332233 # # stop("updateSettings: `computeMethod` must be 1, 2, or 3")
22342234 # # }
22352235 if (quadTransform != " NULL" ) {
2236- if (quadTransform != " spectral" & quadTransform != " cholesky" )
2236+ if (quadTransform == " centre" ) quadTransform <- " center" # # British spelling okay.
2237+ if (! any(quadTransform == c(" spectral" , " cholesky" , " identity" , " center" )))
22372238 stop(" `quadTransform` must be either cholesky or spectral." )
22382239 }
22392240 # actions
You can’t perform that action at this time.
0 commit comments