FanPC_basic: Perform Basic FanPC Factor Analysis

View source: R/FanPC_basic.R

FanPC_basicR Documentation

Perform Basic FanPC Factor Analysis

Description

This function performs factor analysis using a principal-component (FanPC) approach. It estimates the factor loading matrix and uniquenesses from the correlation matrix of the input data. Unlike FanPC.CoFM, this function does not calculate error metrics against true parameters, making it suitable for simple estimation tasks.

Usage

FanPC_basic(data, m)

Arguments

data

A matrix or data frame of input data (n x p).

m

Integer. The number of principal components (factors) to extract.

Value

A list containing:

AF

Estimated factor loadings matrix (p x m).

DF

Estimated uniquenesses vector (p).

SigmahatF

The correlation matrix of the input data.

Examples

# Examples should be fast and reproducible for CRAN checks
set.seed(123)

# 1. Generate synthetic data using CoFM (toy example)
sim <- CoFM(n = 200, p = 6, m = 2, theta = 2.0, distribution_type = "Clayton")
obs_data <- sim$data

# 2. Apply FanPC method (extract 2 factors)
fit <- FanPC_basic(data = obs_data, m = 2)

# 3. Inspect estimates
head(fit$AF)  # Estimated loadings
fit$DF        # Estimated uniquenesses

CoFM documentation built on Nov. 18, 2026, 5:08 p.m.

Related to FanPC_basic in CoFM...