0
|
1 function z=backtr(y,fit)
|
|
2 %
|
|
3 % Inverse-link transformation of y.
|
|
4
|
|
5 fali = fit.fit_points.family_link;
|
|
6 link = fali(2);
|
|
7 switch link
|
|
8 case 3
|
|
9 z=y;
|
|
10 case 4
|
|
11 z=exp(y);
|
|
12 case 5
|
|
13 z = y;
|
|
14 i = find(y<=0);
|
|
15 if (length(i)>0)
|
|
16 z(i) = exp(y(i))./(1+exp(y(i)));
|
|
17 end;
|
|
18 i = find(y>0);
|
|
19 if (length(i)>0)
|
|
20 z(i) = 1./(1+exp(-y(i)));
|
|
21 end;
|
|
22 case 6
|
|
23 z=1./y;
|
|
24 case 7
|
|
25 z=y.*abs(y);
|
|
26 case 8
|
|
27 z=sin(y).^2;
|
|
28 otherwise
|
|
29 disp('Backtr: invalid link');
|
|
30 z=y;
|
|
31 end;
|
|
32
|
|
33 return;
|