subsampleLandmarks: subsampleLandmarks

Description Usage Arguments

View source: R/subsampleEMMLi.R


This function randomly removes landmarks from a dataset, and adjusts the corresponding models object to match the newly subsampled landmark data. Internal, called by subsampleEMMLi.


subsampleLandmarks(landmarks, fraction, models, min_landmark)



A 3D array of xyz landmarks to subsample from. Will be turned into a correlation matrix using dotcorr for EMMLi analysis after subsampling.


The decimal fraction to subsample down to. e.g. 0.2 will return 20 original landmarks.


A data frame defining the models. The first column should contain the landmark names as factor or character. Subsequent columns should define which landmarks are contained within each module with integers, factors or characters. If a landmark should be ignored for a specific model (i.e., it is unintegrated in any module), the element should be NA.


The minimum number of landmarks to subsample to. This ensures that a module isn't totally removed during random subsampling. When subsampling causes a landmark to be removed or to be subsampled below this threshold landmarks are drawn from the original module at random and added back in. This means that sometimes (especially with low subsampling fractions and/or the presence of small modules in a model) the actual subsampling level is higher than the requested subsampling. In these cases a warning is printed to the screen.

hferg/EMMLiv2 documentation built on Nov. 30, 2017, 4:35 p.m.