Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umxSummary support for nested umxSupermodel #222

Open
lf-araujo opened this issue Sep 7, 2023 · 1 comment
Open

umxSummary support for nested umxSupermodel #222

lf-araujo opened this issue Sep 7, 2023 · 1 comment

Comments

@lf-araujo
Copy link
Contributor

lf-araujo commented Sep 7, 2023

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]
@lf-araujo
Copy link
Contributor Author

This may be related to #226 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant