search for: vlag

Displaying 1 result from an estimated 1 matches for "vlag".

Did you mean: flag
2012 Jun 16
2
How to specify "newdata" in a Cox-Modell with a time dependent interaction term?
...variables are different. #----------------------------------------------------------------- fold <- function(data, time, event, cov, cov.names=paste('covariate', '.', 1:ncovs, sep=""), suffix='.time', cov.times=0:ncov, common.times=TRUE, lag=0){ vlag <- function(x, lag) c(rep(NA, lag), x[1:(length(x)-lag)]) xlag <- function(x, lag) apply(as.matrix(x), 2, vlag, lag=lag) all.cov <- unlist(cov) if (!is.list(cov)) cov <- list(cov) ncovs <- length(cov) nrow <- nrow(data) ncol <- ncol(data) ncov...