fig7_4.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 fig7_4</title>
  6. <meta name="keywords" content="fig7_4">
  7. <meta name="description" content="Local Regression and Likelihood, Figure 7.4.">
  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>fig7_4
  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 7.4.</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 7.4.
  27. Censored Local Likelihood
  28. Author: Catherine Loader
  29. NEED: this is given problems for unknown reasons. something
  30. to do with censored observations and the ibeta routine.
  31. if i replace this by
  32. res[ZLIK] = th*y-y*log(p)
  33. res[ZDLL] = y*p
  34. res[ZDDLL] = y*p*(1-p)
  35. works fine. Memory leak somewhere??
  36. also works if i ignore censoring.</pre></div>
  37. <!-- crossreference -->
  38. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  39. This function calls:
  40. <ul style="list-style-image:url(../../../matlabicon.gif)">
  41. <li><a href="../../../chronux_2_10/locfit/m/lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a> Plot (for one or two dimensions) a locfit() fit.</li><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></ul>
  42. This function is called by:
  43. <ul style="list-style-image:url(../../../matlabicon.gif)">
  44. <li><a href="runbook.html" class="code" title="">runbook</a> </li></ul>
  45. <!-- crossreference -->
  46. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  47. <div class="fragment"><pre>0001 <span class="comment">% Local Regression and Likelihood, Figure 7.4.</span>
  48. 0002 <span class="comment">%</span>
  49. 0003 <span class="comment">% Censored Local Likelihood</span>
  50. 0004 <span class="comment">%</span>
  51. 0005 <span class="comment">% Author: Catherine Loader</span>
  52. 0006 <span class="comment">%</span>
  53. 0007 <span class="comment">% NEED: this is given problems for unknown reasons. something</span>
  54. 0008 <span class="comment">% to do with censored observations and the ibeta routine.</span>
  55. 0009 <span class="comment">% if i replace this by</span>
  56. 0010 <span class="comment">% res[ZLIK] = th*y-y*log(p)</span>
  57. 0011 <span class="comment">% res[ZDLL] = y*p</span>
  58. 0012 <span class="comment">% res[ZDDLL] = y*p*(1-p)</span>
  59. 0013 <span class="comment">% works fine. Memory leak somewhere??</span>
  60. 0014 <span class="comment">% also works if i ignore censoring.</span>
  61. 0015
  62. 0016
  63. 0017 load border;
  64. 0018 fit = <a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(day,runs,<span class="string">'cens'</span>,no,<span class="string">'family'</span>,<span class="string">'geom'</span>,<span class="string">'alpha'</span>,0.7);
  65. 0019 figure(<span class="string">'Name'</span>,<span class="string">'fig7_4: censored local likelihood;'</span> );
  66. 0020 <a href="../../../chronux_2_10/locfit/m/lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a>(fit);
  67. 0021 xlabel(<span class="string">'Date'</span>);
  68. 0022 ylabel(<span class="string">'Runs'</span>);</pre></div>
  69. <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>
  70. </body>
  71. </html>