casp.checkloss: Coordinate-wise shrinkage prediction for disaggregated...

View source: R/casplib.R

casp.checklossR Documentation

Coordinate-wise shrinkage prediction for disaggregated targets under check loss

Description

Main function for disaggregated shrinkage prediction in high-dimensional, non-exchangeable hierarchical Gaussian models with an unknown location as well as an unknown spiked covariance structure under check loss.

Usage

casp.checkloss(X, S, b.tilde, tau, beta, eta, mx, mw, m0, type)

Arguments

X

a mx\times n matrix of past observations.

S

n\times n sample covariance matrix based on mw samples

b.tilde

this is a n\times 1 vector of check loss parameters. Here \tilde{b}_i=b_i/(b_i+h+i) where \mathbf{b} and \mathbf{h} are the check loss parameters for the n coordinates.

tau

the positive scale hyper-parameter for the prior on the locations

beta

the non-negative shape hyper-parameter for the prior on the locations

eta

the prior mean of the locations

mx

the sample size of past observations \mathbf{X}

mw

the size of the side information for calculating the sample covariance matrix \mathbf{S}

m0

the sample size of the future observation. Usually this is set to 1

type

if type = 1 then all the shrinkage factors are equal to 1. If type = 0, then the shrinkage factors are estimated.

Details

This function is based on Definition 2 of the casp paper, and relies on rmt.est and hfun.est. The shrinkage factors are estimated using the formulation given in Definition 3 and use f.est in the background. Please see the casp paper in the reference for more details about these estimation techniques. If (τ,β) are unknown then one may first use taubeta.casp.est to estimate them and then use the estimated values in casp.checkloss.

Value

  1. q - shrinkage prediction under check loss for the n coordinates

  2. f - estimated shrinkage factors (equal to 1 if type = 1)

References

  1. Trambak Banerjee, Gourab Mukherjee, and Debashis Paul. Improved Shrinkage Prediction under a Spiked Covariance Structure, 2021.

See Also

casp.linexloss,f.est,rmt.est,taubeta.casp.est

Examples

library(casp)
set.seed(42)
n = 10
mx = 5
S = diag(c(10,8,6,4,rep(1,n-4)))
X<- matrix(runif(mx*n),mx,n)
tau = 1
beta = 0.5
eta = rep(0,n)
mw = 100
m0 = 1
b.tilde = rep(0.5,n)
q.casp<- casp.checkloss(X,S,b.tilde,tau,beta,eta,mx,mw,m0,0)


trambakbanerjee/casp documentation built on Nov. 22, 2022, 7:24 p.m.