[R] garchFit in R

Gabor Grothendieck ggrothendieck at gmail.com
Mon Jan 8 14:54:04 CET 2007


See ?garchFit .  The data argument is supposed to be of class "timeSeries" or
a data frame, not of class "ts".   Furthermore even if it did accept a variable
of class "ts" the ts function does not take a data frame as its
argument.  See ?ts
Follow the examples of using garchFit here:

https://svn.r-project.org/Rmetrics/trunk/fSeries/test/runit4C.R

and also review all your code doing a ? on each function that you use,
performing a class(x) on each argument, x, ensuring that each function
is called with the variables of the appropriate class.

On 1/6/07, Melina Chen <weird_fritz at yahoo.com> wrote:
> Dear all,
>
>  I have problem here :
>  I'm using garchFit from fSeries package, here is part of the script :
>  > data <- read.table("d:/data.txt")
>  > a <- garchFit(~garch(1,1),ts(data))
>
>  I also attached the file here. In my experience, I got my R not responding.
>  I also tried with
>  > a <- garchFit(~garch(1,1),ts(data*10))
>  and it's worked.
>
>  I wonder if something wrong with the first
>
>  Thanks
>
>  __________________________________________________
>
>
>
>
> 0.0026668996
> -0.0019157865
> -0.0001120967
> 0.0005845345
> 0.0003697987
> -0.0010323306
> -0.0023072483
> -0.0005885481
> 0.0012301371
> 0.0003082133
> -0.0002494891
> -0.0002006737
> -0.0004800350
> -0.0002843525
> 0.0027182299
> -0.0004827581
> 0.0007702074
> -0.0018742761
> -0.0012589320
> -0.0001864557
> 0.0019782314
> 0.0000000000
> -0.0016593427
> 0.0014883173
> -0.0019642834
> -0.0001129345
> 0.0003289013
> 0.0047631296
> -0.0003933189
> -0.0000777348
> -0.0001992589
> -0.0019439182
> -0.0017467015
> -0.0001716240
> -0.0003041862
> 0.0028812028
> -0.0006391600
> -0.0004934305
> 0.0002638840
> 0.0004931309
> 0.0002341631
> -0.0007321793
> -0.0021696036
> 0.0011669581
> -0.0003526987
> 0.0011745500
> -0.0001808695
> -0.0006997451
> 0.0000587632
> 0.0011198772
> 0.0017887369
> 0.0030052082
> 0.0012059188
> 0.0031819752
> -0.0032446005
> 0.0009576615
> -0.0030971545
> -0.0033876838
> 0.0007118065
> -0.0008289275
> -0.0001171526
> 0.0004440365
> -0.0016515719
> 0.0010317472
> -0.0002638158
> -0.0009735958
> 0.0011201799
> 0.0003223110
> -0.0026539675
> -0.0005848754
> 0.0010266956
> 0.0004805825
> -0.0005100232
> -0.0012333941
> -0.0046007250
> -0.0037661601
> 0.0030195219
> 0.0011691642
> -0.0005518513
> 0.0012071954
> -0.0009286963
> -0.0013194775
> -0.0010534771
> -0.0018384612
> 0.0010729640
> -0.0001352279
> -0.0041928562
> -0.0048981960
> 0.0035253602
> -0.0007769906
> -0.0065450379
> 0.0003404330
> 0.0018162840
> -0.0008223038
> -0.0003036179
> -0.0016866227
> -0.0038151118
> 0.0006511983
> -0.0049316481
> -0.0035685861
> 0.0000583904
> 0.0037786345
> 0.0047777192
> -0.0019298763
> -0.0030373119
> -0.0006163457
> -0.0058485648
> 0.0076319879
> -0.0061118610
> 0.0014086934
> 0.0020437674
> 0.0014607365
> 0.0013718807
> -0.0041446062
> 0.0010107937
> -0.0025287507
> 0.0035741117
> -0.0003428967
> 0.0004378049
> -0.0009605837
> -0.0010898236
> 0.0020398630
> 0.0009532263
> 0.0010508613
> -0.0006039345
> -0.0034717995
> 0.0027354396
> -0.0039024422
> -0.0002178340
> 0.0013848366
> 0.0018343314
> -0.0003219009
> -0.0018887114
> 0.0018939904
> 0.0007963918
> 0.0004529223
> 0.0008571518
> 0.0044218012
> -0.0019126781
> 0.0045515451
> 0.0092559993
> -0.0009015621
> -0.0020175552
> 0.0002240705
> 0.0038168506
> -0.0035878071
> -0.0002901422
> -0.0007389559
> 0.0051061545
> -0.0021933090
> 0.0014213553
> -0.0025780541
> -0.0004574410
> 0.0005336344
> -0.0004675298
> 0.0003608554
> 0.0007360280
> -0.0015191088
> -0.0021837991
> -0.0047678519
> -0.0010459318
> 0.0033618169
> -0.0011022447
> 0.0011588266
> 0.0001439934
> 0.0036812865
> -0.0010617579
> -0.0018386819
> 0.0006154677
> 0.0001178651
> -0.0006306943
> -0.0001283020
> -0.0011409873
> -0.0003809962
> 0.0016194965
> 0.0001436634
> 0.0009275365
> -0.0017079955
> 0.0017694197
> -0.0006351358
> 0.0000153772
> -0.0000358809
> -0.0024417258
> -0.0006706615
> 0.0004231532
> -0.0003250688
> 0.0000000000
> -0.0013493117
> -0.0007721806
> -0.0004618912
> 0.0011615764
> -0.0002227404
> -0.0010842518
> 0.0013691318
> -0.0006736543
> -0.0008721193
> 0.0036790147
> 0.0002935971
> -0.0001545000
> -0.0006959312
> -0.0006298763
> 0.0014236639
> 0.0016909739
> 0.0015975386
> -0.0005625643
> 0.0039227325
> 0.0001673279
> -0.0031647730
> -0.0008280651
> 0.0013231273
> 0.0013343643
> -0.0028724331
> -0.0002304126
> 0.0014980535
> -0.0012062182
> -0.0015279076
> 0.0022489747
> 0.0025778462
> -0.0014449700
> -0.0023558165
> -0.0009387271
> 0.0003644465
> 0.0052782725
> -0.0023175981
> -0.0001121273
> 0.0003362951
> -0.0000916910
> -0.0014952546
> -0.0008391870
> 0.0016716533
> -0.0013695639
> 0.0004655229
> 0.0013630021
> -0.0025559437
> 0.0000922755
> 0.0014686387
> -0.0004293316
> 0.0004599820
> -0.0009204516
> -0.0005327070
> 0.0016216967
> -0.0005620481
> 0.0013425983
> -0.0021153235
> 0.0000921851
> 0.0003224940
> 0.0012161541
> -0.0029080728
> 0.0004518232
> -0.0008167053
> -0.0008079421
> -0.0032780219
> -0.0022896000
> 0.0021286819
> -0.0003479945
> -0.0004262835
> -0.0013439693
> -0.0002400599
> 0.0019219713
> 0.0008826071
> -0.0000311203
> 0.0014344017
> 0.0003049113
> -0.0007031687
> 0.0014052008
> -0.0005419102
> 0.0033541187
> -0.0028844242
> -0.0000103175
> 0.0012312089
> 0.0003085428
> 0.0011550870
> -0.0003231148
> -0.0015316507
> -0.0002626703
> 0.0018456252
> -0.0023353370
> -0.0004851011
> -0.0008528198
> 0.0003930220
> 0.0014243068
> -0.0028740447
> 0.0012842983
> -0.0001965414
> 0.0031186304
> -0.0001335643
> 0.0000513757
> 0.0002465190
> 0.0001745330
> -0.0007293975
> 0.0017341634
> -0.0003227070
> 0.0012945009
> 0.0042097711
> -0.0021506299
> 0.0039128858
> -0.0014132766
> -0.0012860343
> -0.0001825811
> 0.0042303056
> 0.0020048020
> -0.0016583125
> -0.0024867810
> -0.0030701626
> -0.0010944863
> 0.0033814397
> -0.0011090121
> -0.0015187180
> 0.0023393556
> 0.0027394008
> -0.0004125788
> -0.0007557330
> -0.0003985487
> -0.0019830371
> -0.0001369206
> 0.0018220686
> -0.0002980935
> -0.0017877958
> 0.0012264205
> 0.0014499989
> -0.0018550441
> 0.0022734809
> -0.0001663181
> 0.0010321589
> -0.0008708797
> -0.0020962515
> 0.0022171716
> 0.0017294980
> -0.0001254584
> -0.0019265679
> 0.0009970473
> -0.0012189246
> 0.0022237246
> 0.0062328191
> 0.0003461302
> 0.0010170142
> -0.0041073144
> -0.0017758092
> 0.0016413812
> -0.0003487109
> 0.0134060935
> 0.0007820953
> -0.0024378250
> 0.0028090684
> 0.0014722024
> -0.0023115682
> 0.0047350981
> -0.0017324519
> -0.0019609177
> 0.0008565874
> 0.0095713406
> 0.0011553390
> -0.0011036118
> 0.0025878844
> -0.0007672553
> 0.0045879638
> 0.0037965748
> -0.0002894546
> -0.0003356413
> -0.0047682710
> -0.0053434738
> 0.0023476196
> 0.0038460414
> 0.0025221633
> -0.0018404295
> 0.0032087517
> -0.0003589401
> -0.0006311651
> -0.0004705149
> -0.0001292502
> 0.0014104374
> 0.0008321273
> -0.0029495048
> 0.0018411819
> -0.0017440828
> 0.0008729169
> -0.0018124527
> -0.0109842171
> 0.0001330341
> -0.0086313361
> 0.0007117559
> 0.0018778818
> -0.0043960443
> -0.0065551243
> 0.0081967409
> -0.0012476457
> 0.0004616097
> -0.0019762154
> 0.0027331643
> 0.0006297845
> 0.0017874811
> 0.0022935983
> 0.0028345839
> 0.0003857538
> -0.0020517587
> 0.0015611731
> 0.0041264571
> -0.0045508080
> 0.0026774187
> 0.0018403439
> 0.0007594088
> -0.0026471653
> 0.0022180974
> -0.0008594096
> 0.0002646149
> 0.0028485530
> -0.0014242952
> 0.0023431397
> 0.0000655574
> -0.0001685962
> -0.0005765314
> -0.0026251388
> -0.0001982347
> 0.0026357185
> -0.0003004166
> 0.0025936211
> -0.0005324412
> 0.0023118427
> 0.0028956934
> -0.0032770451
> -0.0023980828
> 0.0003320420
> -0.0012499847
> 0.0008758348
> 0.0022261150
> -0.0030691327
> 0.0011189845
> -0.0090432070
> 0.0023806149
> -0.0062025019
> 0.0004284574
> 0.0011532883
> -0.0019190319
> 0.0069431980
> -0.0011875711
> -0.0008141729
> 0.0023953007
> 0.0037516504
> -0.0041594387
> 0.0001897166
> -0.0003083316
> -0.0029950641
> -0.0003824151
> 0.0021038875
> -0.0006239009
> -0.0021452347
> 0.0052368863
> -0.0009901612
> -0.0038302275
> -0.0002105926
> 0.0010089590
> -0.0001385332
> -0.0007364005
> 0.0030379539
> -0.0017142850
> -0.0019462791
> 0.0006369676
> 0.0002153040
> 0.0010940075
> 0.0003577012
> -0.0024094334
> 0.0014166835
> 0.0010308873
> -0.0023325323
> 0.0007804982
> -0.0020668283
> -0.0020815414
> 0.0040431083
> -0.0052764949
> 0.0005905279
> -0.0002661222
> -0.0003631569
> 0.0021792202
> -0.0024699645
> 0.0006442210
> 0.0007689069
> -0.0018690191
> -0.0003689430
> 0.0021993075
> -0.0005076613
> 0.0019741241
> -0.0016839593
> 0.0015009220
> 0.0030916237
> -0.0021916309
> 0.0025598129
> 0.0059242960
> -0.0030754847
> 0.0034996097
> 0.0041952994
> -0.0002099720
> 0.0014258120
> -0.0021638521
> -0.0000046751
> 0.0011299180
> -0.0008121233
> 0.0017204605
> -0.0019634590
> -0.0021837312
> 0.0052207679
> -0.0002693069
> -0.0042895590
> 0.0010915753
> 0.0028076567
> -0.0018168420
> -0.0011218462
> 0.0015138088
> -0.0017104302
> -0.0025359511
> -0.0027498747
> 0.0007009334
> -0.0014599741
> 0.0021030792
> -0.0015147071
> -0.0013249600
> 0.0024141894
> -0.0015494203
> 0.0011045871
> -0.0026738466
> 0.0021100523
> -0.0013104480
> 0.0017700666
> 0.0038238738
> -0.0029486279
> 0.0008027278
> -0.0007649190
> 0.0023565366
> 0.0034503853
> -0.0021831524
> -0.0002953571
> 0.0022032986
> -0.0011914808
> -0.0003182811
> -0.0001685962
> 0.0021773408
> -0.0033123840
> 0.0013738685
> -0.0046265316
> 0.0029519897
> 0.0011592645
> -0.0002813183
> -0.0000515948
> 0.0007873259
> -0.0009796878
> 0.0021299888
> 0.0017662702
> -0.0011642791
> 0.0022280267
> -0.0003759623
> -0.0006133776
> -0.0002884009
> 0.0016950953
> -0.0003245744
> -0.0015147932
> 0.0028763787
> 0.0002172732
> -0.0001802829
> -0.0001479803
> 0.0008317342
> 0.0006043177
> 0.0029586773
> 0.0032205251
> -0.0023697383
> -0.0024700495
> 0.0018252511
> -0.0013796960
> -0.0000734622
> 0.0006423729
> -0.0003898988
> 0.0013471053
> -0.0003478310
> -0.0006964989
> 0.0019994314
> 0.0017129978
> 0.0000727439
> 0.0021630989
> -0.0024768938
> 0.0027572618
> 0.0033099986
> -0.0017216539
> 0.0045655969
> -0.0036746992
> -0.0032846564
> -0.0018654179
> 0.0021144412
> -0.0037869539
> -0.0002786179
> -0.0014232799
> 0.0013227509
> -0.0005945106
> -0.0018895360
> -0.0002114787
> 0.0002987986
> 0.0006612224
> 0.0012142082
> -0.0005081797
> -0.0013350848
> -0.0016158400
> 0.0001752247
> 0.0002719194
> 0.0025679082
> 0.0009973374
> -0.0018500911
> -0.0000780234
> 0.0023757137
> -0.0016602593
> 0.0052743434
> 0.0001719978
> 0.0003483132
> -0.0013223575
> -0.0024926061
> 0.0022113126
> 0.0038226656
> -0.0019749095
> -0.0004159649
> -0.0007968708
> 0.0013212829
> 0.0025362504
> -0.0010883677
> 0.0025278335
> -0.0004255133
> -0.0017512260
> -0.0015460389
> 0.0005279848
> 0.0027692801
> 0.0001433774
> 0.0016989974
> -0.0002454965
> 0.0051088575
> 0.0010841502
> -0.0024542212
> 0.0008181430
> -0.0028013377
> 0.0001333842
> 0.0012518130
> 0.0007528995
> 0.0000353984
> -0.0022446502
> 0.0014918121
> 0.0013895170
> 0.0010678763
> -0.0014568469
> 0.0000353754
> 0.0004286971
> 0.0002340579
> 0.0016216876
> -0.0000703824
> -0.0028601147
> -0.0012861161
> 0.0001465433
> -0.0003242379
> -0.0010944232
> 0.0015252071
> 0.0003549644
> -0.0009635156
> 0.0003110451
> 0.0006835161
> 0.0044124339
> 0.0003598386
> -0.0001052878
> 0.0037917681
> -0.0015336873
> 0.0036596723
> 0.0015725933
> 0.0101443419
> 0.0013586502
> 0.0023664137
> 0.0158470726
> -0.0132567483
> -0.0012765733
> -0.0052537277
> 0.0012080288
> 0.0110393067
> -0.0079441158
> -0.0014296741
> -0.0061100649
> -0.0041045143
> -0.0018731100
> -0.0029635943
> 0.0012855554
> 0.0027058128
> 0.0024670292
> 0.0003330021
> 0.0034219186
> -0.0007797791
> -0.0023818925
> 0.0036821574
> -0.0010585531
> 0.0039416367
> -0.0022154062
> -0.0004182347
> 0.0017926122
> -0.0053149589
> -0.0084503792
> 0.0046886741
> -0.0027292650
> 0.0002594352
> 0.0057113757
> -0.0026917353
> 0.0006948576
> -0.0020922234
> -0.0001076761
> -0.0007027037
> -0.0003668921
> -0.0007563435
> 0.0014639518
> -0.0042935245
> 0.0012174132
> -0.0002258331
> 0.0027411302
> 0.0011036824
> -0.0012504764
> 0.0012892268
> -0.0031066690
> 0.0034380584
> -0.0004002814
> -0.0005472174
> -0.0046162089
> 0.0006226882
> -0.0005747574
> 0.0028705391
> -0.0008014934
> 0.0016576724
> 0.0014232247
> -0.0030028490
> 0.0018948608
> 0.0018049590
> -0.0001848894
> -0.0008178968
> -0.0013032038
> 0.0005959889
> 0.0000388404
> 0.0004830575
> -0.0022343257
> -0.0022458802
> -0.0001916761
> -0.0066695947
> -0.0003009817
> 0.0002257558
> -0.0027480200
> 0.0004896118
> 0.0004135143
> 0.0017298174
> 0.0032106731
> -0.0010778672
> 0.0000528558
> -0.0014470467
> -0.0010042927
> 0.0029575487
> -0.0003696948
> 0.0002200943
> 0.0005233763
> -0.0069563040
> -0.0021043176
> -0.0034108782
> -0.0024177557
> -0.0054240313
> 0.0011361807
> 0.0017467622
> -0.0053773023
> -0.0004495826
> 0.0057536713
> -0.0011134528
> 0.0030813477
> -0.0060784466
> 0.0024553784
> -0.0008276570
> 0.0013923168
> -0.0060333122
> 0.0007529589
> 0.0024496840
> -0.0011744944
> -0.0001528252
> -0.0014057327
> 0.0011416352
> -0.0020673539
> -0.0040469413
> -0.0022006582
> 0.0051845459
> -0.0031343269
> -0.0001269736
> 0.0002257052
> 0.0000000000
> -0.0002633342
> -0.0020699028
> 0.0013543326
> 0.0019040096
> -0.0006055568
> 0.0041980117
> -0.0023464466
> 0.0001870608
> -0.0037094530
> -0.0015258226
> -0.0004166349
> 0.0017160487
> -0.0023702138
> 0.0019123188
> 0.0025805529
> 0.0039214110
> -0.0027024037
> -0.0030869636
> 0.0004854059
> -0.0025461639
> -0.0033195977
> 0.0028313361
> -0.0015204409
> 0.0014967249
> -0.0026978298
> 0.0002242677
> 0.0002241520
> 0.0005574934
> -0.0028953073
> 0.0004072731
> 0.0043459355
> -0.0036090239
> 0.0016415862
> -0.0049531271
> -0.0021152864
> 0.0017489884
> 0.0001880073
> -0.0025280242
> -0.0000387841
> 0.0031014610
> -0.0026459666
> 0.0015856533
> 0.0008725374
> -0.0012925584
> -0.0055024559
> 0.0009186767
> -0.0005715012
> -0.0033808481
> 0.0011953811
> -0.0017671780
> -0.0013536206
> 0.0021716497
> -0.0027212173
> 0.0009254474
> 0.0001186313
> -0.0001581823
> 0.0001581823
> -0.0016687561
> -0.0003375012
> -0.0005514851
> -0.0006716703
> 0.0037381712
> 0.0161588870
> 0.0024851313
> -0.0066140638
> 0.0069685996
> 0.0007742447
> 0.0013657219
> 0.0056571032
> 0.0012235353
> -0.0072993172
> -0.0009045940
> -0.0021275546
> 0.0048966306
> 0.0028772465
> -0.0038202281
> 0.0003145548
> 0.0054843663
> -0.0014018046
> 0.0045095120
> -0.0025658379
> 0.0004672246
> 0.0034997200
> 0.0016845205
> -0.0052212301
> -0.0053362546
> 0.0037195105
> 0.0010754114
> -0.0010707703
> 0.0015381144
> -0.0010788895
> -0.0000788223
> -0.0046104030
> 0.0048421923
> 0.0003011414
> -0.0039826309
> -0.0106603036
> 0.0021931336
> 0.0000000000
> -0.0028834641
> 0.0008340113
> 0.0000478831
> 0.0006506859
> 0.0021080214
> 0.0017852296
> 0.0053916391
> -0.0030054126
> 0.0006498032
> -0.0039752092
> 0.0012991340
> -0.0019263839
> -0.0000760919
> -0.0013719388
> -0.0012614292
> 0.0016858593
> 0.0004240157
> 0.0002285109
> -0.0021565907
> 0.0001578131
> 0.0002676729
> 0.0009641658
> -0.0001907540
> -0.0010410847
> 0.0012318387
> -0.0021220810
> 0.0027843006
> -0.0023293790
> 0.0001531295
> -0.0008764389
> 0.0016173969
> -0.0011669833
> 0.0014773318
> 0.0039624557
> -0.0012124524
> -0.0020108353
> -0.0005816913
> -0.0001956615
> 0.0022424279
> -0.0039690190
> 0.0021178259
> 0.0013380279
> -0.0017722247
> 0.0035467168
> -0.0024596569
> -0.0012398476
> 0.0037421170
> -0.0012469585
> -0.0021466899
> -0.0009314656
> 0.0023653559
> 0.0015808339
> 0.0005304014
> 0.0026846686
> -0.0003905801
> -0.0000800417
> -0.0003485888
> -0.0016383413
> 0.0017137355
> 0.0000800921
> -0.0014013850
> 0.0029344174
> -0.0006906055
> -0.0001928139
> -0.0014323212
> 0.0014934666
> -0.0000376269
> 0.0003855214
> -0.0028288293
> -0.0001939776
> -0.0000378594
> -0.0023347181
> 0.0009410914
> 0.0011948108
> -0.0003884270
> -0.0009250961
> 0.0002326455
> -0.0025564310
> 0.0018200849
> -0.0003091623
> -0.0001237266
> -0.0016881012
> 0.0007256384
> 0.0001192324
> -0.0006155908
> 0.0000000000
> 0.0005774400
> 0.0005766733
> -0.0001238487
> 0.0032984850
> -0.0029556059
> 0.0020895108
> 0.0005302742
> 0.0000378520
> -0.0023150283
> 0.0001902214
> 0.0007410684
> -0.0006127160
> 0.0027858619
> -0.0016371350
> -0.0013912022
> 0.0011398812
> 0.0003413818
> -0.0014051777
> -0.0014860716
> 0.0004530284
> 0.0007571708
> -0.0009860103
> -0.0006776904
> -0.0001098663
> -0.0025442383
> 0.0036321222
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>



More information about the R-help mailing list