Displaying 1 result from an estimated 1 matches for "phqcut2t".
2006 Jun 28
1
Simulate dichotomous correlation matrix
...es anyone have a clever way to simulate a correlation matrix such that
each column contains dichotomous variables (0,1) and where each column
has different prevalence rates.
For instance, I would like to simulate the following correlation matrix:
> CORMAT[1:4,1:4]
PUREPT PTCUT2 PHQCUT2T ALCCUTT2
PUREPT 1.0000000 0.5141552 0.1913139 0.1917923
PTCUT2 0.5141552 1.0000000 0.2913552 0.2204097
PHQCUT2T 0.1913139 0.2913552 1.0000000 0.1803987
ALCCUTT2 0.1917923 0.2204097 0.1803987 1.0000000
Where the prevalence for each variable is:
> prevvals=c(0.26,0.10,0.09,0.10)
I can use...