I have a vector of binary data – a string of 0’s and 1’s. I want to weight these inputs with a normal kernel centered around entry x so it is transformed into a new vector of data that takes into account the values of the entries around it (weighting them more heavily if they are near).
Example: - - - - - 0 1 0 0 1 0 0 1 1 1 1 If x = 3, it’s current value is 0 but it’s new value with the Gaussian weighting around would be something like .1*0+.5*1+1*0+0.5*0+.1*1= 0.6 I want to be able to play with adjusting the variance to different values as well. I’ve found wkde in the mixtools library and think it may be useful but I have not figured out how to use it yet. Any tips would be appreciated. Thanks! -- View this message in context: http://www.nabble.com/Weighting-data-with-normal-distribution-tp22728289p22728289.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.