Hi Everyone!
I am using Stata SE 14.0. I would like to run a correlation between variables (e.g. alcoholuse and depression), but I have a twin sample, which means that my observations are non-independent (twins belonging together are identified by the variable familyID). I need the value for the Pearson's correlation and p-value, but I cannot use the cluster(familyID) together with the correlate command. I know that I can use regressions with cluster(familyID) (regress command), but here I don't get the value for the Pearson's correlation... any idea's how to work around that problem? Or is that simply not possible? Thanky ou very much for your help!
I am using Stata SE 14.0. I would like to run a correlation between variables (e.g. alcoholuse and depression), but I have a twin sample, which means that my observations are non-independent (twins belonging together are identified by the variable familyID). I need the value for the Pearson's correlation and p-value, but I cannot use the cluster(familyID) together with the correlate command. I know that I can use regressions with cluster(familyID) (regress command), but here I don't get the value for the Pearson's correlation... any idea's how to work around that problem? Or is that simply not possible? Thanky ou very much for your help!
Comment