Fourier series creation
fourier degvar [if exp] [in range] [, cstub(str) sstub(str) npairs(#) ]
Description
fourier creates new variables which are
cos(i * degvar * pi / 180)
and
sin (i * degvar * pi / 180)
for degvar (measured in degrees) and i = 1, ..., npairs.
Options
cstub(str) specifies the stub for the names of the new cosine variables. This defaults to cos_, meaning that the cosines would be called cos_1, cos_2, cos_3 and so forth.
sstub(str) specifies the stub for the names of the new sine variables. This defaults to sin_, meaning that the sines would be called sin_1, sin_2, sin_3 and so forth.
npairs(#) specifies the number of pairs of variables. This defaults to 1.
Example
. fourier deg, np(3)
Author
Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk