Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

invlink.html 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/REC-html40/loose.dtd">
  3. <html>
  4. <head>
  5. <title>Description of invlink</title>
  6. <meta name="keywords" content="invlink">
  7. <meta name="description" content="inverse link function for locfit.">
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  9. <meta name="generator" content="m2html &copy; 2005 Guillaume Flandin">
  10. <meta name="robots" content="index, follow">
  11. <link type="text/css" rel="stylesheet" href="../../../m2html.css">
  12. <script type="text/javascript">
  13. if (top.frames.length == 0) { top.location = "../../../index.html"; };
  14. </script>
  15. </head>
  16. <body>
  17. <a name="_top"></a>
  18. <!-- ../../menu.html chronux_2_10 --><!-- # locfit --><!-- menu.html m -->
  19. <h1>invlink
  20. </h1>
  21. <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  22. <div class="box"><strong>inverse link function for locfit.</strong></div>
  23. <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  24. <div class="box"><strong>function y0 = invlink(y,fali) </strong></div>
  25. <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  26. <div class="fragment"><pre class="comment"> inverse link function for locfit.
  27. y is a vector of raw fitted values.
  28. fali is the integer [family link] vector from locfit.
  29. output is the inv. link.</pre></div>
  30. <!-- crossreference -->
  31. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  32. This function calls:
  33. <ul style="list-style-image:url(../../../matlabicon.gif)">
  34. </ul>
  35. This function is called by:
  36. <ul style="list-style-image:url(../../../matlabicon.gif)">
  37. <li><a href="lfband.html" class="code" title="function lfband(fit,varargin)">lfband</a> adds confidence bands around the plot of a locfit() fit.</li><li><a href="lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a> Plot (for one or two dimensions) a locfit() fit.</li><li><a href="smooth_lf.html" class="code" title="function z=smooth_lf(x,y,varargin)">smooth_lf</a> must (unlike R smooth.lf() function) give x and y.</li><li><a href="../../../chronux_2_10/spectral_analysis/helper/den_jack.html" class="code" title="function [m,ll,ul,llj,ulj]=den_jack(X,family,varargin)">den_jack</a> Function to compute smooth estimates of the mean of x using locfit,</li></ul>
  38. <!-- crossreference -->
  39. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  40. <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function y0 = invlink(y,fali)</a>
  41. 0002 <span class="comment">% inverse link function for locfit.</span>
  42. 0003 <span class="comment">% y is a vector of raw fitted values.</span>
  43. 0004 <span class="comment">% fali is the integer [family link] vector from locfit.</span>
  44. 0005 <span class="comment">% output is the inv. link.</span>
  45. 0006
  46. 0007 link = fali(2);
  47. 0008
  48. 0009 <span class="keyword">switch</span>(link)
  49. 0010 <span class="keyword">case</span> 3 <span class="comment">% identity</span>
  50. 0011 y0 = y;
  51. 0012 <span class="keyword">case</span> 4 <span class="comment">% log</span>
  52. 0013 y0 = exp(y);
  53. 0014 <span class="keyword">case</span> 5 <span class="comment">% logit - should invert carefully!</span>
  54. 0015 y0 = 1 - 1./(1+exp(y));
  55. 0016 <span class="keyword">case</span> 6 <span class="comment">% inverse</span>
  56. 0017 y0 = 1/y;
  57. 0018 <span class="keyword">case</span> 7 <span class="comment">% sqrt</span>
  58. 0019 y0 = y*abs(y);
  59. 0020 <span class="keyword">case</span> 8 <span class="comment">% arcsin</span>
  60. 0021 y0 = sin(y)*sin(y);
  61. 0022 <span class="keyword">otherwise</span>
  62. 0023 disp(<span class="string">'invlink: Unknown link function'</span>);
  63. 0024 <span class="keyword">end</span>;</pre></div>
  64. <hr><address>Generated on Fri 12-Aug-2011 11:36:15 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2005</address>
  65. </body>
  66. </html>