R/PsiMest.R

Defines functions PsiMest

Documented in PsiMest

PsiMest <-
function(x, y, beta, sigma, t.c = 1.345, weight = 1)  
{ 
  if((y-t(as.vector(x))%*%as.vector(beta))/sigma<(-t.c))  
    return(-t.c*x*weight)
  else if((y-t(as.vector(x))%*%as.vector(beta))/sigma>t.c) return(t.c*x*weight)
  else return(c(y-t(as.vector(x))%*%as.vector(beta))/sigma*x*weight)
}

Try the ssmrob package in your browser

Any scripts or data that you put into this service are public.

ssmrob documentation built on Aug. 20, 2021, 5:08 p.m.