Revision 968, 0.7 kB
(checked in by smidl, 14 years ago)
|
New mexes + corrected tutorial
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | clear all |
---|
2 | % name random variables |
---|
3 | y = RV({'y'},1); |
---|
4 | u = RV({'u'},1); |
---|
5 | |
---|
6 | % create f(y_t| y_{t-3}, u_{t-1}) |
---|
7 | fy.class = 'mlnorm<ldmat>'; |
---|
8 | fy.rv = y; |
---|
9 | fy.rvc = RVtimes([y,u], [-3, -1]); |
---|
10 | fy.A = [0.5, -0.9]; |
---|
11 | fy.const = 0; |
---|
12 | fy.R = 1e-2; |
---|
13 | |
---|
14 | % create f(u_t| ) |
---|
15 | fu.class = 'enorm<ldmat>'; |
---|
16 | fu.rv = u; |
---|
17 | fu.mu = 0; |
---|
18 | fu.R = 1e-1; |
---|
19 | |
---|
20 | % create DS |
---|
21 | DS.class = 'PdfDS'; |
---|
22 | DS.pdf.class = 'mprod'; |
---|
23 | DS.pdf.pdfs = {fy, fu}; |
---|
24 | DS.init_rv = RVtimes([y,y,y], [-1,-2,-3]); |
---|
25 | DS.init_values = [0.1, 0.2, 0.3]; |
---|
26 | |
---|
27 | experiment.ndat=100; |
---|
28 | |
---|
29 | M=simulator(DS,experiment); |
---|
30 | %M=estimator(DS,{},experiment); |
---|
31 | |
---|
32 | %%% store results |
---|
33 | Data=[M.DS_dt_y'; M.DS_dt_u']; |
---|
34 | drv = RVjoin([y,u]); |
---|
35 | true_theta=[fy.A fy.const]; |
---|
36 | true_R=[fy.R]; |
---|
37 | save pdfds_results Data drv y u true_theta true_R |
---|