dojitter: dojitter

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function adds a random uniform vector of the same length as the input to modify the input.

Usage

1
dojitter(x, amount = 0)

Arguments

x

a vector to be jittered (e.g. a gridpoint vector).

amount

a value of how much to jitter the vector x.

Details

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.

Value

jx

the jittered version of x

Author(s)

Matt Nunes (nunesrpackages@gmail.com), Marina Knight

See Also

modjitter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#create grid vector
#
xgrid<-seq(0,1,length=51)
#
xgrid
#
#a regularly-spaced grid
#
dojitter(xgrid,.01)
#
#a jittered grid.
# 

nunesmatt/adlift documentation built on May 15, 2019, 3:33 p.m.