No articles match
Nonlinear model approximation3 months ago
A small toy problem | Latent Gaussian predictor version | Introducing a latent Gaussian variable $u\sim\pN(0,1)$, the model can bereformulated as$$\begin{aligned}\lambda(u) &=-\ln{1-\Phi(u)}/\gamma \(y_i|u) &\sim \pPo(\lambda(u))\end{aligned}$$We will need some derivatives of $\lambda$ with respect to $u$:$$\begin{aligned}\frac{\partial\lambda(u)}{\partial u} &= \frac{1}{\gamma}\frac{\phi(u)}{1-\Phi(u)}= \lambda'(u) \\frac{\partial^2\lambda(u)}{\partial u^2} &= | \frac{1}{\gamma}\frac{\phi(u)}{1-\Phi(u)}\left(u + \frac{\phi(u)}{1-\Phi(u)}\right) | Latent Gaussian posterior approximations | n\frac | n\frac{\lambda'(u)^2}{\lambda(u)}\end{aligned}$$At the mode $u_0$, the first order derivative is zero, and$$\begin{aligned}\left.\frac{\partial^2\ln p(u|{y_i})}{\partial u^2}\right|_{u=u_0}&=-1 | \left{u_0 - \gamma\lambda'(u_0) + \frac{\lambda'(u_0)}{\lambda(u_0)}\right}u_0 | n\frac{\lambda'(u_0)^2}{\lambda(u_0)} .\end{aligned}$$The quadratic approximation of the log-posterior density at the mode $u_0$ is then$$\ln \breve{p}(u|{y_i}) = \text{const} - \frac{(u-u_0)^2}{2}\left[ | \left.\frac{\partial^2\ln p(u|{y_i})}{\partial u^2}\right|{u=u_0}\right]$$In inlabru, the approximation first linearises $\ln \lambda(u)$ at $u_0$ before applyingthe Taylor approximation of $\ln p(u|{y_i})$. The linearised log-predictor is$$\ln \ol{\lambda}(u) = \ln \lambda(u_0) + \frac{\lambda'(u_0)}{\lambda(u_0)}(u - u_0)$$so that$$\ol{\lambda}'(u) = \frac{\lambda'(u_0)}{\lambda(u_0)} \ol{\lambda}(u)$$and the second order derivative of the linearised log-posterior density is$$\begin{aligned}\left.\frac{\partial^2\ln \ol{p}(u|{y_i})}{\partial u^2}\right|{u=u_0}&=-1 | Posterior densities | Posterior CDFs
Converting legacy INLA mesh code to fmesher6 months ago
Deprecation of old methods and class names | Deprecation warnings | Compatibility | Mesh construction | Location, basis and function evaluation | Finite element methods | Printing | CRS information and coordinate transformations | Plotting
Calculating probabilistic excursion sets and related quantities using excursions7 months ago
Excursion sets and contour credible regions | Analysis of contour maps | Continuous domain interpretations | Simultaneous confidence bands | Gaussian integrals | Plotting | References
Full vignette/examples list7 months ago
Package vignettes | Package examples
Devel: Customised model components with the bru_mapper system7 months ago
Mapper system introduction | Mappers | Basic mappers | const | linear | index | factor | matrix | harmonics | Transformation mappers | shift | scale | marginal | aggregate | logsumexp | logitaverage | Compound mappers | collect | multi | pipe | sum (from version 2.12.0.9001) | repeat | The core model component mapper | Object mappers | Model object mappers | Special mappers | Mapper methods | Mappers for fmesher objects | Customised mappers | Example
Iterative linearised INLA method7 months ago
The INLA method for linear predictors | Approximate INLA for non-linear predictors | $$\ol{p}(\bm{y}|\bm{u},\bm{\theta}) | p(\bm{y}|\ol{\bm{\eta}}(\bm{u}),\bm{\theta}) | p(\bm{y}|g^{-1}[\ol{\bm{\eta}}(\bm{u})],\bm{\theta})\approxp(\bm{y}|g^{-1}[\wt{\bm{\eta}}(\bm{u})],\bm{\theta}) | p(\bm{y}|\wt{\bm{\eta}}(\bm{u}),\bm{\theta}) | Fixed point iteration | Line search | Let $\sigma_i^2 = \mathrm{Var}_{\bm{u}\sim \ol{p}(\bm{u}|\bm{y},\bm{\theta}_1)}(\ol{\bm{\eta}}_i(\bm{u}))$be the current estimate of the posterior variance for each predictor element $i$.We then define an inner product on the space of predictor vectors as$$\langle \bm{a},\bm{b} \rangle_V | \sum_i \frac{a_i b_i}{\sigma_i^2} .$$The squared norm for the difference between the predictor vectors $\wt{\bm{\eta}}(\bm{v}_\alpha)$and $\ol{\bm{\eta}}(\bm{u}1)$,with respect to this inner product, is defined as$$| \wt{\bm{\eta}}(\bm{v}\alpha) - \ol{\bm{\eta}}(\bm{u}_1)|^2_V | Posterior non-linearity checks | Whereas the inlabru optimisation method leads to an estimate where $| \wt{\bm{\eta}} (\bm{u}*) - \ol{\bm{\eta}}(\bm{u})|=0$ for a specific $\bm{u}_$, the overall posterior approximation accuracy depends on the degree of nonlinearity in the vicinity of $\bm{u}*$.There are two main options for evaluating this nonlinearity, using sampling from the approximate posterior distribution.The first option is$$\begin{aligned}\sum_i \frac{E{\bm{u}\sim \ol{p}(\bm{u}|\bm{y})}\left[|\ol{\bm{\eta}}_i(\bm{u})-\wt{\bm{\eta}}i(\bm{u})|^2\right]}{\mathrm{Var}{\bm{u}\sim \ol{p}(\bm{u}|\bm{y})}(\ol{\bm{\eta}}_i(\bm{u}))} ,\end{aligned}$$which is the posterior expectation of the component-wise variance-normalised squared deviation between the non-linear and linearised predictor. Note that the normalising variance includes the variability induced by the posterior uncertainty for $\bm{\theta}$, whereas the $|\cdot|V$ norm used for the line search used only the posterior mode.Another option is$$E{(\bm{u},\bm{\theta})\sim \ol{p}(\bm{u},\bm{\theta}|\bm{y})} \left[\ln \frac{\ol{p}(\bm{u} |\bm{y},{\bm{\theta}})}{\wt{p}(\bm{u}|\bm{y},{\bm{\theta}})}\right] | Accuracy | For a given $\bm{\theta}$,$$\begin{aligned}\pKL{\ol{p}}{\wt{p}} &=E_{\ol{p}}\left[\ln\frac{\ol{p}(\bm{u}|\bm{y},\bm{\theta})}{\wt{p}(\bm{u}|\bm{y},\bm{\theta})}\right]\&=E_{\ol{p}}\left[\ln\frac{\ol{p}(\bm{y}|\bm{u},\bm{\theta})}{\wt{p}(\bm{y}|\bm{u},\bm{\theta})}\right] | Well-posedness and initialisation
Articles list7 months ago
Package vignettes | Package examples
Prediction scores7 months ago
Proper posterior prediction scores | A basic score, and motivating remarks | Proper and strictly proper scores | Examples | Improper scores | Mean error/score | Poisson model example | Moment scores | Log-Probability and log-density scores | CRPS | $$\wh{r}{ik} = \frac{1}{N\text{samples}} \sum_{j=1}^{N_\text{samples}}{\pP(Y\leq k|\lambda^{(j)}_i) | Normal model example | Moment scores and log-score | Posterior expectation of conditional scores | If we instead take advantage of the new expression above, we have$$[y - \pE(\lambda|\text{data})]^2 | \pE_{\lambda|\text{data}}[(y - \lambda)^2] | An alternative estimator for CRPS
The SPDE model with transparent barriers8 months ago
The transparent barrier model | Implementation | References
Classes and methods9 months ago
General classes | Bru mapper classes
Spatially varying mesh quality1 years ago
Fundamentals of triangle mesh refinement | Spatially varying edge length | Assessing the mesh quality
The fmesher C++ library1 years ago
Introduction | Data structures | Triangle centric data model | Graph traversal algebra | Matrices | Point locator trees | Operations | RCDT | Point locator | Rcpp interface | rcdt | bary | fem | split_lines | References
Custom mesh classes1 years ago
Minimal interface | Example: Harmonic function space of order n | Registering the methods | Expanded implementations
Defining model components2 years ago
Basic component features | What is a component design matrix? | Mapper methods | Mapper example: 2D SPDE | Defining main, group, and replicate. | inlabru-specific component types | Shortcuts | Intercept-like components | Spatial covariates | lm-style fixed effect and interaction syntax | A function given with no arguments | Non-linear predictors
Articles list2 years ago
Package examples | Package vignettes
Basic fmesher use2 years ago
Mesh construction | Point lookup and evaluation | Plotting | Base graphics | ggplot graphics | Finite element calculations | Stochastic process simulation
Definitions and computational methodology2 years ago
Definitions | Excursion sets | Contour credible regions and level avoiding sets | Excursion functions | Contour maps and their quality measures | Simultaneous confidence bands | Computational methods | Gaussian integrals | Handling non-Gaussian data | Continuous domain interpolations | References
Articles list2 years ago
Package examples | Package vignettes
Vignettes on the INLAspacetime website2 years ago
Vignettes