Yes, the local level example.
This is the script output, when I run the local level script:

? nulldata 200
periodicity: 1, maxobs: 200
observations range: 1 to 200
? set seed 101010
Pseudo-random number generator seeded with 101010
? setobs 1 1 --special-time-series
Full data range: 1 - 200 (n = 200)

/* set the true variance parameters */
? true_s1 = 0.5
Generated scalar true_s1 = 0.5
? true_s2 = 0.25
Generated scalar true_s2 = 0.25
/* and simulate some data */
? v = normal() * sqrt(true_s1)
Generated series v (ID 2)
? w = normal() * sqrt(true_s2)
Generated series w (ID 3)
? mu = 2 + cum(v)
Generated series mu (ID 4)
? y = mu + w
Generated series y (ID 5)
/* starting values for variance estimates */
? s1 = 1
Generated scalar s1 = 1
? s2 = 1
Generated scalar s2 = 1
/* state-space model set-up */
? bundle kb = ksetup(y, 1, 1, s1)
Data types not conformable for operation

Error executing script: halting
> bundle kb = ksetup(y, 1, 1, s1)

Where I'm wrong?

Paolo




Il 28/06/2016 18:03, Riccardo (Jack) Lucchetti ha scritto:
On Tue, 28 Jun 2016, Paolo Chirico wrote:

Dear Sven,
I've tried the example 30.2: I've copied and pasted (and run) the script 30.2.
I've recived the following error message: "Data types not conformable for operation"
Actually the same message arised with other data.
Where is the problem?

Do you mean the local level model example? I'm posting it here for clarity:

<hansl>
nulldata 200
set seed 101010
setobs 1 1 --special-time-series

/* set the true variance parameters */
true_s1 = 0.5
true_s2 = 0.25

/* and simulate some data */
v = normal() * sqrt(true_s1)
w = normal() * sqrt(true_s2)
mu = 2 + cum(v)
y = mu + w

/* starting values for variance estimates */
s1 = 1
s2 = 1

/* state-space model set-up */
bundle kb = ksetup(y, 1, 1, s1)
kb.obsvar = s2
kb.diffuse = 1

/* ML estimation of variances */
mle ll = ERR ? NA : kb.llt
ERR = kfilter(&kb)
params kb.statevar kb.obsvar
end mle

/* compute the smoothed state */
ksmooth(&kb)
series muhat = kb.state
</hansl>

This should run ok on the snapshots. Which is the instruction that triggers the error?


-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Universitą Politecnica delle Marche
  (formerly known as Universitą di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------


_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users

-- 
Paolo Chirico
Assistant Professor of Economic Statistics
Dept. of Economics & Statistics "Cognetti de Martiis"
Campus Luigi Einaudi, University of Turin
ITALY