EVOLUTION-MANAGER
Edit File: survregDtest.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Verify a survreg distribution</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for survregDtest {survival}"><tr><td>survregDtest {survival}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Verify a survreg distribution</h2> <h3>Description</h3> <p>This routine is called by <code>survreg</code> to verify that a distribution object is valid. </p> <h3>Usage</h3> <pre> survregDtest(dlist, verbose = F) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>dlist</code></td> <td> <p>the list describing a survival distribution</p> </td></tr> <tr valign="top"><td><code>verbose</code></td> <td> <p>return a simple TRUE/FALSE from the test for validity (the default), or a verbose description of any flaws.</p> </td></tr> </table> <h3>Details</h3> <p>If the <code>survreg</code> function rejects your user-supplied distribution as invalid, this routine will tell you why it did so. </p> <h3>Value</h3> <p>TRUE if the distribution object passes the tests, and either FALSE or a vector of character strings if not. </p> <h3>Author(s)</h3> <p>Terry Therneau</p> <h3>See Also</h3> <p><code><a href="survreg.distributions.html">survreg.distributions</a></code>, <code><a href="survreg.html">survreg</a></code></p> <h3>Examples</h3> <pre> # An invalid distribution (it should have "init =" on line 2) # surveg would give an error message mycauchy <- list(name='Cauchy', init<- function(x, weights, ...) c(median(x), mad(x)), density= function(x, parms) { temp <- 1/(1 + x^2) cbind(.5 + atan(temp)/pi, .5+ atan(-temp)/pi, temp/pi, -2 *x*temp, 2*temp^2*(4*x^2*temp -1)) }, quantile= function(p, parms) tan((p-.5)*pi), deviance= function(...) stop('deviance residuals not defined') ) survregDtest(mycauchy, TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>survival</em> version 2.44-1.1 <a href="00Index.html">Index</a>]</div> </body></html>