Home » date » 2010 » Nov » 22 »

Mini-tutorial Mate van angst

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 22 Nov 2010 10:33:49 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k.htm/, Retrieved Mon, 22 Nov 2010 11:34:11 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
69 24 14 11 12 24 26 53 25 11 7 8 25 23 43 17 6 17 8 30 25 60 18 12 10 8 19 23 49 18 8 12 9 22 19 62 16 10 12 7 22 29 45 20 10 11 4 25 25 50 16 11 11 11 23 21 75 17 11 13 7 21 25 82 18 16 12 7 17 22 60 23 13 14 12 19 24 59 30 12 16 10 19 18 21 23 8 11 10 15 22 40 18 12 10 8 16 15 62 22 11 13 11 24 18 54 15 11 11 8 23 22 47 20 9 15 6 25 24 59 31 14 17 11 23 20 37 20 10 10 8 26 23 43 15 12 11 8 20 25 48 30 9 15 9 27 26 79 32 16 9 6 29 26 62 19 20 8 7 19 25 16 25 7 18 11 35 17 38 22 9 16 9 24 23 58 25 8 12 7 32 25 60 19 9 13 8 27 21 72 14 15 13 8 14 16 67 19 11 11 8 20 28 55 19 10 12 7 17 21 47 23 10 12 8 20 21 59 31 14 10 8 18 23 49 17 9 17 9 25 21 47 12 4 15 4 27 28 57 26 13 12 8 24 29 39 21 10 13 6 24 24 49 28 11 13 6 25 22 26 23 10 15 10 23 21 53 33 14 9 6 32 24 75 26 16 5 4 23 24 65 27 15 11 9 23 21 49 21 9 9 9 22 20 48 18 9 12 8 21 24 45 13 14 13 6 21 25 31 17 9 11 5 23 26 67 18 12 13 9 21 13 61 26 11 18 5 29 18 49 24 9 13 10 19 15 69 21 12 14 9 22 24 54 21 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Anxiety[t] = + 20.3838257780381 + 0.113181873884428Concern[t] + 2.57520207109418Doubts[t] + 0.356521545363305Pexpectations[t] -0.0846338978898613Pcriticism[t] -0.0783139174114985Standards[t] -0.028565001972493Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)20.38382577803817.9372372.56810.0112220.005611
Concern0.1131818738844280.2079460.54430.587070.293535
Doubts2.575202071094180.3746636.873400
Pexpectations0.3565215453633050.3518511.01330.3125950.156297
Pcriticism-0.08463389788986130.443961-0.19060.8490760.424538
Standards-0.07831391741149850.276392-0.28330.7773120.388656
Organization-0.0285650019724930.267905-0.10660.9152330.457616


