Running examples in ‘mssm-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: logLik.mssm
> ### Title: Approximate Log-likelihood for a mssm Object
> ### Aliases: logLik.mssm logLik.mssmLaplace
> 
> ### ** Examples
> 
> if(require(Ecdat)){
+  # load data and fit glm to get starting values
+  data("Gasoline", package = "Ecdat")
+  glm_fit <- glm(lgaspcar ~ factor(country) + lincomep + lrpmg + lcarpcap,
+                 Gamma("log"), Gasoline)
+ 
+  # get object to perform estimation
+  library(mssm)
+  ll_func <- mssm(
+    fixed = formula(glm_fit), random = ~ 1, family = Gamma("log"),
+    data = Gasoline, ti = year, control = mssm_control(
+      N_part = 1000L, n_threads = 1L))
+ 
+  # fit model with time-varying intercept with Laplace approximation
+  disp <- summary(glm_fit)$dispersion
+  laplace <- ll_func$Laplace(
+    cfix = coef(glm_fit), disp = disp, F. = diag(.5, 1), Q = diag(1))
+ 
+  # run particle filter
+  pf <- ll_func$pf_filter(
+    cfix = laplace$cfix, disp = laplace$disp, F. = laplace$F., Q = laplace$Q)
+ 
+  # compare approximate log-likelihoods
+  print(logLik(pf))
+  print(logLik(laplace))
+ }
Loading required package: Ecdat
Loading required package: Ecfun

Attaching package: ‘Ecfun’

The following object is masked from ‘package:base’:

    sign


Attaching package: ‘Ecdat’

The following object is masked from ‘package:datasets’:

    Orange


 *** caught segfault ***
address 0x5, cause 'memory not mapped'

Traceback:
 1: run_Laplace_aprx(Y = y, cfix = cfix, ws = weights, offsets = offsets,     disp = disp, X = X, Z = Z, time_indices_elems = time_indices_elems -         1L, time_indices_len = time_indices_len, F = F., Q = Q,     Q0 = Q0, fam = fam, mu0 = mu0, n_threads = control$n_threads,     nu = control$nu, covar_fac = control$covar_fac, ftol_rel = control$ftol_rel,     N_part = N_part, what = what, trace, KD_N_max = control$KD_N_max,     aprx_eps = control$aprx_eps, ftol_abs = control$ftol_abs,     la_ftol_rel = control$la_ftol_rel, ftol_abs_inner = control$ftol_abs_inner,     la_ftol_rel_inner = control$la_ftol_rel_inner, maxeval = control$maxeval,     maxeval_inner = control$maxeval_inner)
 2: ll_func$Laplace(cfix = coef(glm_fit), disp = disp, F. = diag(0.5,     1), Q = diag(1))
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault