Hi all.
Enumerators were tasked to review property pictures in pairs and confirm whether the pictures were of the same property (status=1) or not (status=0). If they were not sure (or if the comparison wasn't done), the status would be missing. I'd like to do the following:
a) test whether the reviews make sense using the transitive property of equality. For example, for ID 1 below, if a.jpg=b.jpg and b.jpg!=c.jpg, it should be expected that a.jpg!=c.jpg. ID 3 would need to be further reviewed as g=h, g=i but h!=i.
b) fill in missing information when reviews were either not done, or the enumerator wasn't sure. For example, for ID2, d=e and d=f, so I'd like to replace status for e vs f from missing to 1.
The short dataset below is for illustration. There may more than three pictures per ID (the picture review process is ongoing, the current max number of properties is six, so 21 different pairs).
Thank you for your help
Enumerators were tasked to review property pictures in pairs and confirm whether the pictures were of the same property (status=1) or not (status=0). If they were not sure (or if the comparison wasn't done), the status would be missing. I'd like to do the following:
a) test whether the reviews make sense using the transitive property of equality. For example, for ID 1 below, if a.jpg=b.jpg and b.jpg!=c.jpg, it should be expected that a.jpg!=c.jpg. ID 3 would need to be further reviewed as g=h, g=i but h!=i.
b) fill in missing information when reviews were either not done, or the enumerator wasn't sure. For example, for ID2, d=e and d=f, so I'd like to replace status for e vs f from missing to 1.
The short dataset below is for illustration. There may more than three pictures per ID (the picture review process is ongoing, the current max number of properties is six, so 21 different pairs).
Code:
input id str5 photo1 str5 photo2 status 1 "a.jpg" "b.jpg" 1 1 "a.jpg" "c.jpg" 0 1 "b.jpg" "c.jpg" 0 2 "d.jpg" "e.jpg" 1 2 "d.jpg" "f.jpg" 1 2 "e.jpg" "f.jpg" . 3 "g.jpg" "h.jpg" 1 3 "g.jpg" "i.jpg" 1 3 "h.jpg" "i.jpg" 0 end
Comment