Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to convert Fairness in Financial Contribution index (FFC) to code

    Greeting,

    I am trying to convert the following formula to STATA code, but I could not.
    Screen Shot 2022-08-10 at 19.16.16.png
    The FFC is based on the mean of the cubed absolute difference between the oopctp a given household and the oopctp norm. oopctp is Out-of-pocket health payments share of household capacity to pay (oopctp)

    My code is:

    Code:
    gen oopctp = OOP/ctp
    bysort year city state: egen oopctpW = mean(oopctp)
    label variable oopctp "OOP share of household capacity to pay"
    Code:
    gen aux = weight*(abs(oopctp - oopctpW)^3)
    Code:
    gen aux1 = (aux/weight)^(1/3)
    Code:
    gen FFC = 1 - aux1
    I would greatly appreciate any valuable advice in this regard.
    Last edited by Hadi Kahalzadeh; 10 Aug 2022, 17:24.
Working...
X