search for: ndeath

Displaying 4 results from an estimated 4 matches for "ndeath".

Did you mean: death
2012 Aug 21
2
Entering a table
...ness of fit test (I only have the frequencies, I don't have the raw data). So for example, let's say I want to re-create the HorseKicks table: library(vcd) data(HorseKicks) str(HorseKicks) 'table' int [1:5(1d)] 109 65 22 3 1 - attr(*, "dimnames")=List of 1 ..$ nDeaths: chr [1:5] "0" "1" "2" "3" ... I tried this the following but it didn't work: vex <- matrix(c(0,109,1,65,2,22,3,3,4,1), nrow=2, ncol=5) vec <- as.table(vex) str(vec) table [1:2, 1:5] 0 109 1 65 2 22 3 3 4 1 - attr(*, "dimnames")=Li...
2010 Nov 10
1
Difficult doubt about choose distances randomly in a matrix with a probability of event
I would like to build a model in R to simulate the seed dispersal by one plant. The plant produced 5 seeds and the probability of falling inside the eight closest space was 0.8 and in the next space 0.2 and in the rest space 0: 0 0 0 0 0 0 0.2 0.2 0.2 0.2 0.2 0 0.2 0.8 0.8 0.8 0.2 0 0.2 0.8 1 0.8 0.2 0 0.2 0.8 0.8 0.8 0.2 0 0.2 0.2 0.2 0.2 0.2 0 0 0 0 0 0 0
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
SEE ALSO ORIGINAL POSTING IN PR#2933 On May 6, 2003 03:58 pm, Thomas Lumley wrote: > > Looking at a wider context in the code > > pfun <- function(coef, theta, ndeath) { > if (theta == 0) > list(recenter = 0, penalty = 0, flag = TRUE) > else { > recenter <- log(mean(exp(coef))) > coef <- coef - recenter > nu <- 1/theta > list(recenter = recenter, first = (ex...
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
...EM solution as penalty (1) -- at least > in the case of a Cox proportional hazard model (Therneau and Grambsch, > 2000. Modeling Survival Data, Extending the Cox Model. Springer, New York. > Page 254, Eq. (9.8).). Looking at a wider context in the code pfun <- function(coef, theta, ndeath) { if (theta == 0) list(recenter = 0, penalty = 0, flag = TRUE) else { recenter <- log(mean(exp(coef))) coef <- coef - recenter nu <- 1/theta list(recenter = recenter, first = (exp(coef) - 1) * nu,...