@@ -177,6 +177,8 @@ buildPedigreeModelCovariance <- function(
177177# ' \code{full_df_row} and the rows/columns of the relatedness matrices. Must be in the
178178# ' same order as the relatedness matrix rows.
179179# ' @param condenseMatrixSlots Logical. If TRUE, use the mxCondenseMatrixSlots wrapper to optimize memory usage for large matrices. Default is TRUE.
180+ # ' @param clean_ids Logical. If TRUE, clean the \code{obs_ids} using \code{\link{make_clean_personids}}. Default is FALSE.
181+ # ' @param symmetrize Logical. If TRUE, symmetrize the relatedness matrices before use. Default is FALSE.
180182# ' @return An OpenMx model for the specified family group.
181183# ' @export
182184
@@ -203,7 +205,7 @@ buildOneFamilyGroup <- function(
203205 # Determine family size from first available matrix. Shared by both branches below.
204206 if ( # not any of the matrices are provided
205207 is.null(Addmat ) && is.null(Dmgmat ) && is.null(Nucmat ) &&
206- is.null(Extmat ) && is.null(Mtdmat ) && is.null(Amimat )
208+ is.null(Extmat ) && is.null(Mtdmat ) && is.null(Amimat )
207209 ) {
208210 warning(" At least one relatedness matrix should be provided. Using the number of columns in 'full_df_row' as family size." )
209211 fsize <- ncol(full_df_row )
@@ -293,7 +295,7 @@ buildOneFamilyGroup <- function(
293295 OpenMx :: mxData(observed = full_df_row , type = " raw" , sort = FALSE ),
294296 .pedigreeMeanMatrix(fsize , obs_ids , " meanLI" ),
295297 OpenMx :: mxAlgebraFromString(algebra_str ,
296- name = " V" , dimnames = list (obs_ids , obs_ids )
298+ name = " V" , dimnames = list (obs_ids , obs_ids )
297299 ),
298300 OpenMx :: mxExpectationNormal(covariance = " V" , means = " M" ),
299301 OpenMx :: mxFitFunctionML()
@@ -322,17 +324,17 @@ buildOneFamilyGroup <- function(
322324# ' @return An OpenMx model containing all static family observations.
323325# ' @keywords internal
324326.buildGroupedStaticFamily <- function (
325- group_name ,
326- dat ,
327- obs_ids ,
328- Addmat = NULL ,
329- Nucmat = NULL ,
330- Extmat = NULL ,
331- Mtdmat = NULL ,
332- Amimat = NULL ,
333- Dmgmat = NULL ,
334- condenseMatrixSlots = TRUE ,
335- clean_ids = FALSE
327+ group_name ,
328+ dat ,
329+ obs_ids ,
330+ Addmat = NULL ,
331+ Nucmat = NULL ,
332+ Extmat = NULL ,
333+ Mtdmat = NULL ,
334+ Amimat = NULL ,
335+ Dmgmat = NULL ,
336+ condenseMatrixSlots = TRUE ,
337+ clean_ids = FALSE
336338) {
337339 .require_openmx(" .buildGroupedStaticFamily" )
338340
@@ -563,17 +565,17 @@ buildFamilyGroups <- function(
563565# ' @export
564566
565567buildFamilyGroups_list <- function (
566- dat_list ,
567- obs_ids_list ,
568- Addmat_list = NULL ,
569- Nucmat_list = NULL ,
570- Extmat_list = NULL ,
571- Mtdmat_list = NULL ,
572- Amimat_list = NULL ,
573- Dmgmat_list = NULL ,
574- prefix = " fam" ,
575- condenseMatrixSlots = TRUE ,
576- clean_ids = TRUE
568+ dat_list ,
569+ obs_ids_list ,
570+ Addmat_list = NULL ,
571+ Nucmat_list = NULL ,
572+ Extmat_list = NULL ,
573+ Mtdmat_list = NULL ,
574+ Amimat_list = NULL ,
575+ Dmgmat_list = NULL ,
576+ prefix = " fam" ,
577+ condenseMatrixSlots = TRUE ,
578+ clean_ids = TRUE
577579) {
578580 .require_openmx(" buildFamilyGroups_list" )
579581
@@ -675,7 +677,7 @@ buildPedigreeMx <- function(model_name, vars, group_models,
675677 Ver = isTRUE(flags $ Ver )
676678 )
677679
678- ci_obj <- if (ci & any(flags $ Vad , flags $ Vdd , flags $ Vcn , flags $ Vce , flags $ Vmt , flags $ Vam , flags $ Ver )) {
680+ ci_obj <- if (ci && any(flags $ Vad , flags $ Vdd , flags $ Vcn , flags $ Vce , flags $ Vmt , flags $ Vam , flags $ Ver )) {
679681 OpenMx :: mxCI(c(" vad" , " vdd" , " vcn" , " vce" , " vmt" , " vam" , " ver" )[c(flags $ Vad , flags $ Vdd , flags $ Vcn , flags $ Vce , flags $ Vmt , flags $ Vam , flags $ Ver )])
680682 } else {
681683 NULL
@@ -850,4 +852,3 @@ make_clean_personids <- function(ids) {
850852 .require_openmx(" make_clean_personids" )
851853 OpenMx :: mxMakeNames(as.character(ids ))
852854}
853-
0 commit comments