Home » date » 2010 » Nov » 20 »

Poging 1

*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: Sat, 20 Nov 2010 16:08:07 +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/20/t1290269238ndfudrhyxnc8s1r.htm/, Retrieved Sat, 20 Nov 2010 17:07:21 +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/20/t1290269238ndfudrhyxnc8s1r.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 «
4 4 4 4 4 4 4 4 4 3 4 4 5 4 4 4 5 5 5 4 5 4 4 4 3 4 4 3 3 2 3 4 2 2 4 3 4 2 3 4 5 4 5 4 5 4 3 4 4 3 4 4 4 3 3 4 2 2 4 2 4 2 4 4 4 4 5 3 4 2 4 4 4 2 2 3 4 4 3 2 4 4 4 4 4 3 4 4 2 2 3 2 4 3 4 3 5 5 5 4 5 4 5 5 3 3 4 4 4 3 3 4 4 4 4 4 4 4 4 3 4 4 5 4 4 4 4 4 3 3 3 3 3 3 3 4 4 4 4 4 5 3 4 4 2 2 4 2 3 2 2 3 4 3 4 4 4 2 4 4 3 4 4 3 4 3 4 4 3 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 4 3 5 3 4 4 5 4 4 4 5 4 4 4 2 4 4 3 4 3 4 4 4 4 4 4 4 4 4 4 4 4 3 4 4 4 3 4 4 4 4 5 2 4 4 4 2 4 4 4 3 3 4 4 4 4 3 4 2 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 4 4 5 3 5 4 3 3 3 4 4 4 4 4 4 4 4 4 4 3 4 4 4 4 3 4 4 3 4 4 4 3 4 2 3 3 3 3 4 4 4 4 4 3 4 4 4 4 4 4 2 2 3 2 4 2 3 2 2 2 5 2 4 2 2 3 4 4 5 4 4 2 4 4 4 2 4 4 4 4 4 2 5 4 5 5 4 4 4 5 4 4 4 4 4 3 4 4 4 3 4 3 5 3 4 4 4 4 4 4 4 4 4 4 5 4 4 4 5 4 4 4 3 3 4 3 4 4 3 4 2 1 4 4 4 4 2 4 4 4 4 4 4 3 4 4 4 4 4 3 3 4 4 3 2 2 4 3 4 4 4 4 2 2 4 2 3 3 2 3 4 4 4 4 4 3 4 4 4 4 4 4 4 2 4 4 4 3 4 4 3 2 4 4 3 3 4 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 time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
B[t] = + 1.02830814409858 + 0.0842475032129699A[t] + 0.207213675242005C[t] + 0.38652210968685D[t] -0.134026305664133E[t] + 0.00410101084894533F[t] + 0.279829847242846G[t] -0.0684096369345052H[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.028308144098580.4785982.14860.033340.01667
A0.08424750321296990.0649631.29680.1967580.098379
C0.2072136752420050.074492.78180.0061310.003065
D0.386522109686850.0904064.27543.5e-051.7e-05
E-0.1340263056641330.071517-1.87410.0629490.031474
F0.004101010848945330.0788350.0520.9585850.479292
G0.2798298472428460.0794933.52020.0005780.000289
H-0.06840963693450520.062201-1.09980.2732510.136626


Multiple Linear Regression - Regression Statistics
Multiple R0.571118664491289
R-squared0.326176528930313
Adjusted R-squared0.29342122130887
F-TEST (value)9.95797483265836
F-TEST (DF numerator)7
F-TEST (DF denominator)144
p-value4.14612011390147e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.604931442781952
Sum Squared Residuals52.6956552671406


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.06622095863849-0.0662209586384934
233.93219465297436-0.932194652974361
354.223655831429340.776344168570664
443.441445782462070.55855421753793
523.22317197358497-1.22317197358497
643.943825984186490.0561740158135089
733.7822901005467-0.782290100546703
823.11647971114096-1.11647971114096
943.878710502495760.121289497504242
1023.1222609250938-1.1222609250938
1144.06211994778955-0.0621199477895486
1222.98177668368241-0.981776683682408
1354.435076041737680.564923958262323
1433.69804259733373-0.698042597333733
1544.134630595573-0.134630595572999
1644.2734346338805-0.273434633880499
1733.23833311806901-0.23833311806901
1843.928093642125420.0719063578745841
1922.75925595925391-0.75925595925391
2034.0580189369406-1.0580189369406
2143.591350334889730.408649665110272
2223.77475978018352-1.77475978018352
2344.06622095863849-0.0662209586384939
2444.06622095863849-0.0662209586384939
2544.06622095863849-0.0662209586384939
2633.54157153243857-0.541571532438565
2744.01644215618733-0.016442156187331
2843.507102831676760.492897168323241
2944.06622095863849-0.0662209586384939
3043.579177436153640.420822563846357
3144.72079567965361-0.72079567965361
3244.02765124702774-0.0276512470277416
3344.12705989472475-0.127059894724754
3454.066220958638490.933779041361506
3544.06622095863849-0.0662209586384939
3644.13183762736812-0.131837627368121
3753.725376640553861.27462335944614
3844.06622095863849-0.0662209586384939
3943.977872444576580.0221275554234213
4043.624749703538470.375250296461529
4133.77475978018352-0.774759780183519
4244.11879272929453-0.118792729294534
4333.32440978159118-0.324409781591183
4453.463319344116071.53668065588393
4554.334273569966760.66572643003324
4643.269656620792360.730343379207642
4754.553264481123350.446735518876655
4844.20024726430263-0.200247264302627
4944.2953081955345-0.295308195534502
5043.997811321703990.00218867829601128
5144.52115270525985-0.52115270525985
5243.907478043203580.0925219567964164
5343.805276427301690.194723572698306
5444.20024726430263-0.200247264302627
5543.32947460033580.670525399664197
5643.827331550839560.172668449160441
5742.942770928765091.05722907123491
5844.20024726430263-0.200247264302627
5944.33427356996676-0.334273569966759
6043.931913594001440.0680864059985557
6144.25281903495867-0.252819034958667
6243.349667958885920.650332041114084
6343.997811321703990.00218867829601128
6444.55230067322767-0.55230067322767
6544.23852988981213-0.238529889812126
6655.02813510487211-0.0281351048721104
6744.3184357036883-0.318435703688295
6843.586572602246360.413427397753639
6933.61322389654373-0.613223896543731
7043.961493010774160.0385069892258415
7143.750043170412740.249956829587259
7223.18759050772217-1.18759050772217
7343.11787282814360.8821271718564
7454.384333431390840.615666568609161
7544.21608513058109-0.216085130581091
7654.93978659081020.0602134091898047
7733.40668694309615-0.406686943096148
7844.50348567867218-0.503485678672182
7944.48668400449804-0.486684004498042
8033.72059890791049-0.720598907910494
8143.602410468524830.397589531475174
8243.977872444576580.0221275554234213
8344.35265769883391-0.35265769883391
8444.03871138066284-0.0387113806628387
8543.984726043145340.015273956854659
8643.727311325080450.272688674919546
8754.100161894811190.899838105188808
8844.37521400941067-0.37521400941067
8943.624960751973250.37503924802675
9044.05038309236003-0.0503830923600292
9143.74782139978490.252178600215104
9254.02355023617880.976449763821204
9344.06144322599513-0.0614432259951265
9443.693264864690370.306735135309634
9533.031119442827-0.0311194428270049
9643.188554315617850.811445684382152
9743.931517931179940.068482068820061
9843.299212434640330.700787565359669
9954.303380083421640.696619916578358
10054.20304023250750.796959767492496
10143.904685074998710.095314925001294
10243.743149191358920.256850808641082
10354.200247264302630.799752735697373
10454.300085928177870.69991407182213
10544.3691722869068-0.369172286906796
10654.484854844188840.51514515581116
10744.11599976108966-0.115999761089657
10843.859007283396490.140992716603511
10944.18440939802416-0.184409398024162
11044.25281903495867-0.252819034958667
11123.76577551247382-1.76577551247382
11243.743149191358920.256850808641082
11354.628281011010420.37171898898958
11443.804599705507270.195400294492729
11544.02765124702774-0.0276512470277416
11643.242434128917960.757565871082044
11743.904685074998710.095314925001294
11844.18918713066753-0.18918713066753
11933.48662238702539-0.486622387025393
12043.68641126612160.313588733878396
12144.10729655235287-0.107296552352871
12234.02765124702774-1.02765124702774
12343.836169913846810.163830086153189
12454.245925055904840.754074944095156
12554.20304023250750.796959767492496
12634.03938810245726-1.03938810245726
12754.043489113306210.956510886693794
12844.18440939802416-0.184409398024162
12943.597632735881460.402367264118542
13034.341844270815-1.341844270815
13133.69804259733373-0.698042597333733
13243.854800748330150.145199251669846
13354.527480507196360.472519492803644
13423.46752587918241-1.46752587918241
13544.20024726430263-0.200247264302627
13644.2030402325075-0.203040232507504
13743.591350334889730.408649665110272
13854.050383092360030.94961690763997
13943.22895318753780.771046812462197
14044.04218107066214-0.0421810706621386
14143.966135589147060.0338644108529407
14243.713203741817780.286796258182224
14344.06622095863849-0.0662209586384939
14444.20024726430263-0.200247264302627
14554.118792729294530.881207270705465
14633.66392612640551-0.663926126405508
14744.06622095863849-0.0662209586384939
14843.754384859749540.245615140250457
14944.134630595573-0.134630595572999
15044.18030838717522-0.180308387175217
15143.487930429669460.51206957033054
15254.894108799207980.105891200792022


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.4438858518421480.8877717036842960.556114148157852
120.2945416903563560.5890833807127130.705458309643644
130.2236507074052150.447301414810430.776349292594785
140.1359277994820640.2718555989641270.864072200517936
150.101649544567630.2032990891352590.89835045543237
160.2061075498216150.4122150996432290.793892450178385
170.1371487967287270.2742975934574540.862851203271273
180.1820074928062440.3640149856124890.817992507193756
190.1431358609890470.2862717219780950.856864139010953
200.2806062192196720.5612124384393430.719393780780328
210.355212332212590.710424664425180.64478766778741
220.5134872802859140.9730254394281710.486512719714086
230.4365142857328020.8730285714656050.563485714267198
240.3628665391675810.7257330783351620.637133460832419
250.2949514858233670.5899029716467340.705048514176633
260.2705564734090920.5411129468181840.729443526590908
270.2144614417647970.4289228835295950.785538558235203
280.4790368251019910.9580736502039830.520963174898009
290.4118442967437710.8236885934875430.588155703256228
300.5163266361011250.967346727797750.483673363898875
310.5505074104910340.8989851790179310.449492589508966
320.5860767745924140.8278464508151710.413923225407586
330.5244050701473380.9511898597053240.475594929852662
340.6464587501050730.7070824997898540.353541249894927
350.5890093154181370.8219813691637270.410990684581863
360.57328273447980.85343453104040.4267172655202
370.7519537664061580.4960924671876840.248046233593842
380.7044259943840840.5911480112318310.295574005615916
390.6900987597564990.6198024804870010.309901240243501
400.6857285672124560.6285428655750890.314271432787544
410.6702078939359980.6595842121280030.329792106064002
420.632380488536720.735239022926560.36761951146328
430.6587227381961270.6825545236077470.341277261803873
440.9611307023580030.07773859528399390.0388692976419969
450.9596918285307010.08061634293859720.0403081714692986
460.9594748332312290.08105033353754270.0405251667687714
470.9513620184103350.097275963179330.048637981589665
480.9416177011081190.1167645977837630.0583822988918815
490.9267045423424970.1465909153150060.073295457657503
500.9080406566134970.1839186867730050.0919593433865027
510.8922947907927890.2154104184144220.107705209207211
520.8999872644928450.2000254710143110.100012735507155
530.881858001723330.2362839965533410.118141998276671
540.8605314009061350.2789371981877310.139468599093865
550.895553127925350.2088937441493020.104446872074651
560.8841943809931160.2316112380137670.115805619006884
570.9317582471852540.1364835056294920.068241752814746
580.9167124928319020.1665750143361960.083287507168098
590.9052351409863060.1895297180273890.0947648590136945
600.8826816046402190.2346367907195610.117318395359781
610.8593820926363870.2812358147272250.140617907363613
620.854808621413580.2903827571728410.145191378586421
630.8252048496444850.349590300711030.174795150355515
640.8198648013468320.3602703973063360.180135198653168
650.7923832756277820.4152334487444360.207616724372218
660.7557647981760170.4884704036479660.244235201823983
670.7226123291527960.5547753416944090.277387670847204
680.698550336265130.602899327469740.30144966373487
690.6988284330054120.6023431339891750.301171566994588
700.6578745877389910.6842508245220170.342125412261009
710.6292055663548530.7415888672902940.370794433645147
720.7380544853526640.5238910292946730.261945514647336
730.7818470643321360.4363058713357270.218152935667864
740.7849720439050730.4300559121898540.215027956094927
750.7519651614913390.4960696770173230.248034838508661
760.7130043925547240.5739912148905530.286995607445276
770.7014702173309040.5970595653381920.298529782669096
780.7023857535415480.5952284929169040.297614246458452
790.6759793822578630.6480412354842750.324020617742137
800.6956362767323230.6087274465353550.304363723267677
810.6649780930517510.6700438138964980.335021906948249
820.6213662621488560.7572674757022880.378633737851144
830.5887261214072630.8225477571854740.411273878592737
840.5405781428556790.9188437142886420.459421857144321
850.4923584884451760.9847169768903520.507641511554824
860.4550755449451980.9101510898903970.544924455054802
870.5156865102686090.9686269794627830.484313489731391
880.4807632906780080.9615265813560170.519236709321992
890.444894135117520.889788270235040.55510586488248
900.4021237289738010.8042474579476020.597876271026199
910.3643029110802580.7286058221605160.635697088919742
920.4400528076351760.8801056152703520.559947192364824
930.3947440674136770.7894881348273530.605255932586323
940.3628606548428030.7257213096856050.637139345157197
950.3209934220277290.6419868440554590.67900657797227
960.3357344181334920.6714688362669840.664265581866508
970.3052793857624840.6105587715249680.694720614237516
980.2990063216634150.5980126433268310.700993678336585
990.3191537231798320.6383074463596650.680846276820168
1000.3378751659429020.6757503318858050.662124834057098
1010.2925502958930070.5851005917860130.707449704106993
1020.266172001843450.53234400368690.73382799815655
1030.2924897459786320.5849794919572640.707510254021368
1040.3051690228169390.6103380456338770.694830977183061
1050.2732461724739230.5464923449478460.726753827526077
1060.2538781724729720.5077563449459440.746121827527028
1070.2133495806664940.4266991613329870.786650419333507
1080.1772101215824690.3544202431649390.82278987841753
1090.1456831860075890.2913663720151780.85431681399241
1100.1205839266000660.2411678532001330.879416073399934
1110.5282290355946710.9435419288106580.471770964405329
1120.4938392072985490.9876784145970990.506160792701451
1130.4525184743626080.9050369487252160.547481525637392
1140.4014294517521570.8028589035043150.598570548247843
1150.3529744106087090.7059488212174190.647025589391291
1160.3534853838577790.7069707677155590.64651461614222
1170.3054713544861980.6109427089723960.694528645513802
1180.2560082050161130.5120164100322270.743991794983887
1190.258505495817930.5170109916358590.74149450418207
1200.245195000048980.4903900000979590.75480499995102
1210.2154225532299230.4308451064598470.784577446770077
1220.2580644390054160.5161288780108320.741935560994584
1230.2086843443629540.4173686887259090.791315655637046
1240.2914103681097510.5828207362195020.708589631890249
1250.2844668693457190.5689337386914370.715533130654281
1260.2953655572957750.590731114591550.704634442704225
1270.5842298549141780.8315402901716440.415770145085822
1280.5093767279165940.9812465441668130.490623272083406
1290.5021888117431180.9956223765137630.497811188256882
1300.8905896418694670.2188207162610670.109410358130533
1310.9748859472890660.05022810542186880.0251140527109344
1320.976096088619650.04780782276070020.0239039113803501
1330.9611108539030490.07777829219390280.0388891460969514
1340.9742326805883130.05153463882337490.0257673194116874
1350.9520226673451280.09595466530974310.0479773326548716
1360.9455540631748350.1088918736503310.0544459368251654
1370.9209129000164720.1581741999670570.0790870999835285
1380.9730348915438530.05393021691229370.0269651084561469
1390.9512107366611530.09757852667769470.0487892633388474
1400.8884867480208830.2230265039582330.111513251979117
1410.8573047848086740.2853904303826520.142695215191326


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.00763358778625954OK
10% type I error level110.083969465648855OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/10o8ng1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/10o8ng1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/1h7841290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/1h7841290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/2h7841290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/2h7841290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/3agpp1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/3agpp1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/4agpp1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/4agpp1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/5agpp1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/5agpp1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/6l7pa1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/6l7pa1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/7l7pa1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/7l7pa1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/8vhod1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/8vhod1290269273.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/9vhod1290269273.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290269238ndfudrhyxnc8s1r/9vhod1290269273.ps (open in new window)


 
Parameters (Session):
par1 = 3 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; 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