casp.checkloss | R Documentation |
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.
casp.checkloss(X, S, b.tilde, tau, beta, eta, mx, mw, m0, type)
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. |
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
.
q - shrinkage prediction under check loss for the n coordinates
f - estimated shrinkage factors (equal to 1 if type = 1)
Trambak Banerjee, Gourab Mukherjee, and Debashis Paul. Improved Shrinkage Prediction under a Spiked Covariance Structure, 2021.
casp.linexloss
,f.est
,rmt.est
,taubeta.casp.est
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.