Step2Selection {traj}R Documentation

Select a Subset of the Measures Using Factor Analysis

Description

This function applies the following dimension reduction algorithm to the measures computed by Step1Measures:

  1. Drop the measures whose values are constant across the trajectories;

  2. Whenever two measures are highly correlated (absolute value of Pearson correlation > 0.98), keep the highest-ranking measure on the list (see Step1Measures) and drop the other;

  3. Use principal component analysis (PCA) on the measures to form factors summarizing the variability in the measures;

  4. Drop the factors whose variance is smaller than any one of the standardized measures;

  5. Perform a varimax rotation on the remaining factors;

  6. For each rotated factor, select the measure that has the highest correlation (aka factor loading) with it and that hasn't yet been selected;

  7. Drop the remaining measures.

Usage

Step2Selection(trajMeasures, num.select = NULL, discard = NULL, select = NULL)

## S3 method for class 'trajSelection'
print(x, ...)

## S3 method for class 'trajSelection'
summary(object, ...)

Arguments

trajMeasures

object of class trajMeasures as returned by Step1Measures.

num.select

an optional positive integer indicating the number of factors to keep in the second stage of the algorithm. Defaults to NULL so that all factors with variance greater than any one of the normalized measures are selected.

discard

an optional vector of positive integers corresponding to the measures to be dropped from the analysis. See Step1Measures for the list of measures. Defaults to NULL.

select

an optional vector of positive integers corresponding to the measures to forcefully select. Defaults to NULL. If a vector is supplied, the five-steps selection algorithm described above is bypassed and the corresponding measures are selected instead.

x

object of class trajSelection.

...

further arguments passed to or from other methods.

object

object of class trajSelection.

Details

Whenever two measures are highly correlated (Pearson correlation > 0.98), the highest-ranking measure on the list (see Step1Measures) is kept and the other is discarded and discards the others. PCA is applied on the remaining measures using the principal function from the psych package.

Value

An object of class trajSelection; a list containing the values of the selected measures, the output of the principal component analysis as well as a curated form of the arguments.

References

Leffondre K, Abrahamowicz M, Regeasse A, Hawker GA, Badley EM, McCusker J, Belzile E. Statistical measures were proposed for identifying longitudinal patterns of change in quantitative health indicators. J Clin Epidemiol. 2004 Oct;57(10):1049-62. doi: 10.1016/j.jclinepi.2004.02.012. PMID: 15528056.

See Also

principal Step1Measures

Examples

## Not run: 
data("trajdata")
trajdata.noGrp <- trajdata[, -which(colnames(trajdata) == "Group")] #remove the Group column

m = Step1Measures(trajdata.noGrp, measure = c(1:18), ID = TRUE)
s = Step2Selection(m)

print(s)

s2 = Step2Selection(m, select = c(13, 3, 12, 9))

## End(Not run)



[Package traj version 2.2.0 Index]