Hi everyone,

I am working with a panel dataset from a project that is about giving health and nutrition based information to households. During endline, we were not able to follow-up with all the households and this attiriton is differential. I know Lee and Horowitz-Manski bounds are one way to deal with this but here i am specifically interested in using IPW. How do i use IPW in my DID regression based on predicators which explain attrition (treatment status, male)?

I use the following command to estimate my did impact:

reg q45 round treated did if att==0, r // the att==0 is what gives me a balanced panel by excluding hhs only found at baseline.


Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input str41 key byte round float treated byte(male age) float age2    byte(hhsize    q45)    float(att    did)
"uuid:0006cab2-ef5d-4dd1-a28b-ead8ee7d7748" 0 0 0 28  784  6 1 1 0
"uuid:001be491-db68-4f5a-8069-4be05cad5495" 0 0 1 26  676  4 0 1 0
"uuid:0023c936-6c6a-48e3-af4a-9257ecfea068" 0 1 1 69 4761  6 1 0 0
"uuid:0023c936-6c6a-48e3-af4a-9257ecfea068" 1 1 1 73 5329  7 1 0 1
"uuid:003a60cc-1fee-4a1e-9d3d-747a0db19cb0" 0 1 1 60 3600  9 1 0 0
"uuid:003a60cc-1fee-4a1e-9d3d-747a0db19cb0" 1 1 1 65 4225  7 1 0 1
"uuid:005d9846-76bf-41e6-b48b-61849fe458b0" 0 1 1 35 1225  7 1 0 0
"uuid:005d9846-76bf-41e6-b48b-61849fe458b0" 1 1 1 51 2601  9 1 0 1
"uuid:006867a1-0962-4cbd-852b-1ce8cbf81275" 0 0 1 40 1600  9 1 0 0
"uuid:006867a1-0962-4cbd-852b-1ce8cbf81275" 1 0 1 47 2209  9 1 0 0
"uuid:00879996-134a-4134-9a86-b270f0aca35f" 0 0 1 21  441  3 1 1 0
"uuid:008f24b5-fda4-492e-b760-cae7b51d6f85" 0 1 1 45 2025  5 1 1 0
"uuid:008f9b90-2bef-4772-bcf2-56c98c2bbe9c" 0 0 1 32 1024  7 1 0 0
"uuid:008f9b90-2bef-4772-bcf2-56c98c2bbe9c" 1 0 1 37 1369  7 1 0 0
"uuid:00a8a941-6b7a-4f83-89fe-18629789e083" 0 1 1 48 2304  7 0 0 0
"uuid:00a8a941-6b7a-4f83-89fe-18629789e083" 1 1 1 57 3249 12 0 0 1
"uuid:00e3c79b-5a88-4df3-a17b-f66e9a27ebfe" 0 1 1 40 1600 11 1 0 0
"uuid:00e3c79b-5a88-4df3-a17b-f66e9a27ebfe" 1 1 1 45 2025 11 1 0 1
"uuid:00fd5e1c-3c91-477f-abf4-4c2252e461c0" 0 1 1 47 2209  7 0 1 0
"uuid:00fec75e-07c6-422d-83b1-4683f16756ae" 0 0 1 23  529  4 1 1 0
"uuid:0111045a-5996-4e99-ba26-3d31b77962a4" 0 0 0 41 1681  4 1 0 0
"uuid:0111045a-5996-4e99-ba26-3d31b77962a4" 1 0 0 45 2025  4 1 0 0
"uuid:0113ad53-122c-4905-9fe9-4eb3f902b68c" 0 1 0 60 3600 11 1 1 0
"uuid:0118800b-84b9-4724-bfae-004040d882b7" 0 0 0 44 1936  5 0 0 0
"uuid:0118800b-84b9-4724-bfae-004040d882b7" 1 0 0 58 3364  4 1 0 0
"uuid:012917de-c728-483e-ab35-77d240e932f3" 0 1 1 42 1764  7 1 0 0
"uuid:012917de-c728-483e-ab35-77d240e932f3" 1 1 1 46 2116  7 1 0 1
"uuid:012c972e-97ff-4a52-a82f-27ebe894e175" 0 1 1 45 2025  7 1 0 0
"uuid:012c972e-97ff-4a52-a82f-27ebe894e175" 1 1 1 58 3364 14 1 0 1
"uuid:01317a87-1b50-4f36-b9f3-e1faa9f55361" 0 0 1 55 3025  6 1 0 0
"uuid:01317a87-1b50-4f36-b9f3-e1faa9f55361" 1 0 1 60 3600  6 1 0 0
"uuid:01337d35-de56-4927-9dae-22f5a05da776" 0 0 0 53 2809 11 1 1 0
"uuid:015aad6a-3116-46dd-b369-fd8e85021ec3" 0 1 1 53 2809  6 1 0 0
"uuid:015aad6a-3116-46dd-b369-fd8e85021ec3" 1 1 1 57 3249  7 1 0 1
"uuid:015e676a-ef1d-49b0-b50d-45daa2cdf5ea" 0 1 1 31  961  5 1 0 0
"uuid:015e676a-ef1d-49b0-b50d-45daa2cdf5ea" 1 1 1 36 1296  5 1 0 1
"uuid:01698b7d-b9fb-41db-969c-bafba85994b8" 0 1 1 22  484  3 1 0 0
"uuid:01698b7d-b9fb-41db-969c-bafba85994b8" 1 1 1 28  784  4 0 0 1
"uuid:016d7733-c8e9-4068-a7c2-bc29912f94e1" 0 1 1 30  900  7 1 0 0
"uuid:016d7733-c8e9-4068-a7c2-bc29912f94e1" 1 1 1 37 1369  6 1 0 1
"uuid:019d7036-bdf2-44f8-bd38-5f4505c39ce8" 0 1 1 42 1764  5 1 0 0
"uuid:019d7036-bdf2-44f8-bd38-5f4505c39ce8" 1 1 1 53 2809 12 1 0 1
"uuid:01a67cd9-e308-46ac-ab3e-476898ae6ebc" 0 1 1 42 1764  7 0 1 0
"uuid:01ab6faa-cefe-4274-86b3-bddaa49b7f9d" 0 0 1 32 1024  8 1 1 0
"uuid:01ac43f1-4ddb-4ced-8a73-634b1a2cc1e3" 0 1 1 57 3249  7 1 1 0
"uuid:01b5624d-f98a-4d8f-87f9-db1290070d0d" 0 1 1 38 1444  7 1 0 0
"uuid:01b5624d-f98a-4d8f-87f9-db1290070d0d" 1 1 1 40 1600  5 1 0 1
"uuid:01c056dd-8621-413d-aadc-cbbda2b66b19" 0 1 1 26  676  4 1 0 0
"uuid:01c056dd-8621-413d-aadc-cbbda2b66b19" 1 1 1 30  900  5 1 0 1
"uuid:01c81e19-fb5a-42c8-a05d-d9254d458f6c" 0 0 1 45 2025 10 1 0 0
"uuid:01c81e19-fb5a-42c8-a05d-d9254d458f6c" 1 0 1 50 2500  3 1 0 0
"uuid:01e27a70-68e3-43ce-9655-82237b727eb5" 0 0 0 50 2500  5 1 1 0
"uuid:01fc822d-d8c6-45a7-8bee-29dab3e0dabe" 0 1 1 18  324  3 0 1 0
"uuid:01fd27cf-fd9e-4d53-97f7-b1797911e0ff" 0 0 0 45 2025  6 1 1 0
"uuid:0202e6af-7ef7-4480-a73f-7787c50417be" 0 1 0 34 1156  8 1 0 0
"uuid:0202e6af-7ef7-4480-a73f-7787c50417be" 1 1 0 39 1521  5 1 0 1
"uuid:0208115b-4104-4047-8d20-8a9254c30420" 0 1 1 27  729  3 1 0 0
"uuid:0208115b-4104-4047-8d20-8a9254c30420" 1 1 1 32 1024  1 1 0 1
"uuid:021b780c-3913-4ea0-8684-1a57df91f3d0" 0 0 1 32 1024 13 1 0 0
"uuid:021b780c-3913-4ea0-8684-1a57df91f3d0" 1 0 0 70 4900  2 0 0 0
"uuid:02265508-dcdc-46cf-b9c0-6a140a7909c2" 0 1 1 70 4900  4 0 0 0
"uuid:02265508-dcdc-46cf-b9c0-6a140a7909c2" 1 1 1 75 5625  9 0 0 1
"uuid:022850ff-9443-41c3-80f8-38e1d9288e43" 0 1 1 35 1225  7 1 0 0
"uuid:022850ff-9443-41c3-80f8-38e1d9288e43" 1 1 .  .    .  . . 0 1
"uuid:02292b94-df76-43f4-b1f6-7c455e6ce760" 0 0 1 35 1225  4 1 0 0
"uuid:02292b94-df76-43f4-b1f6-7c455e6ce760" 1 0 1 36 1296  5 0 0 0
"uuid:02384774-5cbd-4531-b752-d7e53d39b1fd" 0 0 1 40 1600  6 0 1 0
"uuid:025d5e51-3f01-4e99-8a40-7531fb61dee1" 0 0 1 45 2025  7 1 0 0
"uuid:025d5e51-3f01-4e99-8a40-7531fb61dee1" 1 0 1 50 2500  5 1 0 0
"uuid:0263a1db-902c-40bc-825a-a788a09a546b" 0 1 1 34 1156  5 0 0 0
"uuid:0263a1db-902c-40bc-825a-a788a09a546b" 1 1 1 40 1600  5 1 0 1
"uuid:0266fdec-fce3-4f67-9721-aea73b3f35b0" 0 1 1 33 1089  9 1 1 0
"uuid:0274a08f-256e-4e49-87b2-b114fa1dcc6c" 0 1 1 45 2025  9 0 0 0
"uuid:0274a08f-256e-4e49-87b2-b114fa1dcc6c" 1 1 1 49 2401  6 1 0 1
"uuid:02795414-4676-44fe-a64e-d96dc09e3884" 0 0 1 36 1296 10 1 1 0
"uuid:0280d70f-a3c9-484d-8b64-dee0b35f10db" 0 0 1 45 2025 12 1 0 0
"uuid:0280d70f-a3c9-484d-8b64-dee0b35f10db" 1 0 1 52 2704  4 0 0 0
"uuid:02b53090-0125-4543-8a3a-9f0c3403f6fd" 0 1 1 40 1600  3 0 0 0
"uuid:02b53090-0125-4543-8a3a-9f0c3403f6fd" 1 1 1 42 1764  4 1 0 1
"uuid:02be715d-6045-4b68-8c1b-cc5f117f027e" 0 1 1 35 1225  7 1 0 0
"uuid:02be715d-6045-4b68-8c1b-cc5f117f027e" 1 1 1 38 1444  8 1 0 1
"uuid:02dae870-11b9-4c08-b523-edd59c220c90" 0 0 1 30  900  6 1 0 0
"uuid:02dae870-11b9-4c08-b523-edd59c220c90" 1 0 1 35 1225  7 1 0 0
"uuid:03028f0a-08be-421e-b144-b0ddc5177b9a" 0 1 1 53 2809  7 0 1 0
"uuid:030ddc11-49ad-4f38-98b6-69da26df632a" 0 0 1 40 1600  9 1 0 0
"uuid:030ddc11-49ad-4f38-98b6-69da26df632a" 1 0 1 42 1764  8 1 0 0
"uuid:030df043-79f0-41b0-8e28-a5967e937420" 0 0 1 27  729  3 1 0 0
"uuid:030df043-79f0-41b0-8e28-a5967e937420" 1 0 1 34 1156  4 1 0 0
"uuid:030fe9c9-a830-4465-bd10-a6e3e68d2069" 0 0 1 40 1600  6 1 0 0
"uuid:030fe9c9-a830-4465-bd10-a6e3e68d2069" 1 0 1 35 1225  7 0 0 0
"uuid:03198e25-34d3-42b1-8813-337c2a98d9d8" 0 1 1 63 3969  5 0 0 0
"uuid:03198e25-34d3-42b1-8813-337c2a98d9d8" 1 1 1 70 4900  5 1 0 1
"uuid:0326d701-93fd-44f0-83b6-7c5c3c0c13ac" 0 1 1 45 2025  6 1 0 0
"uuid:0326d701-93fd-44f0-83b6-7c5c3c0c13ac" 1 1 1 56 3136  8 1 0 1
"uuid:032763b0-c0ae-4af5-ab42-17fdececdcba" 0 0 1 50 2500  4 1 0 0
"uuid:032763b0-c0ae-4af5-ab42-17fdececdcba" 1 0 1 53 2809  5 1 0 0
"uuid:0332ac55-b2a0-47a7-89a2-24cb33d8ed8d" 0 0 1 28  784  5 1 0 0
"uuid:0332ac55-b2a0-47a7-89a2-24cb33d8ed8d" 1 0 1 35 1225  6 1 0 0
"uuid:03779d45-c667-4177-96c0-3f298fa2f121" 0 0 1 35 1225  6 1 1 0
"uuid:037949ec-1f76-4f9d-bb4e-98febe125fd8" 0 1 1 26  676  5 1 0 0
"uuid:037949ec-1f76-4f9d-bb4e-98febe125fd8" 1 1 1 32 1024  6 0 0 1
"uuid:03852846-6458-4729-9c11-bbbd18b794fd" 0 1 1 48 2304 10 1 0 0
"uuid:03852846-6458-4729-9c11-bbbd18b794fd" 1 1 1 53 2809 14 1 0 1
"uuid:03ab09c3-75ee-4adb-9a8c-bdd42b37a50d" 0 0 1 23  529  4 1 1 0
"uuid:03bfb774-f38e-420d-8672-c11c26f695d4" 0 1 0 31  961  5 1 0 0
"uuid:03bfb774-f38e-420d-8672-c11c26f695d4" 1 1 0 38 1444 10 1 0 1
"uuid:03c1b3c0-3813-4ce3-bdc3-17ac41f31dc0" 0 1 1 24  576  4 1 0 0
"uuid:03c1b3c0-3813-4ce3-bdc3-17ac41f31dc0" 1 1 1 29  841  5 0 0 1
"uuid:03e368a4-a8d6-41c1-bf2a-7bb5fa9a8ad7" 0 1 0 40 1600  6 1 1 0
"uuid:03f977ed-f26a-4536-9696-128c4ba0148a" 0 1 1 35 1225 10 1 1 0
"uuid:04290dc5-f1a6-433f-bbb8-3277aa97417a" 0 1 1 36 1296  6 0 0 0
"uuid:04290dc5-f1a6-433f-bbb8-3277aa97417a" 1 1 1 42 1764  5 1 0 1
"uuid:042fd2b7-22f1-422a-ab7c-89b31fe14f51" 0 1 1 47 2209  7 1 0 0
"uuid:042fd2b7-22f1-422a-ab7c-89b31fe14f51" 1 1 1 52 2704  4 1 0 1
"uuid:04342676-266c-4f24-acc5-82911746433b" 0 1 1 67 4489  7 0 0 0
"uuid:04342676-266c-4f24-acc5-82911746433b" 1 1 1 72 5184  7 1 0 1
"uuid:0441fc61-3ca8-480d-8a9f-fb8585fd5152" 0 1 0 77 5929  6 0 0 0
"uuid:0441fc61-3ca8-480d-8a9f-fb8585fd5152" 1 1 0 72 5184 12 0 0 1
"uuid:0446ead2-4406-48f5-8f35-9a344dffb424" 0 0 1 44 1936 12 1 0 0
"uuid:0446ead2-4406-48f5-8f35-9a344dffb424" 1 0 1 48 2304  7 0 0 0
"uuid:045b07ff-e6bc-403e-9622-3b526131d30d" 0 1 0 18  324  7 1 0 0
"uuid:045b07ff-e6bc-403e-9622-3b526131d30d" 1 1 0 90 8100  4 0 0 1
"uuid:045b6faa-98e2-4a39-91c9-de695a2c016a" 0 1 1 34 1156  4 0 0 0
"uuid:045b6faa-98e2-4a39-91c9-de695a2c016a" 1 1 1 36 1296  5 1 0 1
"uuid:04683087-6f01-41f9-a0a2-7c87ec7ee158" 0 0 1 27  729  4 1 0 0
"uuid:04683087-6f01-41f9-a0a2-7c87ec7ee158" 1 0 1 31  961  6 0 0 0
"uuid:0475a607-c449-4f9c-993a-34905b7a1e8a" 0 0 0 22  484  4 1 1 0
"uuid:0491bc47-9c20-4d0c-8af7-954f2dcefee9" 0 0 1 49 2401  9 1 0 0
"uuid:0491bc47-9c20-4d0c-8af7-954f2dcefee9" 1 0 1 51 2601  9 0 0 0
"uuid:049fa437-1a77-4751-8e37-a254e65d7e2a" 0 1 1 72 5184  7 0 0 0
"uuid:049fa437-1a77-4751-8e37-a254e65d7e2a" 1 1 1 76 5776  7 0 0 1
"uuid:04a70e1e-5af4-4dd8-be69-ece07fa96782" 0 1 1 67 4489  5 1 0 0
"uuid:04a70e1e-5af4-4dd8-be69-ece07fa96782" 1 1 1 70 4900  5 1 0 1
"uuid:04ae4d31-5402-40a6-9afb-6682e4a9414d" 0 0 1 26  676  5 0 1 0
"uuid:04b40caf-0bc9-40c3-a1fb-bb7b4e1902e5" 0 0 1 57 3249  8 1 0 0
"uuid:04b40caf-0bc9-40c3-a1fb-bb7b4e1902e5" 1 0 1 64 4096  5 1 0 0
"uuid:04b4d8f5-ce50-47a0-bf22-756220ef491c" 0 1 1 32 1024  5 1 0 0
"uuid:04b4d8f5-ce50-47a0-bf22-756220ef491c" 1 1 1 32 1024  5 1 0 1
"uuid:04d70dc2-1b89-4263-a7d5-c72529795427" 0 0 1 40 1600  6 1 1 0
"uuid:04e101ae-5d4e-4f79-b5d2-04f1047ee95e" 0 1 1 46 2116  8 0 1 0
"uuid:04e2ec0a-a7d7-40e1-be72-d0aef6588d7b" 0 0 1 48 2304  7 1 0 0
"uuid:04e2ec0a-a7d7-40e1-be72-d0aef6588d7b" 1 0 1 41 1681  7 1 0 0
"uuid:04f0a090-ef83-453b-9787-60a8ae65384f" 0 1 1 28  784  4 1 1 0
"uuid:05286863-a533-46ff-953d-5e3025427531" 0 0 1 38 1444  5 1 1 0
"uuid:052c8582-a777-4ade-908d-ce9a403de4bc" 0 1 1 44 1936  6 0 1 0
"uuid:05335619-5068-497d-a270-1252b408f6b4" 0 1 1 33 1089  9 1 0 0
"uuid:05335619-5068-497d-a270-1252b408f6b4" 1 1 1 41 1681  9 1 0 1
"uuid:0538fdd2-f271-4e0f-aaa8-6d606e933903" 0 1 1 60 3600  9 1 0 0
"uuid:0538fdd2-f271-4e0f-aaa8-6d606e933903" 1 1 1 65 4225  8 1 0 1
end
label values round round
label def round 0 "Baseline", modify
label def round 1 "Endline", modify
label values male section_1q11
label def section_1q11 0 "Female", modify
label def section_1q11 1 "Male", modify
label values q45 labels87
label def labels87 0 "No", modify
label def labels87 1 "Yes", modify