title: Problem to obtain the residuals with the R package stochvol
body: <p>I am trying to obtain the residuals after to fit a model with the <em>stochvol</em> package's function <em>svsample()</em>.</p>
  <pre><code>library(stochvol)
  #simulated data
  y &lt;- svsim(len=10000, mu = -8, phi = 0.98, sigma = 0.15)
  plot(y, type=&quot;l&quot;)
  #fitting the model
  modStoch &lt;- svsample(y, priormu = c(-10, 1), priorphi = c(20, 1.1), priorsigma = 0.1)
  summary(modStoch)
  plot(modStoch)
  
  #residuals of the model
  res &lt;- resid(modStoch)
  #res &lt;- residuals(modStoch) this line doesn't work neither
  </code></pre>
  <p>This is the error:</p>
  <p><strong>Error in t(object$latent)/2 : argumento no-numérico para operador binario</strong></p>
  <p>I have tested several versions of R and the error remains.</p>
  <p>¡Thank you!</p>