Revision 1533

trunk/tests/ctl/example.dat (revision 1533)
1
# number of observations
2
     10
3
# observed Y values
4
    1.4  4.7  5.1  8.3  9.0  14.5  14.0  13.4  19.2  18 
5
# observed x values
6
    -1  0 1  2  3  4  5  6  7  8        
7

  
trunk/tests/ctl/GNUmakefile (revision 1533)
1
all:
2
	../../admb example
3
	./example
4

  
5
clean:
6
	@rm -vf admodel.cov
7
	@rm -vf admodel.dep
8
	@rm -vf admodel.hes
9
	@rm -vf eigv.rpt
10
	@rm -vf example
11
	@rm -vf example.b01
12
	@rm -vf example.bar
13
	@rm -vf example.cor
14
	@rm -vf example.cpp
15
	@rm -vf example.eva
16
	@rm -vf example.htp
17
	@rm -vf example.log
18
	@rm -vf example.obj
19
	@rm -vf example.p01
20
	@rm -vf example.par
21
	@rm -vf example.std
22
	@rm -vf fmin.log
23
	@rm -vf variance
trunk/tests/ctl/example.tpl (revision 1533)
1
DATA_SECTION
2
	init_int nobs;
3
	init_vector y(1,nobs);
4
	init_vector x(1,nobs);
5

  
6
	!! ad_comm::change_datafile_name("example.ctl");
7
	init_vector a_lup(1,3);
8
	init_vector b_lup(1,3);
9
	init_vector sig_lup(1,3);
10

  
11
	init_matrix theta_lup(1,3,1,3);
12
PARAMETER_SECTION
13

  
14
	init_bounded_number a(a_lup);
15
	init_bounded_number b(b_lup);
16
	init_bounded_number sig(sig_lup);
17

  
18
	init_bounded_number_vector theta(theta_lup);
19
	objective_function_value f;
20

  
21
	vector y_hat(1,nobs);
22
	vector y2_hat(1,nobs);
23

  
24
INITIALIZATION_SECTION
25
	sig 1.0;
26

  
27

  
28
PROCEDURE_SECTION
29
	
30
	y_hat = a + b * x;
31
	y2_hat = theta(1) + theta(2)*x;
32
	f     = dnorm(y - y_hat, sig);
33
	f    += dnorm(y-y2_hat,theta(3));
34

  
35

  
trunk/tests/ctl/example.ctl (revision 1533)
1
#a_lup
2
-5  5  1
3
#b_lup
4
-10  10  1
5
#sig_lup
6
0.01  3.0  2
7
#theta_lup
8
# lower bound, upper bound, phase
9
-5  5  1
10
-10 10 1
11
0.01 5.0 2
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff