R/WorkingResp.R

Defines functions WorkingResp

Documented in WorkingResp

WorkingResp <-
function(y, Px, X, beta, intercept=0){
  pred <- X%*%beta+intercept
  temp <- pred+(y-Px)/(Px*(1-Px))
  temp[which(Px==1)]=pred[which(Px==1)]
  temp[which(Px==0)]=pred[which(Px==0)]
  
  return(unlist(temp))
}

Try the WLogit package in your browser

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

WLogit documentation built on July 26, 2023, 5:46 p.m.