fig7_1.html 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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_1</title>
  6. <meta name="keywords" content="fig7_1">
  7. <meta name="description" content="Local Regression and Likelihood, Figure 7.1.">
  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_1
  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.1.</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.1.
  27. Estimating the hazard rate for censored survival (or
  28. failure time) data. Hazard rate estimation is specified
  29. by 'family','hazard'.
  30. The censoring indicator variable is passed as the 'cens'
  31. argument. This should be a vector of 0's and 1's, with 1
  32. indicating a censored observation, 0 uncensored.
  33. The 'xlim' argument specifies bounds on the domain of the
  34. x variable (survival times). Usually, survival times are
  35. non-negative (lower bound 0), but with theoretically no
  36. upper bound. The specification [0;10000] gives the lower
  37. bound of 0, and the upper bound is effectively infinite.
  38. Author: Catherine Loader
  39. NEEDS: m argument to lfplot.
  40. Also, lfplot symbols should distinguish between censored and
  41. uncensored data points.</pre></div>
  42. <!-- crossreference -->
  43. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  44. This function calls:
  45. <ul style="list-style-image:url(../../../matlabicon.gif)">
  46. <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>
  47. This function is called by:
  48. <ul style="list-style-image:url(../../../matlabicon.gif)">
  49. <li><a href="runbook.html" class="code" title="">runbook</a> </li></ul>
  50. <!-- crossreference -->
  51. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  52. <div class="fragment"><pre>0001 <span class="comment">% Local Regression and Likelihood, Figure 7.1.</span>
  53. 0002 <span class="comment">%</span>
  54. 0003 <span class="comment">% Estimating the hazard rate for censored survival (or</span>
  55. 0004 <span class="comment">% failure time) data. Hazard rate estimation is specified</span>
  56. 0005 <span class="comment">% by 'family','hazard'.</span>
  57. 0006 <span class="comment">%</span>
  58. 0007 <span class="comment">% The censoring indicator variable is passed as the 'cens'</span>
  59. 0008 <span class="comment">% argument. This should be a vector of 0's and 1's, with 1</span>
  60. 0009 <span class="comment">% indicating a censored observation, 0 uncensored.</span>
  61. 0010 <span class="comment">%</span>
  62. 0011 <span class="comment">% The 'xlim' argument specifies bounds on the domain of the</span>
  63. 0012 <span class="comment">% x variable (survival times). Usually, survival times are</span>
  64. 0013 <span class="comment">% non-negative (lower bound 0), but with theoretically no</span>
  65. 0014 <span class="comment">% upper bound. The specification [0;10000] gives the lower</span>
  66. 0015 <span class="comment">% bound of 0, and the upper bound is effectively infinite.</span>
  67. 0016 <span class="comment">%</span>
  68. 0017 <span class="comment">% Author: Catherine Loader</span>
  69. 0018 <span class="comment">%</span>
  70. 0019 <span class="comment">% NEEDS: m argument to lfplot.</span>
  71. 0020 <span class="comment">% Also, lfplot symbols should distinguish between censored and</span>
  72. 0021 <span class="comment">% uncensored data points.</span>
  73. 0022
  74. 0023 load heart;
  75. 0024 fit = <a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(surv,<span class="string">'cens'</span>,cens,<span class="string">'family'</span>,<span class="string">'hazard'</span>,<span class="string">'alpha'</span>,0.4,<span class="string">'xlim'</span>,[0;10000]);
  76. 0025 figure(<span class="string">'Name'</span>,<span class="string">'fig7_1: Hazard rate for censored data'</span> );
  77. 0026 <a href="../../../chronux_2_10/locfit/m/lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a>(fit);
  78. 0027 xlabel(<span class="string">'Survival Time'</span>);
  79. 0028 ylabel(<span class="string">'Hazard Rate'</span>);</pre></div>
  80. <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>
  81. </body>
  82. </html>