Displaying 20 results from an estimated 3000 matches similar to: "Problems using hetcor (polycor)"
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
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
2008 Aug 13
2
mob(party) formula question
I try tu use mob() with my data.frame ('data.frame': 288 obs. of 81
variables; factors, numerics and ordered factors)
My response is a binary variable and I should use for modelling a logistic
regression (family=binomial).
I read in the "MOB" Vignette that I could use a formula like this if I would
like to have only partitioning variables apart from the response.
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
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
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
2011 Feb 14
4
sem problem - did not converge
Someone can help me? I tried several things and always don't converge
# Model
library(sem)
dados40.cov <- cov(dados40,method="spearman")
model.dados40 <- specify.model()
F1 -> Item11, lam11, NA
F1 -> Item31, lam31, NA
F1 -> Item36, lam36, NA
F1 -> Item54, lam54, NA
F1 -> Item63, lam63, NA
F1 -> Item65, lam55, NA
F1 -> Item67, lam67, NA
F1 ->
2007 Oct 29
1
biserial correlation with pkg polycor
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071029/b29e9bd5/attachment.pl
2012 Jan 24
0
PCA for assets based household income analysis (" hetcor" and "princomp")
I am doing Principal Component Analysis (PCA) on assets data for household income prediction. The problem is that the assets data are rank ordered (usually binary ... possess car/don't possess car), so the normal correlation is inappropriate for the calculation of the PCA. Instead one has to use the polychoric correlation coefficient. It uses the "random.polychor.pa" package.
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 =
2008 Jan 08
1
using lapply()
useR's,
I am trying to find a quick way to change some values in a list that are
subject to a condition to be NA. Consider the 3x1 matrix:
delta <- matrix(c(2.5,2.5,1), nrow = 1)
And consider the list named v that has 3 elements
> v
v[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[,13] [,14]
[1,] 4.25 3.25 2.25 1.25 0.25 0.75 1.75 2.75 3.75 4.25
2009 Mar 11
2
non-positive definite matrix remedies?
Hi all,
For computational reasons, I need to estimate an 18x18 polychoric
correlation matrix two variables at a time (rather than trying to
estimate them all simultaneously using ML). The resulting polychoric
correlation matrix I am getting is non-positive definite, which is
problematic because I'm using this matrix later on as if it were a
legitimately estimated correlation matrix (in order
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 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
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
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 :
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
2013 Jun 12
1
Question on Simple Repeated Loops
Dear R-User,
Appreciate any helps. It looks simple, but I don't have a clue.
Given that I have a dataframe of tree population with three variables:
sp=species ,
d0=initial_size
grow=growth increment from initial size per year
How can I calculate the future growth increment of each tree for the next 3 years.
The following Rscript was written,
#----------
a0 <-
2008 Oct 03
1
NA's in segmented
I am trying to fit a very simple broken stick model using the package
"segmented" but I have hit a roadblock.
> str(data)
'data.frame': 18 obs. of 2 variables:
$ Bin : num 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ...
$ LnFREQ: num 5.06 4.23 3.50 3.47 2.83 ...
I fit the lm easily:
> fit.lm<-lm(LnFREQ~Bin, data=id07)
But I keep getting an error
2010 Feb 25
1
Heterogeneous Correlation Matrix with Survey Weights
Hello,
I have a data set containing categorical and ordinal factors, as well as
sampling weights (i.e., survey weights reflecting unequal probabilities of
selection). I want to fit a structural equation model with sem(). I have
run sem() on weighted covariance matrices using advice from John Fox (see
<http://tolstoy.newcastle.edu.au/R/e5/help/08/12/8773.html> and