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

umxSummaryACE not handling second covariate #201

Closed
tbates opened this issue Jul 20, 2022 · 1 comment
Closed

umxSummaryACE not handling second covariate #201

tbates opened this issue Jul 20, 2022 · 1 comment
Assignees
Labels

Comments

@tbates
Copy link
Owner

tbates commented Jul 20, 2022

h/t Eren Kafadar for reporting!

require(umx)
data(twinData)
twinData= umx_scale_wide_twin_data(data=twinData, varsToScale= "ht", sep="")
twinData$cohort1 = twinData$cohort2 =twinData$part
mzData = twinData[twinData$zygosity %in% "MZFF",]
dzData = twinData[twinData$zygosity %in% "DZFF",]

m1 = umxACE(selDVs = 'ht', selCovs = c("age","cohort"), sep = "", dzData = dzData, mzData = mzData)

Table: Standardized parameter estimates from a 1-factor Cholesky ACE model. A: additive genetic; C: common environment; E: unique environment.

a1 c1 e1
ht 0.93 0.08 0.36

Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent

@tbates tbates added the bug label Jul 20, 2022
@tbates tbates self-assigned this Jul 20, 2022
tbates added a commit that referenced this issue Jul 20, 2022
@tbates
Copy link
Owner Author

tbates commented Jul 20, 2022

fixed

require(umx)
data(twinData)
twinData= umx_scale_wide_twin_data(data=twinData, varsToScale= "ht", sep="")
twinData$cohort1 = twinData$cohort2 =twinData$part
mzData = twinData[twinData$zygosity %in% "MZFF",]
dzData = twinData[twinData$zygosity %in% "DZFF",]
 
m1 = umxACE(selDVs = 'ht', selCovs = c("age","cohort"), sep = "", dzData = dzData, mzData = mzData)
1 row(s) dropped from 'data' due to missing definition variable(s)

Table: Standardized parameter estimates from a 1-factor Cholesky ACE model. A: additive genetic; C: common environment; E: unique environment.

a1 c1 e1
ht 0.933 . 0.36

Table: Means and (raw) betas from model$top$intercept and model$top$meansBetas

ht1 ht2
intercept -0.256 -0.256
age -0.006 -0.006
cohort -0.048 -0.048

@tbates tbates closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant