Paul van Dam Bates
banner
paul-vdb.bsky.social
Paul van Dam Bates
@paul-vdb.bsky.social
Ecological statistician at Fisheries and Oceans Canada. Estimating salmon species composition on the Fraser River using hydroacoustics. Developing quadrature methods for #NIMBLE
Microbenchmark but basically the difference of precomputing a column sparse matrix before passing it to the function vs within. This may sound silly but I had written my own version of sparse linear algebra so that is why it wasnt clear to me.
January 21, 2026 at 3:18 PM
If doing optimization on the log scale of a parameter then need the Jacobian to find posterior mode. If its a penalty term then you do not. That in my experience is the difference.
January 14, 2026 at 5:38 PM
No. Just typically data constrained and using maximum likelihood with priors as penalties to constrain their estimates to reasonable values.
January 14, 2026 at 5:32 PM
Check out our vignette for details on how to use it: r-nimble.org/vignettes/ni...
Using nimbleQuad for maximum likelihood estimation and deterministic posterior approximation
r-nimble.org
January 14, 2026 at 4:14 PM
In fisheries it is the wild west for what a penalty term is vs a prior. The main difference being whether or not a jacobian is included for any transformations. See optimize via stan that gets specific about whether to use jacobians or the prior as a penalty.
January 14, 2026 at 3:42 PM
The dense linear algebra version that is fine for a small number of states. Thanks to #RTMB for their version.
July 18, 2025 at 9:11 PM
Discrete movement in continuous time. The data look like below with blue points detectors that detected an animal. Red lines the latent movement path of the animal.
July 18, 2025 at 9:05 PM
More encouraging results with a few more animals (N=50)
July 18, 2025 at 9:04 PM
Section 12.3 of the user manual: Advanced user-defined functions and distributions has the basic details laid out.
March 17, 2025 at 10:11 PM
Not sure. It should be added if not. Here is a basic example that I have not actually run so may need to be edited. But data input in this case would be the animal ID to link it to the cached count. Let me know if it doesn’t run.
March 16, 2025 at 4:50 PM
You can cache data and constants in setup code for distribution functions now. Speeds up compiling and reduces memory a lot!
March 15, 2025 at 8:58 PM
Alternatively, in glmm, I rarely (once) have had anyone worry that the marginal mean and the conditional mean are not the same. I appreciate the discussion by Gory et al. 2020 "A class of generalized linear mixed models adjusted for marginal interpretability" on this topic and keen to hear thoughts.
February 26, 2025 at 7:13 PM
When log(R) ~ Normal(mu, s^2), then E(R) = mu + s^2/2. So instead, I often see log(R) ~ Normal(mu-s^2/2, s^2), so that E(R) = mu.

But then they add additionally complexity with random effects. But those terms aren't also included in the bias correction. So, what is actually happening?
February 26, 2025 at 7:11 PM
Page limits have really improved my writing. Makes me ask if each sentence brings me joy.
December 18, 2024 at 12:04 AM