backtr

PURPOSE ^

SYNOPSIS ^

function z=backtr(y,fit)

DESCRIPTION ^

 Inverse-link transformation of y.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function z=backtr(y,fit)
0002 %
0003 % Inverse-link transformation of y.
0004 
0005 fali = fit.fit_points.family_link;
0006 link = fali(2);
0007 switch link
0008   case 3
0009     z=y;
0010   case 4
0011     z=exp(y);
0012   case 5
0013     z = y;
0014     i = find(y<=0);
0015     if (length(i)>0)
0016       z(i) = exp(y(i))./(1+exp(y(i)));
0017     end;
0018     i = find(y>0);
0019     if (length(i)>0)
0020       z(i) = 1./(1+exp(-y(i)));
0021     end;
0022   case 6
0023     z=1./y;
0024   case 7
0025     z=y.*abs(y);
0026   case 8
0027     z=sin(y).^2;
0028   otherwise
0029      disp('Backtr: invalid link');
0030      z=y;
0031 end;
0032 
0033 return;

Generated on Fri 12-Aug-2011 11:36:15 by m2html © 2005