Chris, thank you for your elegant solution!
Just one minor question:
I wonder how to include within the loop of your solution the 10 models, that
is, writing
for (k in 1:10) so that you can get {Cox[[1]], ..., Cox[[10]]}. However, I'm
aware that some
change has to be done due to the fact that, w
This package implements a robust iterative proportional fitting algorithm,
which is useful in survey expansion, matrix balancing, population
synthesis, and other applications. For example, this package could can
weight a survey of households to match known population characteristics
like the number
The updated formula needs to have a different term rather than cos(k * v) every
time. Here is one way to explicitly change the formula.
library("survival")
set.seed(1)
v <- runif(nrow(pbc), min = 0, max = 2)
Cox0 <- coxph(Surv(pbc$time,pbc$status == 2) ~ v, data = pbc)
Cox <- vector("list", 10
Hi everyone,
Vito, perhaps my previous mail was not clear. It is true that I used a loop,
but the key point is that such a loop
cannot compute the desired result. For example, for k = 3 the following loop
Cox <- list()
Cox[[1]] <- coxph(Surv(time,status == 2) ~ v + cos(v), data = pbc)
for (k i
4 matches
Mail list logo