add.jitter {UCS}R Documentation

Random Jitter for Frequency Signatures in Data Set (gam)


Add random jitter to the frequency signatures in a data set, in order to avoid ties in rankings according to GAM scores and to facilitate visualisation of the data set with eo and ebo plots. The add.ebo function is used to re-compute ebo-coordinates from the jittered frequency signatures.


  add.jitter(ds, amount=0.5, overwrite=FALSE)

  has.jitter(ds, fail=FALSE)

  add.ebo(ds, jitter=FALSE)


ds a UCS data set object
amount amount of jitter to be added; the jitter vector for each coordinate (f, f1, f2) has a uniform distribution over the range [-amount, +amount]
overwrite if TRUE, overwrite existing jitter vectors in the data set
fail if TRUE, abort with an error message unless the data set contains jitter vectors
jitter if TRUE, use the jittered frequency signatures to compute ebo-coordinates (default: unjittered integer frequencies)


The add.jitter function adds jitter vectors for the joint and marginal frequencies (f, f1, f2) to a data set, i.e. uniformly distributed random numbers in the range [-amount, +amount]. These vectors are stored in variables x.jitter.f, x.jitter.f1 and x.jitter.f2, where they can be used by add.ebo, add.gams and other functions. has.jitter tests for the presence of these variables.

add.ebo computes ebo-coordinates from the frequency signatures and stores them in the standard variables e, b, o. Unlike the values computed with UCS/Perl tools, add.ebo uses jitter vectors in this computation when the option jitter=TRUE is passed.


add.jitter and add.ebo return a copy of the data set ds with the request variables added. has.jitter returns TRUE if the jitter variables are present in ds, and FALSE otherwise.

See Also

add.gams, gamma.nbest


ds <- add.jitter(ds, amount=0.2)

ds <- add.ebo(ds, jitter=TRUE)	# recompute ebo coordinates with jitter

[Package UCS version 0.5 Index]