Learn R Programming

ISR (version 2025-01-10)

MRPCA: Caculate the estimator on the MRPCA method

Description

Caculate the estimator on the MRPCA method

Usage

MRPCA(data = 0, data0, real = TRUE, example = FALSE)

Value

XMRPCA

is the estimator on the MRPCA method

MSEMRPCA

is the MSE value of the MRPCA method

MAEMRPCA

is the MAE value of the MRPCA method

REMRPCA

is the RE value of the MRPCA method

GCVMRPCA

is the GCV value of the MRPCA method

timeMRPCA

is the time cost of the MRPCA method

Arguments

data

is the orignal data set

data0

is the missing data set

real

is to judge whether the data set is a real missing data set

example

is to judge whether the data set is a simulation example

Examples

Run this code
 library(MASS)
 library(MASS)
 n=100;p=10;per=0.1
 X0=data=matrix(mvrnorm(n*p,0,1),n,p)
 m=round(per*n*p,digits=0)
 mr=sample(1:(n*p),m,replace=FALSE)
 X0[mr]=NA;data0=X0
 MRPCA(data=data,data0=data0,real=FALSE,example=FALSE)

Run the code above in your browser using DataLab