R/CalWtMatrix.discrete.R

Defines functions CalWtMatrix.discrete

                                                                                                 
CalWtMatrix.discrete = function(xVector,xEvaluate,sigma){  

# return a n *n matix, the ith row is the weight evaluated at the xEvaluate[i] 

   n = length(xVector)
   nxevaluate = length(xEvaluate)
   tempX = (VTM(xVector,nxevaluate)-t(VTM(xEvaluate,n)))/sigma;
   
   1/sqrt(2*3.1415926) * exp(-tempX * tempX/2.0)/sigma; 
}
mdbrown/survCompetingRisk documentation built on May 22, 2019, 3:23 p.m.