Xgen: Designmatrix generator

View source: R/Xgen.R

XgenR Documentation

Designmatrix generator

Description

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.

Usage

Xgen(tt, n, s, pp, design, steps = 10)

Arguments

tt

real-valued vector of length n: Observation times.

n

integer: Sample size.

s

numeric vector of length n: Measurement errors to perform weighted regression, else set s=rep(1,n).

pp

positive number: Trial period.

design

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).

steps

Number of steps for the step functions

Value

numeric matrix: Designmatrix.

Note

A former version of this function is used in Thieler et al. (2013).

Author(s)

Anita M. Thieler and Jonathan Rathjens

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 RobPer, see FastTau for an example.


RobPer documentation built on June 13, 2022, 1:06 a.m.