Re: [R] Estimate and plot hazard function using "muhaz" package

From: Ken Beath <kjbeath_at_kjbeath.com.au>
Date: Tue 23 Jan 2007 - 23:44:21 GMT

On 24/01/2007, at 10:34 AM, Deming Mi wrote:

> Dear R users,
> I am trying to use "muhaz" and "plot.muhaz" functions in "muhaz"
> package to
> estimate and plot hazard funciton. However function "muhaz" always
> gives
> error message "Error in Surv(times, delta) : object "times" not
> found". I
> could not even run their sample codes in the user's manual as follows:
>
> data(ovarian)
> attach(ovarian)
> fit1 <- muhaz(futime, fustat)
>
> it gave the same error message. By the way, the "survival" package is
> installed and functions well on my computer.
>
> Does anyone have the same problem? Thanks!
>
> Deming
>

Works perfectly

 > data(ovarian)
 > attach(ovarian)
 > fit1 <- muhaz(futime, fustat)
 >
 > fit1

$pin
$pin$times
[1] 59 115 156 268 329 353 365 377 421 431 448 464 475 477 563 638 744 769 770 803 855 1040 1106 1129 1206 1227

$pin$delta
[1] 1 1 1 1 1 1 1 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0

$pin$nobs
[1] 26

etc

Ken



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Jan 24 10:50:07 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 24 Jan 2007 - 00:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.