root/applications/bdmtoolbox/tutorial/userguide/pdfds_example.m @ 745

Revision 745, 0.7 kB (checked in by smidl, 15 years ago)

examples on windows

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