I have three columns indicating the name of a center, the center's state, and whether or not the state associated with the center. I am trying to see if a center is part of a chain that operates only in intervention states, never in intervention states, or in intervention and non-intervention states.
data df;
input $ center state intervention chain;
Center1 CA 1 chain1
Center2 AZ 0 chain1
Center3 PA 0 chain2
Center4 HI 0 chain2
Center5 CA 1 chain3
Center6 CA 1 chain3;
run;
What is the best way to do this? I have tried creating three separate tables for intervention, nonintervention, and both that list the chains by state of operation. I then created dummy variables in each that indicate whether they operate in intervention, nonintervention, or both states. I then merged them back into the original table but there was overlap between the intervention/both tables, as well as overlap between the nonintervention/both tables.