similar to: polychor error

Displaying 20 results from an estimated 2000 matches similar to: "polychor error"

2006 Aug 04
1
polychoric correlation error
Dear all, I get a strange error when I find polychoric correlations with the ML method, which I have been able to reproduce using randomly-generated data. What is wrong? I realize that the data that I generated randomly is a bit strange, but it is the only way that I duplicate the error message. > n<-100 > test.x<-rnorm(n, mean=0, sd=1) > test.c<-test.x + rnorm(n, mean=0,
2012 Dec 07
1
Polychor() - why does it take that long?
Hello. Using the polychor function > polychor(data[c(s1,s2)] ) for polychoric correlations of two ordinal variables in R takes a long time for N=7000 (20 minutes+) and significantly slows down my computer. Now, I have a pretty old computer, but it takes about 20 seconds for MPLUS to print out the complete polychoric correlation matrix for all 16 variables, while I am running the R function
2007 Dec 19
1
Correlation when one variable has zero variance (polychoric?)
Hi, I'm running this for a simulation study, so many combinations of parameter produce many predictions that I need to correlate with data. The problem ---------------- I'm using rating data with 3 to 5 categories (e.g., too low, correct, too high). The underlying continuous scales should be normal, so I chose the polychoric correlation. I'm using library(polychor) in its
2009 Jan 12
3
polychoric correlation: issue with coefficient sign
Hello, I am running polychoric correlations on a dataset composed of 12 ordinal and binary variables (N =384), using the polycor package. One of the association (between 2 dichotomous variables) is very high using the 2-step estimate (0.933 when polychoric run only between the two variables; but 0.801 when polychoric run on the 12 variables). The same correlation run with ML estimate returns a
2009 May 20
1
sem with categorical data
I am trying to run a confirmatory factor analysis using the SEM package. My data are ordinal. I have read http://socserv.mcmaster.ca/jfox/Misc/sem/SEM-paper.pdf. When I apply the hetcor function, I receive the following error: Error in checkmvArgs(lower = lower, upper = upper, mean = mean, corr = corr, : at least one element of 'lower' is larger than 'upper' Example:
2006 Oct 19
2
How to get multiple Correlation Coefficients
Hi I have used a polycor package for categorical correlation coefficients. I run the following script. But there were no results. Could you tell me how to correct the script? Thanks in advance, vars <- names(sdi) for (i in 1:length(vars)) { for (j in 1:length(vars)) { paste(vars[i]," and ", vars[j]) polychor(vars[i], vars[j]) # corr } } -- Kum-Hoe Hwang, Ph.D.Phone :
2012 Oct 01
1
Error messages when attempting to calculate polychoric correlation matrices
Dear R users, I am a psychology postgraduate student who is relatively new to using R. I am currently developing a psychometric scale and have run into a few problems when using R to calculate a polychoric correlation matrix for my dataset. I am trying to produce a polychoric correlation matrix for calculating ordinal reliability estimates (eg. Alpha, omega).The set consists of 439 observations
2010 Apr 02
2
tetrachoric correlations
Hi, Is there any R library/package that calculates tetrachoric correlations from given marginals and Pearson correlations among ordinal variables? Inputs to polychor function in polycor package are either contingency tables or ordinal data themselves. I am looking for something that takes marginal distributions and Pearson correlation as inputs. For example, Y1=(1,2,3) with P(Y1=1)=0.3,
2004 Nov 28
2
Tetrachoric and polychoric ceofficients (for sem) - any tips?
About two years ago there was a thread about this which suggested that at that time nobody had these coefficients ready to go. (a) has anyone in the meanwhile programmed them? (b) I think I can see how to do the tetrachoric one with mvtnorm on similar lines to an example on the help page so will try that if nobody else already has (c) looking at the polychoric one makes me realise yet again
2006 Jun 23
2
Tetrachoric correlation in R vs. stata
I hope someone here knows the answer to this since it will save me from delving deep into documentation. Based on 22 pairs of vectors, I have noticed that tetrachoric correlation coefficients in stata are almost uniformly higher than those in R, sometimes dramatically so (TCC=.61 in stata, .51 in R; .51 in stata, .39 in R). Stata's estimate is higher than R's in 20 out of 22
2006 Jun 28
1
Simulate dichotomous correlation matrix
Newsgroup members, Does 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
2009 Apr 19
1
help with this code
Hi, can anyone help me with the following code? Thanks! library(mvtnorm) f2 <- function(n, rho) { var <- matrix(c(1,rho,rho,1), nrow=2, ncol=2, byrow=T) beta <- seq(0, 1, length.out=n+1) alpha <- sort (sapply(1-beta, qnorm)) x <- array(0, dim=c(n, n)) for (s in 1:n) { for (t in 1:n){ if (s>=t) x[s,t] <- pmvnorm(lower=c(alpha[s],
2004 Dec 09
1
Re: Tetrachoric and polychoric correlations, Polycor package
A bit late, but you might like to look at http://www.qimr.edu.au/davidD/polyr.R Regarding the original posters queries: You can analyse polychoric correlations as if they were Pearson correlations using standard software (eg sem), and this usually doesn't do too badly, or go to AWLS (Browne) in LISREL etc, or ML analysis of the full multidimensional contingency table using programs such as
2011 Jan 27
1
Saving log file in R and display run time
Hi all, I have two basic questions, hope you should help me: 1. How do I save a log file in R with the results? For example, in Stata it can be done by using "log using c:\...\test.txt" 2. How do I display the execution time of one function like the one below: CalculaCorrelacao <- function(construto, n) { library(polycor) for (i in 2:n){ for (j in i:n+1){ x1
2008 Sep 01
1
Polychoric and tetrachoric correlation
Hi there, Am I correct to believe that tetrachoric correlation is a special case of polychoric correlation when there are only two levels to the ordered factor? Thus it should be okay to use hetcor from the polycor package to build a matrix of correlations for binary variables? If this is true, how can one estimate 95% confidence intervals for the correlations? My guess would be mat =
2012 Oct 02
0
Error messages when attempting to calculate polychoric correlation matrices using the psych package
Dear Professor Fox, Apologies for my oversight relating to the polychor command and thank you for your advice. I turned to the polychor command when trying to find an equivalent for the polychoric command found in the psych package (I am following a procedure outlined in Gadermann, Guhn & Zumbo, 2012 that uses this command rather than the polycor package) . The polychoric command is returning
2007 Jun 27
1
SEM model fit
I wonder if someone could explain why, when I perform confirmatory factor-analysis model using polychoric correlations why I do not get an estimated confidence interval for the RMSEA. My experience with these type models is that I would obtain a confidence interval estimate. I did not get any warning messages with the output. RESULTS: Model Chisquare = 1374 Df = 185 Pr(>Chisq) = 0
2008 May 07
0
p values for polychor
hello, i have been using cor.test() for calculating the correlation coefficient and p values for some data. however, since the data consist of two dichotomous sequences (actually just binary data), i understand that simply using the pearson correlation is not sufficient. however, having done a bit of research i found that the tetrachoric correlation is what i am after. found the polycor package
2007 Jul 13
2
nearest correlation to polychoric
Dear all, Has someone implemented in R (or any other language) Knol DL, ten Berge JMF. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 1989, 54, 53-61. or any other similar algorithm? Best regards Jens Oehlschl?gel Background: I want to factanal() matrices of polychoric correlations which have negative eigenvalue. I coded Highham 2002
2009 Aug 18
1
Strange package installation error
Hi. I'm trying to install a new package. I'm a relatively long-time (though not advanced) R user and have never seen this error before. For the first example, I tried a few different CRAN mirrors. In the second example, the file does exist; I downloaded it from the CRAN website for the package and pasted in the name exactly a few different times to make sure it was right. >