Learn R Programming

CFM (version 0.8.0)

PPC2.CFM: PPC2 for censored factor models (Top-2 principal components, pure R)

Description

PPC2 for censored factor models (Top-2 principal components, pure R)

Usage

PPC2.CFM(
  data,
  m,
  A = NULL,
  D = NULL,
  p = NULL,
  cens.dist = c("normal", "t", "logistic"),
  df = NULL,
  cens.method = c("winsorise", "em"),
  cens_prop = 0.01,
  surv.obj = NULL,
  ctrl = NULL,
  verbose = NULL
)

Value

AF

Estimated loading matrix, p × 2.

DF

Estimated unique-variance diagonal matrix, p × p.

MSESigmaA

Mean squared error of loadings (if A is provided).

MSESigmaD

Mean squared error of unique variances (if D is provided).

LSigmaA

Relative error of loadings (if A is provided).

LSigmaD

Relative error of unique variances (if D is provided).

Arguments

data

Numeric matrix or data frame of dimension \(n \times p\).

m

Number of factors (< p).

A

Optional true loading matrix, used only for error calculation.

D

Optional true unique-variance diagonal matrix, used only for error calculation.

p

Number of variables (deprecated; detected automatically).

cens.dist

Error distribution, reserved for future use.

df

Degrees of freedom, reserved for future use.

cens.method

Censoring handling method; currently only "winsorise" is implemented. Defaults to "winsorise".

cens_prop

Winsorisation proportion, default 0.01.

surv.obj

Reserved for future use.

ctrl

Reserved for future use.

verbose

Reserved for future use.

Examples

Run this code
# \donttest{
library(CFM)
obj <- CFM(n = 500, p = 12, m = 2, cens.dist = "normal")
res <- PPC2.CFM(obj$data, A = obj$A, D = obj$D, cens.method = "winsorise")
print(res$MSESigmaA)
# }

Run the code above in your browser using DataLab