Multiple Linear Regression - Regression Statistics
Multiple R0.559188538520539
R-squared0.312691821612736
Adjusted R-squared0.284638426576521
F-TEST (value)11.1463094291822
F-TEST (DF numerator)6
F-TEST (DF denominator)147
p-value3.13000736440472e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation11.4087517401793
Sum Squared Residuals19133.4635915494


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16959.43692590173979.5630740982603
25350.74433206095422.25566793904584
34340.07938257703842.92061742296162
46054.06670915541625.93329084458376
54944.27362831953184.72637168046824
66249.08128649000612.9187135099940
74549.3107123895055-4.31071238950551
85051.1116375225459-1.11163752254592
97552.318765905649422.6812340943506
108265.350387265204916.6496127347951
116058.26680618385381.73319381614617
125957.5375781282921.46242187170806
132144.8608846616637-23.8608846616637
144054.5301709234307-14.5301709234307
156252.51115294508519.48884705491493
165451.22379234035862.77620765964142
174748.0208937060573-1.02089370605732
185962.7026661182472-3.70266611824718
193748.5944713391162-11.5944713391162
204353.9482411577698-10.9482411577698
214848.685052912464-0.685052912464035
227964.895975744558914.1040242554411
236274.0959684012723-12.0959684012723
241643.4996099196242-27.4996099196242
253848.4567562249039-10.4567562249039
265844.280640046552513.7193599534475
276046.954468116761013.0455318832390
287263.00067711011598.9993228898841
296751.740071576295815.2599284237042
305550.04092171449684.95907828550324
314750.1740735599101-3.17407355991012
325960.7667915755137-1.76679157551365
334948.22618448737850.773815512621455
344734.137808312577812.8621916874222
355757.69744970942-0.697449709419993
363950.0745484777208-11.0745484777208
374953.4208397525395-4.42083975253948
382650.8394286479858-24.8394286479858
395359.6809417279654-6.68094172796545
407563.487079623992811.5129203760072
416562.8267142154312.17328578456895
424946.09024637421682.90975362578319
434846.86895319606481.13104680393517
444559.6762785212841-14.6762785212841
453146.4393936317187-15.4393936317187
466755.180662078518211.8193379214818
476154.8627219677216.13727803227902
484948.14901104153040.850988958469589
496955.484200306425913.5157996935741
505447.63701430001456.36298569998545
518051.494165822611628.5058341773884
525739.402811750011417.5971882499886
533448.6212732611854-14.6212732611854
546959.20962126207979.79037873792027
554451.5473788690402-7.54737886904024
567044.488661403504525.5113385964955
575152.3257211882739-1.32572118827390
586649.08128649000616.9187135099940
591839.04295110312-21.04295110312
607447.740695259735926.2593047402641
615966.7581293129185-7.7581293129185
624846.30904258003441.69095741996561
635557.4886319064142-2.48863190641422
644448.7668689906469-4.76686899064692
655653.69524534781972.30475465218029
666551.319151319682513.6808486803175
677760.356627983817516.6433720161825
684651.4858462326123-5.4858462326123
697064.95374569156255.04625430843751
703944.8956902805788-5.89569028057885
715547.38740572599117.61259427400891
724448.0976563846827-4.09765638468274
734552.0988968571177-7.09889685711767
744537.24888370521997.75111629478015
752561.6767173029837-36.6767173029837
764955.424099648864-6.42409964886396
776556.80698627294698.19301372705311
784546.4076306700835-1.40763067008355
797160.285318992782210.7146810072178
804850.0154344560508-2.01543445605076
814151.5971277844792-10.5971277844792
824045.3302800226934-5.33028002269341
836460.30105077970813.6989492202919
845662.3968660417721-6.39686604177207
855258.0364004491070-6.03640044910705
864149.4196181697217-8.41961816972174
874550.2038354778423-5.20383547784227
884249.3107123895055-7.31071238950551
895466.9665762450859-12.9665762450859
904051.1716612850448-11.1716612850448
914048.1510685296297-8.1510685296297
925155.5043844151319-4.50438441513193
934848.6714199473914-0.671419947391398
948068.705765262275111.2942347377249
953846.3706507228887-8.37065072288875
965741.790594068743415.2094059312566
975149.63457292444941.36542707555062
984642.03409294235633.96590705764373
995860.077969689071-2.07796968907100
1006760.0991759949786.90082400502204
1017265.48323105240026.51676894759981
1022634.5624993697622-8.5624993697622
1035445.4636775887678.536322411233
1045353.947936956661-0.94793695666104
1056951.261872338936917.7381276610631
1066467.2183308617871-3.21833086178706
1074747.6653992167658-0.665399216765783
1084361.0049575044314-18.0049575044314
1096664.08661659213851.9133834078615
1105456.2319074417817-2.23190744178168
1116254.55404221513467.44595778486536
1125247.11985404127094.88014595872906
1136449.867860725705514.1321392742945
1145546.93768930425028.06231069574979
1157452.867094848895421.1329051511046
1163244.5034980851813-12.5034980851813
1173835.84677590538012.15322409461985
1186660.48640178434695.51359821565308
1193746.4393936317187-9.4393936317187
1202643.5013840867387-17.5013840867387
1216450.63117107015713.3688289298430
1222841.0115309335622-13.0115309335622
1236552.193039426031312.8069605739687
1244845.25117796922582.74882203077417
1254445.6456476830613-1.64564768306127
1266454.87352008710879.12647991289129
1273958.9385153043637-19.9385153043637
1285057.6099171189342-7.60991711893422
1295260.750044346486-8.75004434648594
1304854.0667091554162-6.06670915541624
1317054.05689381481115.9431061851890
1326660.42368145553125.57631854446884
1336165.3223309810183-4.32233098101833
1343144.6778106162347-13.6778106162347
1356161.1310052111362-0.131005211136226
1365444.09593535319649.90406464680364
1373446.0257693337217-12.0257693337217
1386259.72057248736392.27942751263615
1394741.16931777527975.83068222472034
1405261.9505538819357-9.95055388193572
1413755.7354121533853-18.7354121533853
1424646.7480622059432-0.7480622059432
1436161.360280699653-0.360280699653013
1447061.44385348951538.55614651048474
1456360.66603552540882.33396447459117
1463443.1891486725199-9.18914867251991
1474643.59986508687832.40013491312169
1484048.7033994366018-8.70339943660178
1493045.4828278407567-15.4828278407567
1503550.4044652122142-15.4044652122142
1515156.2836574009237-5.28365740092368
1525644.439784319829111.5602156801709
1534454.0667091554162-10.0667091554162
1545847.7336236636310.2663763363700


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.254219681053710.508439362107420.74578031894629
110.4116047967006950.823209593401390.588395203299305
120.2721960791377420.5443921582754840.727803920862258
130.3800054208473020.7600108416946040.619994579152698
140.3871619506012790.7743239012025580.612838049398721
150.3383559353491710.6767118706983430.661644064650829
160.2617403613280810.5234807226561620.738259638671919
170.2222477141996270.4444954283992530.777752285800373
180.2182785442546670.4365570885093350.781721455745333
190.2529518015457190.5059036030914390.747048198454281
200.3976155613819660.7952311227639320.602384438618034
210.3191050338649730.6382100677299450.680894966135027
220.2632104430082800.5264208860165590.73678955699172
230.5104877291826940.9790245416346130.489512270817306
240.7629331685028910.4741336629942180.237066831497109
250.747523269326580.5049534613468410.252476730673421
260.7637535592335450.472492881532910.236246440766455
270.7892150158556020.4215699682887960.210784984144398
280.7780651661983040.4438696676033920.221934833801696
290.7709133558607690.4581732882784620.229086644139231
300.7296636420934620.5406727158130760.270336357906538
310.6761304230233140.6477391539533710.323869576976685
320.6191721788917760.7616556422164480.380827821108224
330.5587148653541580.8825702692916830.441285134645842
340.5213298589054090.9573402821891830.478670141094591
350.4871928438963620.9743856877927250.512807156103638
360.5167006828712380.9665986342575230.483299317128762
370.4636167774128190.9272335548256390.53638322258718
380.6288343895934370.7423312208131250.371165610406563
390.5904657962994760.8190684074010470.409534203700524
400.5678412205776270.8643175588447470.432158779422373
410.5173251093038620.9653497813922750.482674890696138
420.4801867612040690.9603735224081380.519813238795931
430.425545024062960.851090048125920.57445497593704
440.542450636493520.915098727012960.45754936350648
450.6201460416204970.7597079167590060.379853958379503
460.6551441950427610.6897116099144780.344855804957239
470.6248900767512150.750219846497570.375109923248785
480.5839716569865770.8320566860268460.416028343013423
490.5992451817629740.8015096364740520.400754818237026
500.5657327207214780.8685345585570440.434267279278522
510.7548884626237630.4902230747524740.245111537376237
520.7800919892328490.4398160215343020.219908010767151
530.8169463690092420.3661072619815160.183053630990758
540.8026566758073090.3946866483853830.197343324192691
550.787766452849490.4244670943010220.212233547150511
560.901789717332190.196420565335620.09821028266781
570.8816482308494350.236703538301130.118351769150565
580.9041561847286850.191687630542630.095843815271315
590.9483308277638350.1033383444723310.0516691722361654
600.9852159591022330.02956808179553390.0147840408977669
610.9816255313731650.03674893725366950.0183744686268347
620.9755804490853670.04883910182926610.0244195509146331
630.9681097339661230.06378053206775460.0318902660338773
640.9614731115730970.07705377685380530.0385268884269026
650.9519844158932150.09603116821356920.0480155841067846
660.9566840058746560.08663198825068810.0433159941253440
670.968377764730390.06324447053921880.0316222352696094
680.9621261527782950.07574769444341040.0378738472217052
690.9580339480110670.08393210397786540.0419660519889327
700.9493264287452840.1013471425094330.0506735712547163
710.9423586541067290.1152826917865420.0576413458932711
720.9412953451855730.1174093096288540.0587046548144269
730.9326475939806570.1347048120386850.0673524060193426
740.9273453852961590.1453092294076830.0726546147038413
750.9943709006216260.01125819875674790.00562909937837395
760.993119139793190.01376172041362140.00688086020681072
770.9922265149860080.01554697002798360.0077734850139918
780.9893498037424930.02130039251501360.0106501962575068
790.990053658995670.01989268200866150.00994634100433076
800.986471961754140.02705607649172070.0135280382458604
810.9853794563175660.02924108736486760.0146205436824338
820.9819782514167980.03604349716640470.0180217485832024
830.976715661616860.04656867676628170.0232843383831408
840.9718614625112630.05627707497747370.0281385374887368
850.9652412926725620.06951741465487530.0347587073274376
860.9601435141083080.07971297178338370.0398564858916919
870.9510921667739960.09781566645200710.0489078332260036
880.9419061188303840.1161877623392310.0580938811696157
890.9464687229124340.1070625541751330.0535312770875663
900.9450302810272560.1099394379454880.0549697189727441
910.9361002176311180.1277995647377640.0638997823688821
920.9211392430169870.1577215139660250.0788607569830127
930.9017111430344570.1965777139310860.098288856965543
940.8987892382145460.2024215235709070.101210761785454
950.8899032186296980.2201935627406030.110096781370302
960.9135712433497070.1728575133005850.0864287566502927
970.8919910146330250.2160179707339490.108008985366975
980.8770909190235630.2458181619528750.122909080976437
990.8494184105006860.3011631789986280.150581589499314
1000.8335076649934270.3329846700131470.166492335006573
1010.8273937690148730.3452124619702540.172606230985127
1020.8067121440429740.3865757119140520.193287855957026
1030.7862225700804270.4275548598391470.213777429919573
1040.7460185683209310.5079628633581370.253981431679069
1050.8099019302060250.3801961395879510.190098069793975
1060.7726264043420780.4547471913158450.227373595657922
1070.730234937503140.539530124993720.26976506249686
1080.7698559674715410.4602880650569180.230144032528459
1090.740267765872870.519464468254260.25973223412713
1100.7101049172138270.5797901655723470.289895082786173
1110.6724168314105640.6551663371788730.327583168589436
1120.6403658727908530.7192682544182950.359634127209147
1130.6430137390911050.713972521817790.356986260908895
1140.631160562323190.737678875353620.36883943767681
1150.7605527061384830.4788945877230340.239447293861517
1160.7581713944811620.4836572110376760.241828605518838
1170.7414479812027040.5171040375945920.258552018797296
1180.7149928912281860.5700142175436270.285007108771814
1190.6714504005721880.6570991988556240.328549599427812
1200.6886605347239140.6226789305521720.311339465276086
1210.7055489896607850.5889020206784310.294451010339215
1220.6997171492741810.6005657014516370.300282850725819
1230.7478483132932190.5043033734135630.252151686706781
1240.7070248702586990.5859502594826030.292975129741301
1250.6577439385871180.6845121228257650.342256061412882
1260.7022636696033660.5954726607932680.297736330396634
1270.7631375434275540.4737249131448910.236862456572446
1280.7136860355649060.5726279288701890.286313964435094
1290.6882632751322060.6234734497355880.311736724867794
1300.6270968775012660.7458062449974670.372903122498734
1310.7399601083540140.5200797832919710.260039891645986
1320.7582221602530960.4835556794938090.241777839746904
1330.6910181295986340.6179637408027320.308981870401366
1340.6403946448509220.7192107102981550.359605355149078
1350.5615641506877680.8768716986244630.438435849312232
1360.6426263478299490.7147473043401010.357373652170051
1370.6022968619043990.7954062761912030.397703138095601
1380.5115445051037140.9769109897925720.488455494896286
1390.7301115743647940.5397768512704130.269888425635206
1400.633885800760430.7322283984791390.366114199239570
1410.5992973705300860.8014052589398280.400702629469914
1420.4739186074665310.9478372149330630.526081392533469
1430.3353234072845040.6706468145690080.664676592715496
1440.3527863630085580.7055727260171160.647213636991442


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level120.0888888888888889NOK
10% type I error level230.170370370370370NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/10u8sb1290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/10u8sb1290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/1gyu21290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/1gyu21290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/2gyu21290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/2gyu21290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/3gyu21290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/3gyu21290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/49pb51290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/49pb51290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/59pb51290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/59pb51290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/69pb51290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/69pb51290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/72ht81290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/72ht81290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/8u8sb1290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/8u8sb1290422018.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/9u8sb1290422018.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290422038wh8ha6fqhnbpe5k/9u8sb1290422018.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by