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