NWW {survivalREC} | R Documentation |
Computes the Nadaraya-Watson weights.
NWW(covariate, x, kernel = "gaussian", bw)
covariate |
Covariate values for obtaining weights. |
x |
Covariate value to compute the weight at. |
kernel |
A character string specifying the desired kernel. See details below for possible options. Defaults to "gaussian" where the gaussian density kernel will be used. |
bw |
A single numeric value to compute a kernel density bandwidth. |
Possible options for argument window are "gaussian", "epanechnikov", "tricube", "boxcar", "triangular", "quartic" or "cosine".
A vector with Nadaraya-Watson weights.
Gustavo Soutinho and Luis Meira-Machado
b3state<-multidf(gap1=bladder4state$y1, event1=bladder4state$d1,
gap2=bladder4state$y2, status=bladder4state$d2,
size=bladder4state$size)
obj0 <- b3state[[1]]
NWW(covariate = obj0$size, x=3, kernel = "gaussian", bw = 3)