Skip to contents

This function calculates a protection composite score based on child separation categories and concern frequencies. It also adds indicators for protection needs and acute protection needs.

Usage

add_comp_prot(
  df,
  child_sep_cat = "prot_child_sep_cat",
  child_sep_cat_none = "none",
  child_sep_cat_very_severe = "at_least_one_very_severe",
  child_sep_cat_severe = "at_least_one_severe",
  child_sep_cat_non_severe = "at_least_one_non_severe",
  child_sep_cat_undefined = "undefined",
  concern_freq_cope = "prot_concern_freq_cope",
  concern_freq_displaced = "prot_concern_freq_displaced",
  concern_hh_freq_kidnapping = "prot_concern_hh_freq_kidnapping",
  concern_hh_freq_discrimination = "prot_concern_hh_freq_discrimination",
  concern_always = "always",
  concern_several_times = "several_times",
  concern_once_or_twice = "once_or_twice",
  concern_never = "never",
  concern_dnk = "dnk",
  concern_pnta = "pnta"
)

Arguments

df

A data frame containing the required variables.

child_sep_cat

Column name for child separation category.

child_sep_cat_none

Level for no child separation.

child_sep_cat_very_severe

Level for at least one very severe child separation.

child_sep_cat_severe

Level for at least one severe child separation.

child_sep_cat_non_severe

Level for at least one non-severe child separation.

child_sep_cat_undefined

Level for undefined child separation.

concern_freq_cope

Column name for concern frequency cope.

concern_freq_displaced

Column name for concern frequency displaced.

concern_hh_freq_kidnapping

Column name for concern household frequency kidnapping.

concern_hh_freq_discrimination

Column name for concern household frequency discrimination.

concern_always

Level for always concerned.

concern_several_times

Level for concerned several times.

concern_once_or_twice

Level for concerned once or twice.

concern_never

Level for never concerned.

concern_dnk

Level for don't know.

concern_pnta

Level for prefer not to answer.

Value

A data frame with added columns:

  • comp_prot_child_sep_cat: Score for child separation category

  • comp_prot_score_concern_freq_cope: Score for concern frequency cope

  • comp_prot_score_concern_freq_displaced: Score for concern frequency displaced

  • comp_prot_score_concern_hh_freq_kidnapping: Score for concern household frequency kidnapping

  • comp_prot_score_concern_hh_freq_discrimination: Score for concern household frequency discrimination

  • comp_prot_risk_always_d: Indicator for at least one 'Always' response in perceived risks

  • comp_prot_score_concern: Final concern score

  • comp_prot_score: Overall protection composite score

  • comp_prot_in_need: Indicator for protection need

  • comp_prot_in_acute_need: Indicator for acute protection need