search for: makegrowth

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

Did you mean: makegrowths
2005 Aug 14
1
Panel data handling (lags, growth rates)
...pply the name of the time variable `timevar' # and you must tell the time periods Q (vector is ok) over which # the growth rates are computed. paneldata.growthrates <- function(X, unitvar, timevar, gvars, Q=1) { stopifnot(length(gvars)>=1) X <- X[order(X[,timevar]),] makegrowths <- function(x, q) { new <- rep(NA, length(x)) for (t in (1+q):length(x)) { new[t] <- 100*((x[t]/x[t-q])-1) } return(new) } innertask <- function(Y, gvars, Q) { E <- labels <- NULL for (v in gvars) { for (q in Q) { E <- cbind(E,...