Skip to content

umxSummary support for nested umxSupermodel #222

@lf-araujo

Description

@lf-araujo

I noticed this a while ago, umxSummary often fails with:

#Error in names(parameterTable) <- c("label", "name", "matrix", "row",  : 
#  'names' attribute [9] must be the same length as the vector [0]

With supermodels. Below full MWE:

     data(docData)

     mzData  = subset(docData, zygosity %in% c("MZFF", "MZMM")) |>
       dplyr::mutate(ethnicity = rep(LETTERS[1:5],140))

     dzData  = subset(docData, zygosity %in% c("DZFF", "DZMM")) |>
       dplyr::mutate(ethnicity = rep(LETTERS[1:5],140))

     # ============================
     # = 2. Make a MRDoC2 model   =
     # ============================

 outa <- umxMRDoC(name = "a", pheno = c("varA1", "varA2"), prss = c("varB1", "varA3") ,
                     mzData = mzData|>dplyr::filter(ethnicity=="A"),
       dzData = dzData|>dplyr::filter(ethnicity=="A")) |>
      umxModify( regex="*", newlabels ="a_\\1" ,  autoRun = F)

 outb <- umxMRDoC(name = "b", pheno = c("varA1", "varA2"), prss = c("varB1", "varA3") ,
                     mzData = mzData|>dplyr::filter(ethnicity=="B"),
       dzData = dzData|>dplyr::filter(ethnicity=="B")) |>
      umxModify( regex="*", newlabels ="b_\\1" ,  autoRun = F)


multi <- umxSuperModel("multigroup", outa, outb)

umxSummary(multi)
#Error in names(parameterTable) <- c("label", "name", "matrix", "row",  : 
#  'names' attribute [9] must be the same length as the vector [0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions