subsampleLandmarks: subsampleLandmarks

Description Usage Arguments

View source: R/subsampleEMMLi.R

Description

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.

Usage

1
subsampleLandmarks(landmarks, fraction, models, min_landmark)

Arguments

landmarks

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

fraction

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

models

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.

min_landmark

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.