Skip to contents

Derive care provided variable

Usage

derive_cag_fpas(df)

Arguments

df

A data frame containing cleaned data for a survey cycle. Must contain the following columns, each indicating whether the respondent provided care along a particular dimension:

  • CAG_HLT_PR: Personal care

  • CAG_HLT_MD: Medical care

  • CAG_HLT_MG: Care management

  • CAG_HLT_AC: Home maintenance and outdoor work

  • CAG_HLT_TR: Transportation

  • CAG_HLT_ML: Meal preparation

  • CAG_HLT_NONE: No help provided

  • CAG_HLT_OT: Other help

  • CAG_HLT_DK_NA: Don't know

  • CAG_HLT_REFUSED: Refused

  • CAG_HLT_MB: Mobility assistance

  • CAG_HLT_CS: Social and emotional support

  • CAG_HLT_MO: Monetary assistance or financial management

Value

A data frame with the same number of rows as df plus a new column CAG_FPAS indicating whether the respondent provided care.

Details

Intended for use with Follow-up 2 data, for which this variable was not derived by the data provider. Five variables that appear in the original algorithm (CAG_HLT_MISSING, CAG_HLT_FM, CAG_HLT_MC, CAG_HLT_TA, and CAG_HLT_HC) are excluded from the function because they are unavailable at Follow-up 2.

Examples

df <- data.frame(
  CAG_HLT_PR = 1,
  CAG_HLT_MD = 1,
  CAG_HLT_MG = 0,
  CAG_HLT_AC = 0,
  CAG_HLT_TR = 0,
  CAG_HLT_ML = 0,
  CAG_HLT_NONE = 0,
  CAG_HLT_OT = 0,
  CAG_HLT_DK_NA = 0,
  CAG_HLT_REFUSED = 0,
  CAG_HLT_MB = 0,
  CAG_HLT_CS = 0,
  CAG_HLT_MO = 0
)
derive_cag_fpas(df)
#>   CAG_HLT_PR CAG_HLT_MD CAG_HLT_MG CAG_HLT_AC CAG_HLT_TR CAG_HLT_ML
#> 1          1          1          0          0          0          0
#>   CAG_HLT_NONE CAG_HLT_OT CAG_HLT_DK_NA CAG_HLT_REFUSED CAG_HLT_MB CAG_HLT_CS
#> 1            0          0             0               0          0          0
#>   CAG_HLT_MO CAG_FPAS
#> 1          0        1