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 used

Below is the code that I am using 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.4200360
CDULIKE     0.6070514  0.7832340  1.0000000 -0.4868895 -0.5042006
MERKELPROX -0.4064925 -0.4405571 -0.4868895  1.0000000  0.8789219
CDUPROX    -0.4146810 -0.4200360 -0.5042006  0.8789219  1.0000000
> viewData(hetcor)
> cdu= ' CDULIKE ~ cdupid + CDUPROX
+   MERKELLIKE ~ cdupid + MERKELPROX
+   CDUPROX ~ ~ cdupid
+   cdupid ~ ~ MERKELPROX
+   CDUPROX ~ ~ MERKELPROX
+   MERKELLIKE ~ 1
+   CDULIKE ~1 '
> sem.cdu= sem(cdu, hetcor, N=1861, meanstructure=F,fixed.x=F)
Warning message:
In if (orthogonal) { :
  the condition has length > 1 and only the first element will be used
> sem.cdu= sem(cdu, hetcor,  meanstructure=F,fixed.x=F)
Warning message:
In if (orthogonal) { :
  the condition has length > 1 and only the first element will be used
> summary(sem.cdu)

-- 
Laura Schwirz

PhD Candidate and IRCHSS Scholar
Department of Political Science
Trinity College Dublin
Dublin 2
Republic of Ireland
Email: schwi...@tcd.ie

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to