R/predict.lspcr.glm.R

predict.lspcr.glm<-function(object,newX,newD,...){
  etaT=cbind(rep(1,dim(newD)[1]),newD,newX%*%object$projection)%*%object$coefficients
  piT=1/(1+exp(-etaT))
  YT=(etaT>0)+0
  return(list(newY=YT,newPi=piT)) 
}

Try the lsplsGlm package in your browser

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

lsplsGlm documentation built on May 2, 2019, 12:36 p.m.