Calculate lagged HoNOS scores

lag_honos(
  data,
  id_var,
  date_var,
  value_vars_current,
  prob_var_item8,
  spec_var_item8,
  value_vars_history,
  add_change_label = TRUE,
  change_label = c("high_low", "deterio_improve"),
  honos_version = c("working_adults")
)

Arguments

data

Dataframe in wide format (i.e., one row for each HoNOS assessment and one column for each HoNOS item)

id_var

Name of variable that uniquely identifies each individual

date_var

Name of date (or datetime) variable

value_vars_current

Vector, specifying variable names with values for 'current' items

prob_var_item8

Vector, specifying variable name with description of problem (prob) for item 8

spec_var_item8

Vector, specifying variable name with problem specification (spec) of for item 8

value_vars_history

Vector, specifying specifying variable names with values for 'historic' items

add_change_label

Logical, specifying whether to add a variable that describes the change using the function calc_change_label

change_label

String, specifying whether to describe the change using "high_low" (e.g., HL stands for high to low) or "deterio_improve" (Deterioration, Unchanged, Improved)

honos_version

Vector, specifying version of the HoNOS that is being used. TODO IMPLEMENT MORE VERSIONS.

Value

Dataframe with original data and lagged values

Examples

lag_honos(data = honos_wide, id_var = id, date_var = date, change_label = "deterio_improve")
#> Error in rename_honos(data = data, value_vars_current = value_vars_current, prob_var_item8 = prob_var_item8, spec_var_item8 = spec_var_item8, value_vars_history = value_vars_history, honos_version = honos_version): argument "value_vars_current" is missing, with no default