Skip to content

polychoric correlation method yields error #347

Open
@jschoeneberger

Description

@jschoeneberger

I have ordinal data and want to estimate a polychoric correlation matrix (and export to Excel). However, when I submit my data to the procedure with method="polychoric" i get:

dat <- c(1, 1, 1, 1, 0,
         1, 1, 1, 2, 1,
         1, 2, 1, 2, 0,
         1, 1, 0, 2, 0,
         2, 2, 2, 2, 1,
         1, 1, 2, 2, 1,
         1, 0, 0, 0, 1,
         1, 1, 0, 1, 1,
         1, 1, 1, 1, 0,
         1, 1, 1, 1, 1)
df <- data.frame(matrix(dat,ncol=5, byrow=T))
correlation::correlation(df, method = "polychoric")
#> Error: No random effects terms specified in formula. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions