This function returns a subset of the columns in the given data frame that are considered most relevant for time series analysis.

select_relevant_columns(data, net_cfg, failsafe = FALSE,
  number_of_columns = 6, log_level = 0, force_include = NULL)

Arguments

data

a data frame of 17 columns (ontspanning, opgewektheid, hier_en_nu, concentratie, beweging, iets_betekenen, humor, buiten_zijn, eigenwaarde, levenslust, onrust, somberheid, lichamelijk_ongemak, tekortschieten, piekeren, eenzaamheid, uw_eigen_factor) and 90 rows

net_cfg

a net_cfg object providing metadata about the networks

failsafe

does not include any pairs by default and simply returns the up to 6 column names with lowest z_skewness that have an MSSD above the threshold. failsafe defaults to FALSE.

number_of_columns

the maximum number of columns to return

log_level

sets the minimum level of output that should be shown (a number between 0 and 3). A lower level means more verbosity.

force_include

a single column name that should always be included in the column selection (regardless of mssd, z_skewness, failsafe).

Value

This function returns the modified data frame consisting of at most 6 columns.

Examples

# NOT RUN {
GN_COLUMNS <- c('ontspanning', 'opgewektheid', 'hier_en_nu', 'concentratie',
                'beweging', 'iets_betekenen', 'humor', 'buiten_zijn',
                'eigenwaarde', 'levenslust', 'onrust', 'somberheid',
                'lichamelijk_ongemak', 'tekortschieten', 'piekeren', 'eenzaamheid',
                'uw_eigen_factor')
data<-load_file("../data/input/DataDndN_nonimputed_voorAndo.sav")
data<-data$raw_data[,GN_COLUMNS]
net_cfg <- new_net_cfg()
net_cfg$vars <- unique(names(data))
net_cfg$always_include <- 'uw_eigen_factor'
net_cfg$pairs <- c('opgewektheid','onrust',
                   'somberheid','ontspanning',
                   'somberheid','onrust')
net_cfg$positive_variables <- c('opgewektheid','ontspanning','hier_en_nu',
                                'concentratie', 'beweging','iets_betekenen',
                                'humor', 'buiten_zijn','eigenwaarde', 'levenslust')
net_cfg$negative_variables <- c('onrust','somberheid','lichamelijk_ongemak',
                                'tekortschieten','piekeren','eenzaamheid')
names(select_relevant_columns(data,net_cfg,FALSE,6))
# }