transform.for.growth.analysis: Transform data set for analysis in growth regressions

Description Usage Arguments

Description

Generate growth rates, absolute gains, average values, first and last values in time windows of size ahead+1

Usage

1
2
3
4
5
## S3 method for class 'for.growth.analysis'
transform(dat, ahead = 1,
  trans.vars = names(which(sapply(dat, is.numeric))),
  fixed.vars = setdiff(colnames(dat), trans.vars),
  slide = ifelse(overlapping, 1, ahead), overlapping = TRUE)

Arguments

dat

a data frame increasingly sorted in time with no gaps

ahead

for how many periods ahead shall growth rates etc be computed

trans.vars

variables that shall be transformed . By default all numeric variables in dat

fixed.vars

variables whose first value in each time window that shall be added to the results without any transformation.

overlapping

(default=TRUE) shall time windows be overlapping or not

slide

the distance of window starts is by default 1 if overlapping == TRUE and ahead if overlapping==FALSE


skranz/sktools documentation built on April 12, 2021, 11:43 a.m.