How are you calculating the correlations? That may be part of the
problem, when you categorize a continuous variable you get a factor
whose internal representation is a set of integers. If you try to get
a correlation with that variable it will not be the polychoric
correlation.
Also do you need
On Sun, Apr 01, 2012 at 06:00:43PM -0700, Burak Aydin wrote:
> Hello Greg,
> Sorry for the confusion.
> Lets say, I have a population. I have 6 variables. They are correlated to
> each other. I can get you pearson correlation, tetrachoric or polychoric
> correlation coefficients.
> 2 of them conti
Hello Greg,
Sorry for the confusion.
Lets say, I have a population. I have 6 variables. They are correlated to
each other. I can get you pearson correlation, tetrachoric or polychoric
correlation coefficients.
2 of them continuous, 2 binary, 2 categorical.
Lets assume following conditions;
Co1 and
Hello David Duffy-2,
I see that you just proved using rmvnorm and then dichotomize/categorize
them should work. Thanks but please take a look at this link;
http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/CatContinuous
and this article;
Analysis by Categorizing or Dichotomizing Continuous Vari
Your explanation below has me more confused than before. Now it is
possible that it is just me, but it seems that if others understood it
then someone else would have given a better answer by now. Are you
restricting your categorical and binary variables to be binned
versions of underlying normal
Burak Aydin asked:
Lets say I know Pearson covariance matrix.
When I use rmvnorm to simulate 9 variables and then
dichotomize/categorize
them, I cant retrieve the population covariance matrix.
library(polycor)
sim1 <- function(thresh=0.5, r=0.3) {
x <- rmvnorm(1000,c(0,0),matrix(c(1,r,r,1)
Hello Greg,
Thanks for your time,
Lets say I know Pearson covariance matrix.
When I use rmvnorm to simulate 9 variables and then dichotomize/categorize
them, I cant retrieve the population covariance matrix.
--
View this message in context:
http://r.789695.n4.nabble.com/simulate-correlated-binar
Partly this depends on what you mean by a covariance between
categorical variables (and binary) and what is a covariance between a
categorical and a continuous variable?
On Thu, Mar 29, 2012 at 12:31 PM, Burak Aydin wrote:
> Hi,
> I d like to simulate 9 variables; 3 binary, 3 categorical and 3 co
Hi,
I d like to simulate 9 variables; 3 binary, 3 categorical and 3 continuous
with a known covariance matrix.
Using mvtnorm and later dichotimize/categorize variables is not efficient.
Do you know any package or how to simulate mixed data?
--
View this message in context:
http://r.789695.n4.nabb
9 matches
Mail list logo