fig4_3.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 fig4_3</title>
  6. <meta name="keywords" content="fig4_3">
  7. <meta name="description" content="Local Regression and Likelihood, Figure 4.3.">
  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 Book -->
  19. <h1>fig4_3
  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>Local Regression and Likelihood, Figure 4.3.</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>This is a script file. </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"> Local Regression and Likelihood, Figure 4.3.
  27. Author: Catherine Loader
  28. Residual plots for local likelihood.
  29. Henderson-Shepherd Mortality Data.</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. <li><a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a> Smoothing noisy data using Local Regression and Likelihood.</li><li><a href="../../../chronux_2_10/locfit/m/residuals.html" class="code" title="function y = residuals(fit,type)">residuals</a> Residuals (or a few other things) from a locfit() fit.</li></ul>
  35. This function is called by:
  36. <ul style="list-style-image:url(../../../matlabicon.gif)">
  37. <li><a href="runbook.html" class="code" title="">runbook</a> </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 <span class="comment">% Local Regression and Likelihood, Figure 4.3.</span>
  41. 0002 <span class="comment">% Author: Catherine Loader</span>
  42. 0003 <span class="comment">%</span>
  43. 0004 <span class="comment">% Residual plots for local likelihood.</span>
  44. 0005 <span class="comment">% Henderson-Shepherd Mortality Data.</span>
  45. 0006
  46. 0007 load morths;
  47. 0008 fit = <a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(age,deaths,<span class="string">'weights'</span>,n,<span class="string">'family'</span>,<span class="string">'binomial'</span>,<span class="string">'alpha'</span>,0.5);
  48. 0009
  49. 0010 figure(<span class="string">'Name'</span>,<span class="string">'fig4_3a: Residual plots for local likelihood'</span>);
  50. 0011 plot(age,<a href="../../../chronux_2_10/locfit/m/residuals.html" class="code" title="function y = residuals(fit,type)">residuals</a>(fit,<span class="string">'dev'</span>),<span class="string">'.-'</span>);
  51. 0012 xlabel(<span class="string">'Age'</span>);
  52. 0013 ylabel(<span class="string">'Residual'</span>);
  53. 0014 title(<span class="string">'Deviance Residuals'</span>);
  54. 0015 hold on;
  55. 0016 plot([min(age) max(age)],[0 0],<span class="string">':'</span>);
  56. 0017 hold off;
  57. 0018
  58. 0019 figure(<span class="string">'Name'</span>,<span class="string">'fig4_3b: Residual plots for local likelihood'</span>);
  59. 0020 plot(age,<a href="../../../chronux_2_10/locfit/m/residuals.html" class="code" title="function y = residuals(fit,type)">residuals</a>(fit,<span class="string">'pear'</span>),<span class="string">'.-'</span>);
  60. 0021 xlabel(<span class="string">'Age'</span>);
  61. 0022 ylabel(<span class="string">'Residual'</span>);
  62. 0023 title(<span class="string">'Pearson Residuals'</span>);
  63. 0024 hold on;
  64. 0025 plot([min(age) max(age)],[0 0],<span class="string">':'</span>);
  65. 0026 hold off;
  66. 0027
  67. 0028 figure(<span class="string">'Name'</span>,<span class="string">'fig4_3c: Residual plots for local likelihood'</span>);
  68. 0029
  69. 0030 plot(age,<a href="../../../chronux_2_10/locfit/m/residuals.html" class="code" title="function y = residuals(fit,type)">residuals</a>(fit,<span class="string">'raw'</span>),<span class="string">'.-'</span>);
  70. 0031 xlabel(<span class="string">'Age'</span>);
  71. 0032 ylabel(<span class="string">'Residual'</span>);
  72. 0033 title(<span class="string">'Raw (response) Residuals'</span>);
  73. 0034 hold on;
  74. 0035 plot([min(age) max(age)],[0 0],<span class="string">':'</span>);
  75. 0036 hold off;
  76. 0037
  77. 0038 figure(<span class="string">'Name'</span>,<span class="string">'fig4_3d: Residual plots for local likelihood'</span>);
  78. 0039 plot(age,<a href="../../../chronux_2_10/locfit/m/residuals.html" class="code" title="function y = residuals(fit,type)">residuals</a>(fit,<span class="string">'ldot'</span>),<span class="string">'.-'</span>);
  79. 0040 xlabel(<span class="string">'Age'</span>);
  80. 0041 ylabel(<span class="string">'Residual'</span>);
  81. 0042 title(<span class="string">'ldot Residuals'</span>);
  82. 0043 hold on;
  83. 0044 plot([min(age) max(age)],[0 0],<span class="string">':'</span>);
  84. 0045 hold off;
  85. 0046</pre></div>
  86. <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>
  87. </body>
  88. </html>