Local linear fit with Epanechnikov kernel
LocalLm(Xint, Xvec, Yvec, bw, Wt = 1)
Xint
: a vector of x interval to generate the local linear fitXvec, Yvec
: numeric vectors of data values, Xvec and Yvec must have the same length.bw
: a bandwidth of the kernelWt
: a weight vectordata(BMACS) Time.int<- seq(0.1,5.9, by=0.1) LocalFit.Y <- with(BMACS, LocalLm(Time.int, Time, CD4, bw=0.9, Wt=1))