Re: [R] Question on passing in parameter to Cox hazard

2010-03-09 Thread David Winsemius
On Mar 9, 2010, at 4:19 PM, Tim Smith wrote: Hi, I wanted to do the cox model using a matrix. The following lines illustrate what I want to do: dat <- matrix(rnorm(30), ncol=3,dimnames = list(1:10,letters[1:3])) Survival <- rexp(10) Status <- ifelse(runif(10

[R] Question on passing in parameter to Cox hazard

2010-03-09 Thread Tim Smith
Hi, I wanted to do the cox model using a matrix. The following lines illustrate what I want to do: dat <- matrix(rnorm(30), ncol=3,dimnames = list(1:10,letters[1:3])) Survival <- rexp(10) Status <- ifelse(runif(10) < .7, 1, 0) mat <- as.data.frame(cbind(dat,Surviv