dojitter {adlift} | R Documentation |
This function adds a random uniform vector of the same length as the input to modify the input.
dojitter(x, amount = 0)
x |
a vector to be jittered (e.g. a gridpoint vector). |
amount |
a value of how much to jitter the vector x. |
The function creates length(x)
samples from a uniform[-amount,amount], and adds these to the original vector x. If amount=0, the new vector jx is the same as the original vector.
jx |
the jittered version of x |
Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa (Marina.Popa@bristol.ac.uk)
#create grid vector # xgrid<-seq(0,1,length=51) # xgrid # #a regularly-spaced grid # dojitter(xgrid,.01) # #a jittered grid. #