Checking whether or not a variable has impact For a statistics assignment, I've been given a data set (regarding drug prevention) and a few questions. One of the questions is to check whether or not the choice of treatment, treatment A or treatment B, impacts the odds of staying drug-free. We're told to be cautious about possible confounds, like a having history of intravenous drugs use. 
Now, my problem is, I'm not really sure how to check if this has an impact or not, and even less sure how to keep the confounds in mind. 
The given variables in the dataset are: Age, beck depression score, history of IV drug use (never, in the past or recently), number of previous treatments, race, duration of treatment (long/short), which treatment (A/B), and whether or not they were still drug-free after 12 months.
 A: This is one of the major subjects of Pearl's work, and is why it is standard in the field of epidemiology.  His approach is to build a causal model with links indicating all considered causal relationships.
Then, to evaluate your question: whether treatment has an effect on staying drug free, one wants to basically find out whether evidence flows along the edge from the node for treatment to the node for staying drug free.  There are two ways to do this:  The front door method and the back door method.
This is a nice presentation in his book:
J. Pearl, Causality: Models, Reasoning, and Inference. Cambridge University Press, 2000.
A more general version is provided by
J. Tian and J. Pearl, “A General Identification Condition for Causal Effects,” in AAAI/IAAI, 2002, pp. 567–573.
A: Yes logistic regression or a loglinear model seem to be the approaches to take to this problem.  The binary outcome is whether or not the respondent stayed drug free.  All the variables that are potential confounders should be included in the model and you should also look at the interaction terms between the confounders and the treatments.  If the treatment effect remains significant when including all these other variables then it would be safe to conclude that there is a real treaatment effect.
