search for: cmod

Displaying 2 results from an estimated 2 matches for "cmod".

Did you mean: cmd
2010 Mar 09
1
Question on passing in parameter to Cox hazard
...x 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,Survival,Status)) cmod <- coxph(Surv(Survival, Status) ~ a+b+c, mat) --------------------------------- This works fine. However, I need to change the code so that the column headers ( a+b+c )are passed into the coxph function on the fly. What string/object do I need to generate so the function works? I am trying: # F...
2006 Oct 12
3
Bug in lowess
x <- c(0,7,8,14,15,120,242) y <- c(122,128,130,158,110,110,92) lowess(x,y) $x [1] 0 7 8 14 15 120 242 $y [1] 122.0000 128.0000 132.2857 158.0000 110.0000 -4930.0000 110.0000 R version 2.2.1, 2005-12-20, i486-pc-linux-gnu attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils"