periodograma: Periodogram

Description Usage Arguments Value References See Also Examples

View source: R/periodograma.R

Description

Calculates and displays the spectrum of the time serie

Usage

1

Arguments

y

a vector of the observed time-serie values

Value

frecuencia

Vector of frequencies at which the spectral density is estimated. The units are the reciprocal of cycles per unit time.

omega

Is calculated by pi*frecuencia/(n/2)

periodos

n/frecuencia

densidad

Vector of estimates of the spectral density at frequencies corresponding to frecuencia.

References

Parra, F. (2014), Amplitude time-frequency regression, (http://econometria.wordpress.com/2013/08/21/estimation-of-time-varying-regression-coefficients/)

See Also

gperiodograma

Examples

1
2
n<-100;x<-seq(0,24*pi,length=n);y<-sin(x)+rnorm(n,sd=.3)
periodograma(y)

Example output

Loading required package: taRifx
        omega frecuencia   periodos     densidad
2  0.06283185          1 100.000000 0.0134001090
3  0.12566371          2  50.000000 0.0010160801
4  0.18849556          3  33.333333 0.0064394453
5  0.25132741          4  25.000000 0.0045532612
6  0.31415927          5  20.000000 0.0091960888
7  0.37699112          6  16.666667 0.0015720988
8  0.43982297          7  14.285714 0.0266405695
9  0.50265482          8  12.500000 0.0091190461
10 0.56548668          9  11.111111 0.0013962285
11 0.62831853         10  10.000000 0.0030373294
12 0.69115038         11   9.090909 0.0166473869
13 0.75398224         12   8.333333 3.5949984606
14 0.81681409         13   7.692308 0.1567665862
15 0.87964594         14   7.142857 0.0069845219
16 0.94247780         15   6.666667 0.0167273087
17 1.00530965         16   6.250000 0.0105811368
18 1.06814150         17   5.882353 0.0682747402
19 1.13097336         18   5.555556 0.0064348585
20 1.19380521         19   5.263158 0.0091367045
21 1.25663706         20   5.000000 0.0059965802
22 1.31946891         21   4.761905 0.0353114932
23 1.38230077         22   4.545455 0.0281238730
24 1.44513262         23   4.347826 0.0157483334
25 1.50796447         24   4.166667 0.0096437950
26 1.57079633         25   4.000000 0.0024068265
27 1.63362818         26   3.846154 0.0009191706
28 1.69646003         27   3.703704 0.0476428439
29 1.75929189         28   3.571429 0.0382693012
30 1.82212374         29   3.448276 0.0024477454
31 1.88495559         30   3.333333 0.0228799527
32 1.94778745         31   3.225806 0.0002499966
33 2.01061930         32   3.125000 0.0032061562
34 2.07345115         33   3.030303 0.0039095142
35 2.13628300         34   2.941176 0.0162608008
36 2.19911486         35   2.857143 0.0229301678
37 2.26194671         36   2.777778 0.0021465366
38 2.32477856         37   2.702703 0.0052119168
39 2.38761042         38   2.631579 0.0002304386
40 2.45044227         39   2.564103 0.0160044517
41 2.51327412         40   2.500000 0.0112989968
42 2.57610598         41   2.439024 0.0159541279
43 2.63893783         42   2.380952 0.0062093399
44 2.70176968         43   2.325581 0.0032679678
45 2.76460154         44   2.272727 0.0018092254
46 2.82743339         45   2.222222 0.0007209506
47 2.89026524         46   2.173913 0.0298942927
48 2.95309709         47   2.127660 0.0220427080
49 3.01592895         48   2.083333 0.0011221122
50 3.07876080         49   2.040816 0.0430221819
51 3.14159265         50   2.000000 0.0311637762

descomponer documentation built on Aug. 12, 2021, 5:12 p.m.