residuals.html 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 residuals</title>
  6. <meta name="keywords" content="residuals">
  7. <meta name="description" content="Residuals (or a few other things) from a locfit() fit.">
  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>residuals
  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>Residuals (or a few other things) from a locfit() fit.</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 y = residuals(fit,type) </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"> Residuals (or a few other things) from a locfit() fit.
  27. Input arguments:
  28. fit - the locfit() fit.
  29. type (optional) type of residuals. Valid types are
  30. 'dev' (deviance, the default)
  31. 'd2' (deviance squared)
  32. 'pearson'(Pearson)
  33. 'raw' (observed - fitted)
  34. 'ldot' (derivative of log-likelihood)
  35. 'lddot' (second derivative)
  36. 'fit' (fitted values - no transformation)
  37. 'mean' (fitted values - with back transformation)
  38. Author: Catherine Loader.</pre></div>
  39. <!-- crossreference -->
  40. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  41. This function calls:
  42. <ul style="list-style-image:url(../../../matlabicon.gif)">
  43. <li><a href="predict.html" class="code" title="function [y, se] = predict(varargin)">predict</a> Interpolate a fit produced by locfit().</li></ul>
  44. This function is called by:
  45. <ul style="list-style-image:url(../../../matlabicon.gif)">
  46. <li><a href="../../../chronux_2_10/locfit/Book/fig2_5.html" class="code" title="">fig2_5</a> Local Regression and Likelihood, Figure 2.5.</li><li><a href="../../../chronux_2_10/locfit/Book/fig4_3.html" class="code" title="">fig4_3</a> Local Regression and Likelihood, Figure 4.3.</li><li><a href="../../../chronux_2_10/locfit/Book/fig6_3.html" class="code" title="">fig6_3</a> Local Regression and Likelihood, Figure 6.3.</li><li><a href="../../../chronux_2_10/locfit/Book/fig6_4.html" class="code" title="">fig6_4</a> Local Regression and Likelihood, Figure 6.4.</li></ul>
  47. <!-- crossreference -->
  48. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  49. <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function y = residuals(fit,type)</a>
  50. 0002
  51. 0003 <span class="comment">% Residuals (or a few other things) from a locfit() fit.</span>
  52. 0004 <span class="comment">%</span>
  53. 0005 <span class="comment">% Input arguments:</span>
  54. 0006 <span class="comment">% fit - the locfit() fit.</span>
  55. 0007 <span class="comment">% type (optional) type of residuals. Valid types are</span>
  56. 0008 <span class="comment">% 'dev' (deviance, the default)</span>
  57. 0009 <span class="comment">% 'd2' (deviance squared)</span>
  58. 0010 <span class="comment">% 'pearson'(Pearson)</span>
  59. 0011 <span class="comment">% 'raw' (observed - fitted)</span>
  60. 0012 <span class="comment">% 'ldot' (derivative of log-likelihood)</span>
  61. 0013 <span class="comment">% 'lddot' (second derivative)</span>
  62. 0014 <span class="comment">% 'fit' (fitted values - no transformation)</span>
  63. 0015 <span class="comment">% 'mean' (fitted values - with back transformation)</span>
  64. 0016 <span class="comment">%</span>
  65. 0017 <span class="comment">% Author: Catherine Loader.</span>
  66. 0018
  67. 0019 <span class="keyword">if</span> (nargin&lt;2) type = <span class="string">'dev'</span>; <span class="keyword">end</span>;
  68. 0020
  69. 0021 y = <a href="predict.html" class="code" title="function [y, se] = predict(varargin)">predict</a>(fit,<span class="string">'d'</span>,<span class="string">'restyp'</span>,type);
  70. 0022
  71. 0023 <span class="keyword">return</span>;</pre></div>
  72. <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>
  73. </body>
  74. </html>