SR: Caculate the estimator on the SR method

Description Usage Arguments Value Examples

View source: R/SR.R

Description

Caculate the estimator on the SR method

Usage

1
SR(data = 0, data0, real = TRUE, example = FALSE)

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.

Value

XSR, MSESR, MAESR, RESR, GCVSR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 library(MASS)   
 etatol=0.9
 n=100;p=10;per=0.1
 mu=as.matrix(runif(p,0,10))
 sigma=as.matrix(runif(p,0,1))
 ro=as.matrix(c(runif(p,-1,1)))
 RO=ro%*%t(ro);diag(RO)=1
 Sigma=sigma%*%t(sigma)*RO
 X0=data=mvrnorm(n,mu,Sigma)
 m=round(per*n*p,digits=0)
 mr=sample(1:(n*p),m,replace=FALSE)
 X0[mr]=NA;data0=X0
 SR(data=data,data0=data0,real=FALSE,example=FALSE)

ggbggbggb/ISR documentation built on Dec. 20, 2021, 10:42 a.m.