R/expand.nested.R

Defines functions expand.nested

Documented in expand.nested

# Automatically generated from the noweb directory
expand.nested <- function(x) {
    xname <- names(x)
    x[[1]] <- as.factor(x[[1]])[,drop=T]
    if (length(x) >1) {
        for (i in seq(2, length(x), by=1)) {
            x[[i]] <- strata(x[[i-1]], x[[i]], shortlabel=TRUE, sep='/')
            xname[i] <- paste(xname[i-1], xname[i], sep='/')
            }
       } 
    names(x) <- xname
    x
    }

Try the coxme package in your browser

Any scripts or data that you put into this service are public.

coxme documentation built on Oct. 4, 2022, 1:06 a.m.