Home > chronux > locfit > m > invlink.m

invlink

PURPOSE ^

inverse link function for locfit.

SYNOPSIS ^

function y0 = invlink(y,fali)

DESCRIPTION ^

 inverse link function for locfit.
 y is a vector of raw fitted values.
 fali is the integer [family link] vector from locfit.
 output is the inv. link.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function y0 = invlink(y,fali)
0002 % inverse link function for locfit.
0003 % y is a vector of raw fitted values.
0004 % fali is the integer [family link] vector from locfit.
0005 % output is the inv. link.
0006 
0007 link = fali(2);
0008 
0009 switch(link)
0010     case 3   % identity
0011         y0 = y;
0012     case 4   % log
0013         y0 = exp(y);
0014     case 5   % logit - should invert carefully!
0015         y0 = 1 - 1./(1+exp(y));
0016     case 6   % inverse
0017         y0 = 1/y;
0018     case 7   % sqrt
0019         y0 = y*abs(y);
0020     case 8   % arcsin
0021         y0 = sin(y)*sin(y);
0022     otherwise
0023         disp('invlink: Unknown link function');
0024 end;

Generated on Fri 28-Sep-2012 12:34:30 by m2html © 2005