search for: hcor

Displaying 6 results from an estimated 6 matches for "hcor".

Did you mean: cor
2012 Nov 16
1
polycor package
...ing for my dataset. I also tried to copy and paste the code from the sem.pdf file using data from CNES but I still get an error message. Any help would be much appreciated. > germany2009 <- read.dta("StataforR.dta") > #attach(germany2009) > viewData(germany2009) > # > hcor <- function(data) hetcor(data, std.err=F, pd=T)$correlations > hetcor=hcor(germany2009) > hetcor cdupid MERKELLIKE CDULIKE MERKELPROX CDUPROX cdupid 1.0000000 0.5073577 0.6070514 -0.4064925 -0.4146810 MERKELLIKE 0.5073577 1.0000000 0.7832340 -0.4405571 -0.420...
2011 Mar 08
1
SEM error
...13: m3 -> y, gam23, NA 14: age -> y, gam24, NA 15: sex -> y, gam25, NA, 16: m1 <->m1, psi11, NA 17: m2 <-> m2, psi12, NA 18: m3 <-> m3, psi13, NA 19: m1 <-> m2, psi21, NA 20: m1 <->m3, psi22, NA 21: m2 <-> m3, psi23, NA 22: Y <-> Y, psi24, NA, hcor <-function(ly) hetcor(ly, std.err=FALSE)$correlations R.ly <-hcor(ly) sem.ly <- sem(model.ly, R.ly, N=174) Error in sem.default(ram=ram, S=S, N=N,??????????) The model has negative degree of freedom = -12 First, I do not know what the mistake is. Second, is this correctly modeling my dia...
2011 Feb 14
4
sem problem - did not converge
...1F3, NA F1 <-> F4, F1F4, NA F1 <-> F5, F1F5, NA F2 <-> F3, F2F3, NA F2 <-> F4, F2F4, NA F2 <-> F5, F2F5, NA F3 <-> F4, F3F4, NA F3 <-> F5, F3F5, NA F4 <-> F5, F4F5, NA ###i tryed several correlations, such as hetcor and polychor of polycor library hcor <- function(data) hetcor(data, std.err=FALSE)$correlations hetdados40=hcor(dados40) dados40.sem <- sem(model.dados40, dados40.cov, nrow(dados40)) Warning message: In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian...
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
2010 Jan 03
1
Questions regarding sem using hetcor() function from polycor and diagrams
...al rather than code territory. I have two rather unrelated questions about using the sem and polycor packages for a relatively simple confirmatory path analysis: (1) My data requires using the hetcor function from the polycor package, and I ran the sem() function using a matrix from this code: hcor<-function(data) hetcor(data,std.err=FALSE,use="pairwise.complete.obs")$correlations I believe this means I am using a correlation rather than a covariance matrix for the model fit statistics. I am then assuming (perhaps incorrectly) that the model fit and coefficient p values are r...
2007 Jun 27
1
SEM model fit
...<-> mvpct, theta15, 0.5 oipct <-> oipct, theta15, 0.5 alcpct <-> alcpct, theta15, 0.5 con -> prev, gam5, 0.8 prev -> enf, gam6, 0.4 sem.enf.rq <- sem(ram = mdl.rq, S = hcor(dx), N = nrow(dx), obs.v = names(dx), raw = F, fixed = names(dx)[4:6], par.size = 's', maxiter = 1e3, analytic = F, gradtol = 1e-10) ##set raw to False summary(obj = sem.enf.rq, dig = 3, conf = 0.9) Respectfully, Frank Lawrence