Learn R Programming

COR (version 0.2.0)

MSEcom: Caculate the MSE values of the COR criterion in simulation

Description

Caculate the MSE values of the COR criterion in simulation

Usage

MSEcom(K = K, nk = nk, alpha = alpha, X = X, y = y)

Value

A list containing:

MSEx

The Mean Squared Error between the true beta and the estimate betax based on the COR.

MSEA

The Mean Squared Error between the true beta and the estimate betaA based on the least squares estimate for subset A.

MSEc

The Mean Squared Error between the true beta and the estimate betac based on the COR-selected subset.

MSEm

The Mean Squared Error between the true beta and the median estimator betamm across all subsets.

MSEa

The Mean Squared Error between the true beta and the mean estimator betaa across all subsets.

Arguments

K

is the number of subsets

nk

is the length of subsets

alpha

is the significance level

X

is the observation matrix

y

is the response vector

References

Guo, G., Song, H. & Zhu, L. The COR criterion for optimal subset selection in distributed estimation. Statistics and Computing, 34, 163 (2024). tools:::Rd_expr_doi("10.1007/s11222-024-10471-z")

Examples

Run this code
p=6;n=1000;K=2;nk=500;alpha=0.05;sigma=1
e=rnorm(n,0,sigma); beta=c(sort(c(runif(p,0,1))));
data=c(rnorm(n*p,5,10));X=matrix(data, ncol=p);
y=X%*%beta+e;
MSEcom(K=K,nk=nk,alpha=alpha,X=X,y=y)

Run the code above in your browser using DataLab