Solved – analyze or model a conditional correlation

correlationdata visualizationinteractionmultiple regressionregression

In my research I'm looking at the correlation between self-harm and aggression (both continuous). Now, I also have some variables (e.g. depressive symptoms; also continuous) which I do believe strengthen the relationship between aggression and self-harm. For instance, I believe that self-harm and aggression are more strongly related in people who have more depressive symptoms. How do I test for this?

I though about depressive symptoms being a moderator, but as far as I'm concerned moderators are only appropriate if you look at causal relationships (which I don't, because I look at correlation). Partial correlation also do not seem appropriate cause I want to predict, not control.

As a solution I thought about calculating the correlation coefficients (of aggression and self-harm) for each patient. Then do a multiple regression analysis with depressive symptoms etc. as predictors and the correlation coefficient as outcome variable. But would this be a valid method?

Best Answer

Can I analyze or model a conditional correlation?

This can be done using multivariate regression, which is a form of regression analysis where we have more than one response variable. (Not to be confused with multiple regression, where we have a single response variable but multiple explanatory variables.) A multivariate regression model gives you a predictive equation that predicts all response variables when the explanatory variables in the model are held constant. In this particular case, you could construct a regression model with self-harm and aggression as your two response variables, and depressive_symptoms as the explanatory variable. In R you would use code something like this:

#Construct linear regression for self-harm
#The object DATA is a data frame containing the variables
MODEL <- lm(cbind(self-harm, aggression) ~ depressive_symptoms, data = DATA);

#Extract estimated coefficients and variance matrix of estimates
coef(MODEL);
vcov(MODEL);

Under this model, you will get a fitted model that estimates the coefficients for both of the response variables. Some subsequent mathematics will allow you to determine the estimated correlation between the two response variables when the explanatory variable is held fixed.

Related Question