Hi,

I am trying to test a mediation hypothesis using coefficients from logistic
regression analyses (x, m, and y are all dichotomous). I am running a test
of significance using MacKinnon and Dwyer's adaptation of Sobel's test
(i.e., correcting for different scales of coefficients in cases of a
dichotomous outcome).

In order to make this correction I need to compute the covariance between x
and m. I have searched various R packages and the R-help page archive and
cannot find a way to do this in R.

Does anyone know how to compute the covariance between two dichotomous
variables in R? It seems like there should be a very simple answer to this
question, but I cannot find it.

Thanks in advance!

Heather


-- 
Heather Hensman Kettrey
PhD Candidate
Department of Sociology
Vanderbilt University

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to