#' Create a \code{TMB::ADFun} object for the normal likelihood.
#'
#' @param x Vector of observations.
#' @return A list as returned by \code{TMB::MakeADFun} representing the negative loglikelihood of a univariate normal.
#' @export
norm_ADFun <- function(x) {
TMB::MakeADFun(data = list(model = "NormalNLL", x = x),
parameters = list(mu = 0, sigma = 1),
DLL = "TMBtools_TMBExports", silent = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.