prepareDataForFactorAnalysis: 'prepareDataForFactorAnalysis'

View source: R/principalcomponentsanalysis.R

prepareDataForFactorAnalysisR Documentation

prepareDataForFactorAnalysis

Description

Filter data, remove cases with missing values, and impute where requested.

Usage

prepareDataForFactorAnalysis(data, weights, subset, missing)

Arguments

data

A data frame with numeric columns which contains the data to be analyzed.

weights

A numeric vector containing the weight for each case in data.

subset

A logical vector which describes the subset of data to be analyzed.

missing

A string specifiying what to do when the data contains missing values. The valid options are "Error if missing data", "Exclude cases with missing data", "Use partial data (pairwise correlations)", and "Imputation (replace missing values with estimates)".

Value

A list containing subset.data, which is a data frame which has had subset applied and missing values removed or imputed as specified by the parameter missing, and prepared.weights which is a nuneric vector containing the weight values that correspond to the remaining cases (or NULL when the input weight is NULL).


NumbersInternational/flipDimensionReduction documentation built on Aug. 20, 2024, 2:32 a.m.