disturber {RobPer} | R Documentation |
Disturbing light curve data
Description
Disturbes a light curve replacing measurement accuracies by outliers and/or observed values by atypical values.
See RobPer-package
for more information about light curves.
Usage
disturber(tt, y, s, ps, s.outlier.fraction = 0, interval)
Arguments
tt |
numeric vector: Observation times |
y |
numeric vector: Observed values |
s |
numeric vector: Measurement accuracies |
ps |
positive value: Sampling period |
s.outlier.fraction |
numeric value in [0,1]: Defines the proportion of measurement accuracies that is replaced by outliers (see Details). A value of 0 means that no measurement accuracy is replaced by an outlier. |
interval |
logical: If |
Details
This function disturbes the light curve given. It randomly chooses a proportion of
s.outlier.fraction
measurement accuracies and replaces them by
. In case of
interval=TRUE
a time interval within the intervall
is randomly chosen and all observed values belonging to this time interval are replaced by a peak function:
where denotes the density of a normal distribution with mean
and variance
at
.
In case of s.outlier.fraction=0
and interval=FALSE
, y
and s
are returned unchanged.
Value
y |
numeric vector: New |
s |
numeric vector: New |
Note
A former version of this function is used in Thieler et al. (2013). See also Thieler, Fried and Rathjens (2016).
Author(s)
Anita M. Thieler
References
Thieler, A. M., Backes, M., Fried, R. and Rhode, W. (2013): Periodicity Detection in Irregularly Sampled Light Curves by Robust Regression and Outlier Detection. Statistical Analysis and Data Mining, 6 (1), 73-89
Thieler, A. M., Fried, R. and Rathjens, J. (2016): RobPer: An R Package to Calculate Periodograms for Light Curves Based on Robust Regression. Journal of Statistical Software, 69 (9), 1-36, <doi:10.18637/jss.v069.i09>
See Also
Applied in tsgen
(see there for example).