This function is used to create the designmatrices needed in RobPer
to fit periodic functions. See RobPer
or Thieler, Fried and Rathjens (2016) for Details.
Xgen(tt, n, s, pp, design, steps = 10)
real-valued vector of length n
: Observation times.
integer: Sample size.
numeric vector of length n
: Measurement errors to perform weighted regression, else set s=rep(1,n)
.
positive number: Trial period.
character string: Shape of the periodic function to be fitted, possible choices are "step"
, "sine"
, "fourier(2)"
, "fourier(3)"
, "splines"
(see RobPer
for details) and "stepB"
. The latter generates a step function like "step"
, but with opposite jumping time points. This is needed for RobPer with model="2step"
(see RobPer
).
Number of steps for the step functions
numeric matrix: Designmatrix.
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>