Displaying 20 results from an estimated 500 matches similar to: "Polychoric and tetrachoric correlation"
2008 Jun 28
2
String concatenation
Hi,
Is the following function built in somewhere?
concat = function(v) {
res = ""
for (i in 1:length(v))
res = paste(res,v[i],sep="")
res
}
e.g.
> concat(c("12","3","45"))
[1] "12345"
Cheers,
Andy
--
Andy Fugard, Postgraduate Research Student
Psychology (Room F3), The University of Edinburgh,
7 George
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
2007 Feb 25
1
Repeated measures logistic regression
Dear all,
I'm struggling to find the best (set of?) function(s) to do repeated
measures logistic regression on some data from a psychology experiment.
An artificial version of the data I've got is as follows. Firstly,
each participant filled in a questionnaire, the result of which is a
score.
> questionnaire
ID Score
1 1 6
2 2 5
3 3 6
4 4 2
...
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
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
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
2007 May 14
1
New mailing list: R for psychology research
Hello all,
There's a new mailing list for researchers in psychology who are
learning and using R. New users of R are especially welcome.
To join, venture to
http://www.jiscmail.ac.uk/archives/psych-r.html
and click
"Join or leave the list (or change settings)"
You can also peruse the archives from that page.
Best wishes,
Andy
--
Andy Fugard, Postgraduate Research
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,
2013 Jan 23
2
CFA with lavaan or with SEM
Hi
Sorry for the rather long message.
I am trying to use the cfa command in the lavaan package to run a CFA however I am unsure over a couple of issues.
I have @25 dichotomous variables, 300 observations and an EFA on a training dataset suggests a 3 factor model.
After defining the model I use the command
fit.dat <- cfa(model.1, data=my.dat, std.lv = T, estimator="WLSMV",
2012 Nov 16
1
polycor package
I am currently working with R's polycor package and I have encountered a
problem. I tried to follow the steps as outlined in the sem.pdf file where
a CFA model is run using polychoric correlations. Every time I run the
command sem(model, data, N=.), I get the following warning message:
Warning message:
In if (orthogonal) { :
the condition has length > 1 and only the first element will be
2006 Dec 01
3
error in hetcor function (polycor package)?
I have been using the hetcor function in the polycor package. When I
don't specify the use option everything runs smoothly. However, when I
specify use either as "pairwise.complete.obs" or "complete.obs" I get
this error
Error in optim(rho, f, control = control, hessian = TRUE, method =
"BFGS") :
non-finite value supplied by optim
Is this an error in
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
2007 Feb 25
3
Random Integers
Hi all,
Is there an R function to generate random integers? Thanks in advance.
Sincerely
Anup
---------------------------------
Now that's room service! Choose from over 150,000 hotels
[[alternative HTML version deleted]]
2005 Oct 10
1
SEM with dichotomous indicators
Hello,
I'd like to know if there is a way to fit a Structural equation model with
dichotomous indicators (ex: problem with a phone solved/ or not) having
effects on a ordinal variable.
How I do that using R?
Do you have an example with the code in R that you can send to me?
Thanks a lot!
Renata Estrella
UFRJ, Brasil, Rio de Janeiro
Renata Leite Estrella
Assistente de
2007 Aug 12
1
SEM for categorical data
Hi
I am looking for a structural equation modeling package in R which can be
used for categorical data. Is anyone aware of the existence of such a
package? Would appreciate any help on this.
Thank you
Upasna
--
---------------------------------------------------------------------
Upasna Sharma
Research Scholar
Shailesh J. Mehta School of Management,
Indian Institute of Technology, Bombay
2010 Jan 03
1
Questions regarding sem using hetcor() function from polycor and diagrams
Hello R Users,
While I have attempted to dig into the R help files and I have not
identified the answer to these questions, I apologize in advance if my
questions were answered in the past. I also recognize that one of my
questions unfortunately verges on statistical rather than code
territory. I have two rather unrelated questions about using the sem and
polycor packages for a relatively
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:
2009 Feb 02
1
Fit indexes in SEM with categorical data + ML estimation
Hello,
It has been found that SEM analysis using polychoric correlations + maximum
likelihood estimator produces incorrect test statistics and standard errors
(e.g., Flora, D. B., & Curran, P. J. (2004). An Empirical Evaluation of
Alternative Methods of Estimation for Con?rmatory Factor Analysis With
Ordinal Data. Psychological Methods, 9(4), 466-491).
Standard errors can be dealt with by
2007 Mar 06
2
Estimating parameters of 2 phase Coxian using optim
Hi,
My name is Laura. I'm a PhD student at Queen's University Belfast and have
just started learning R. I was wondering if somebody could help me to see
where I am going wrong in my code for estimating the parameters [mu1, mu2,
lambda1] of a 2-phase Coxian Distribution.
cox2.lik<-function(theta, y){
mu1<-theta[1]
mu2<-theta[2]
lambda1<-theta[3]
2008 Nov 03
1
Input correlation matrix directly to princomp, prcomp
Hello fellow Rers,
I have a no-doubt simple question which is turning into a headache so
would be grateful for any help.
I want to do a principal components analysis directly on a correlation
matrix object rather than inputting the raw data (and specifying cor =
TRUE or the like). The reason behind this is I need to use polychoric
correlation coefficients calculated with John Fox's