y = RV('y',2);

g.class = 'mexFnc';
g.dim = 2;
g.dimc = 2;
g.function = 'test_function';

g2.class = 'linfn';
g2.A     = eye(2);
g2.B     = [1;0];

fy.class = 'mgnorm<chmat>';
fy.R = 0.1*eye(2);
fy.g = g;
fy.rv = y;
fy.rvc = RVtimes(y,-1);


%%%%%% Data generator
DS.class   = 'PdfDS';
DS.pdf     = fy;
DS.init_rv = RVtimes(y,-1);
DS.init_values = [.2,.3]';

%%%%% Estimator
E.class = 'ARXg';
E.rv = y;
E.rgr = RVtimes(y,-1);
E.dimx=2;
E.frg=0.99;
E.constant = 1;
E.g = g;

exper.ndat = 1000;
M = estimator(DS,{E},exper);
%%%%%% ARX estimator conditioned on frg
