step2factors | R Documentation |
Performs a factor analysis to reduce the set of 24 measures into a smaller set of measures that captures the main features of the trajectories.
step2factors(
trajMeasures,
num.factors = NULL,
discard = NULL,
verbose = TRUE,
...
)
trajMeasures |
List generated by |
num.factors |
Numerical value specifying the number
of factors to choose. Defaults to |
discard |
Vector containing names or numerical positions of measures to discard during factor analysis. |
verbose |
Logical indicating if the function should
print information on screen. Defaults to |
... |
Arguments to be passed to |
If num.factor
is NULL
,the function will select the number of factors as the number of eigenvalues greater than 1.
The principal
function is used in order to choose the measure that will represent each factor. varimax
is used to rotate the data during
the execution of the\ codeprincipal function. Any other parameter can be passed through ...
in order to further control the principal
function.
If any measures that happen to be extremely correlated among themselves (corr. >= 0.95), one of them
will have to be removed. Such measures are flagged by step1measures
. These values can be removed with discard
or they will be automatically removed by the function.
trajFactors Object containing the measures chosen as factors, the eigenvalues of the correlation matrix of the 24 measures, the list generated by the
principal
function used for the factor analysis and the data stored in the trajMeasures
object.
Marie-Pierre Sylvestre, Dan Vatnik
marie-pierre.sylvestre@umontreal.ca
principal
step1measures
## Not run:
# Setup data
data = example.data$data
# Run step1measures and step2factors
s1 = step1measures(data, ID=TRUE)
s2 = step2factors(s1)
# Display factors
head(s2$factors)
# The next step would be to run "step3clusters"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.