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:
set.seed(781)
q1 <- cut2(x = rlnorm(n = 1e2, m = 2), cuts = seq(1,6))
q2 <- cut2(x = rlnorm(n = 1e2, m = 0), cuts = seq(1,6))
q3 <- cut2(x = rlnorm(n = 1e2, m = 1), cuts = seq(1,6))
dat <- data.frame(q1,q2,q3)
hetcor(data = dat, ML = T, pd = T, use = 'p')

Any help in understanding and correcting the error would be appreciated.

unlist(R.Version())
                      platform                           arch 
             "i386-pc-mingw32"                         "i386" 
                            os                         system 
                     "mingw32"                "i386, mingw32" 
                        status                          major 
                            ""                            "2" 
                         minor                           year 
                         "9.0"                         "2009" 
                         month                            day 
                          "04"                           "17" 
                       svn rev                       language 
                       "48333"                            "R" 
                version.string 
"R version 2.9.0 (2009-04-17)"

Respectfully,

Frank Lawrence

______________________________________________
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