Home » date » 2010 » Nov » 23 »

ws 7

*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: Tue, 23 Nov 2010 18:46:25 +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/23/t12905378826xof9dbomza62ea.htm/, Retrieved Tue, 23 Nov 2010 19:44:46 +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/23/t12905378826xof9dbomza62ea.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 «
9 26 24 14 11 12 24 9 23 25 11 7 8 25 9 25 17 6 17 8 30 9 23 18 12 10 8 19 9 19 18 8 12 9 22 10 29 16 10 12 7 22 10 25 20 10 11 4 25 10 21 16 11 11 11 23 10 22 18 16 12 7 17 10 25 17 11 13 7 21 10 24 23 13 14 12 19 10 18 30 12 16 10 19 10 22 23 8 11 10 15 10 15 18 12 10 8 16 10 22 15 11 11 8 23 10 28 12 4 15 4 27 10 20 21 9 9 9 22 10 12 15 8 11 8 14 10 24 20 8 17 7 22 10 20 31 14 17 11 23 10 21 27 15 11 9 23 10 20 34 16 18 11 21 10 21 21 9 14 13 19 10 23 31 14 10 8 18 10 28 19 11 11 8 20 10 24 16 8 15 9 23 10 24 20 9 15 6 25 10 24 21 9 13 9 19 10 23 22 9 16 9 24 10 23 17 9 13 6 22 10 29 24 10 9 6 25 10 24 25 16 18 16 26 10 18 26 11 18 5 29 10 25 25 8 12 7 32 10 21 17 9 17 9 25 10 26 32 16 9 6 29 10 22 33 11 9 6 28 10 22 13 16 12 5 17 10 22 32 12 18 12 28 10 23 25 12 12 7 29 10 30 29 14 18 10 26 10 23 22 9 14 9 25 10 17 18 10 15 8 14 10 23 17 9 16 5 25 10 23 20 10 10 8 26 10 25 15 12 11 8 20 10 24 20 14 14 10 18 10 24 33 14 9 6 32 10 23 29 10 12 8 25 10 21 23 14 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Parameter[t] = + 6.67822358754462 + 1.09089428266741Variable[t] -0.0608903034875088S.D.[t] + 0.214416815593605`T-STAT`[t] -0.142213186036547`2-tail`[t] -0.24081553440865`1-tail`[t] + 0.399817197705633MultipleLinearRegression[t] -0.0160680246338639t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.6782235875446216.6400620.40130.6887420.344371
Variable1.090894282667411.6695450.65340.5144870.257243
S.D.-0.06089030348750880.062235-0.97840.3294440.164722
`T-STAT`0.2144168155936050.111071.93050.0554230.027711
`2-tail`-0.1422131860365470.103898-1.36880.1731020.086551
`1-tail`-0.240815534408650.129923-1.85350.0657590.03288
MultipleLinearRegression0.3998171977056330.0755515.29200
t-0.01606802463386390.006317-2.54380.0119710.005986


Multiple Linear Regression - Regression Statistics
Multiple R0.504343958942387
R-squared0.25436282892168
Adjusted R-squared0.219796867348513
F-TEST (value)7.3587661776242
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value1.34744991164837e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.44924263771775
Sum Squared Residuals1796.48849085137


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12623.16215352715712.83784647284294
22324.3738768317413-1.3738768317413
32524.34980128520220.650198714797821
42322.15684697813630.843153021863694
51921.9573213777632-2.95732137776317
62924.06439294277634.93560705722375
72525.8688750865717-0.86887508657174
82123.8254419552097-2.82544195520971
92223.1818231669331-1.18182316693311
102523.61161697260471.38838302739529
112421.51311550474192.48688449525806
121821.0536032368461-3.05360323684612
132219.71789721361062.28210278638941
141521.8876094213482-6.88760942134818
152224.4963026894861-2.49630268948612
162825.15566605047052.84433394952951
172023.3137848280649-3.31378482806494
181220.206493389453-8.20649338945301
192422.4720478472161.52795215278396
202022.5092424378522-2.50924243785224
212124.2860626277986-3.2860626277986
222021.7814215278614-1.78142152786138
232120.34359701932750.656402980672482
242322.16382325627040.836176743729601
252822.89260963608055.10739036391946
262422.80574538969051.19425461030955
272424.2826139653374-0.282613965337373
282421.36873221982932.63126778017065
292322.86422032212650.135779677873502
302323.5020555808545-0.502055580854503
312925.04247658466483.95752341533523
322422.96376232939521.03623767060476
331825.6631423949179-7.66314239491789
342526.6358138675096-1.6358138675096
352123.3298677034299-2.32986770342994
362627.3607837179795-1.36078371797954
372225.8119241141845-3.81192411418451
382223.5019330388059-1.5019330388059
392223.3302833032171-1.33028330321707
402326.1976213889639-3.19762138896394
413023.59164846900516.40835153099488
422323.339579571665-0.339579571664994
431719.4821027501849-2.48210275018491
442324.2907308053963-1.29073080539632
452324.8370583965925-1.8370583965925
462523.0131591483131.98684085168696
472421.41356821509062.58643178490936
482427.8776950808154-3.87769508081536
492323.5405299968907-0.540529996890733
502124.2772206597823-3.27722065978226
512426.1366857961263-2.13668579612633
522422.34843365493561.6515663450644
532822.02518464121475.97481535878531
541621.5169173509197-5.5169173509197
552020.4789198645736-0.478919864573648
562923.85415798399145.1458420160086
572724.2380351219382.76196487806198
582223.4951552848874-1.49515528488743
592824.24661093775943.75338906224063
601620.8090179954004-4.80901799540038
612523.22334779542661.77665220457342
622423.75836878962570.241631210374307
632823.90988628270894.09011371729114
642424.5407734245581-0.540773424558093
652322.90611397204030.0938860279597222
663027.0297797412782.97022025872196
672421.64345290823862.3565470917614
682124.2871449575035-3.28714495750352
692523.4473802754011.55261972459896
702524.10774421259730.892255787402678
712221.06081967312650.93918032687349
722322.63363795128910.366362048710895
732623.01176958948992.98823041051014
742321.83555334415571.16444665584434
752523.14600696198691.85399303801315
762121.4729491641733-0.472949164173296
772523.66268651727531.33731348272467
782422.26581984199731.73418015800268
792923.58101790059895.41898209940106
802223.6571462351028-1.65714623510282
812723.62551803705273.37448196294728
822619.76608686435296.23391313564712
832221.36905684615630.630943153843704
842422.04684442194241.95315557805762
852723.07748635450943.92251364549055
862421.32042913066572.67957086933426
872424.6815444756721-0.681544475672105
882924.2510137100684.74898628993204
892222.1734213910241-0.173421391024074
902120.5329219745410.467078025459013
912420.42304718138723.57695281861276
922421.58601725265892.41398274734108
932321.79007625362251.20992374637753
942022.0992409303702-2.09924093037018
952721.25720040941125.74279959058881
962623.21909180412.78090819589998
972521.80947440374763.1905255962524
982119.98063719193581.0193628080642
992120.57371013494820.426289865051761
1001920.2063592950003-1.20635929500026
1012121.3624295145167-0.362429514516656
1022120.98086637592380.0191336240762447
1031619.5302432228548-3.53024322285476
1042220.39020893145411.60979106854587
1052921.52522582938497.47477417061509
1061521.3920032767024-6.39200327670238
1071720.3933948873818-3.3933948873818
1081519.6598038042491-4.65980380424906
1092121.3291392407309-0.329139240730865
1102120.63219049021050.367809509789468
1111918.93255005385080.0674499461492113
1122417.82946585153746.17053414846261
1132021.8748409742144-1.87484097421436
1141724.5188654204699-7.5188654204699
1152324.2858541101742-1.28585411017424
1162421.80767728693912.19232271306087
1171421.4880741641059-7.48807416410592
1181922.2861213929966-3.28612139299661
1192421.65009006320952.34990993679047
1201319.8964383041808-6.89643830418078
1212224.6721943043691-2.67219430436911
1221620.5376135192885-4.53761351928849
1231922.6285225854727-3.62852258547274
1242522.09488296349732.90511703650273
1252523.48319640784931.51680359215074
1262320.75538692605912.24461307394087
1272422.75909160967811.24090839032194
1282622.77598158612763.22401841387242
1292620.80037066723995.19962933276006
1302523.39515643371431.60484356628568
1311821.5991239299519-3.59912392995193
1322119.18568630267331.81431369732666
1332622.77210814775393.2278918522461
1342321.12866952896751.87133047103249
1352319.04744752692783.95255247307219
1362221.74901385158390.250986148416128
1372021.5223154968376-1.52231549683762
1381321.2268052627589-8.22680526275892
1392420.55617346527473.44382653472531
1401520.7442930612423-5.74429306124235
1411422.2452383177519-8.2452383177519
1422223.1051451975367-1.10514519753668
1431016.9966410249546-6.99664102495459
1442423.40751790512790.592482094872088
1452220.89522557790071.10477442209927
1462424.6919111512327-0.691911151232678
1471920.6777846956121-1.67778469561206
1482021.0671514035548-1.06715140355484
1491316.2728111632552-3.27281116325521
1502019.14991457267730.850085427322731
1512222.1075686181769-0.107568618176906
1522422.26424471480011.73575528519993
1532922.09602517007726.90397482992283
1541219.8635042296644-7.86350422966438
1552019.85814857464110.141851425358917
1562120.27803288387080.72196711612925
1572422.46613689062631.53386310937373
1582220.75087566294911.2491243370509
1592016.81721341458223.18278658541778


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.3549197886053450.709839577210690.645080211394655
120.4719164566980020.9438329133960050.528083543301998
130.4077372273622130.8154744547244270.592262772637786
140.3036743406512410.6073486813024820.696325659348759
150.5008357235950750.998328552809850.499164276404925
160.6004402485757070.7991195028485860.399559751424293
170.5061895913117720.9876208173764560.493810408688228
180.5955634918273280.8088730163453450.404436508172672
190.5904047334324860.8191905331350280.409595266567514
200.5091644093816690.9816711812366620.490835590618331
210.4500813580152640.9001627160305280.549918641984736
220.3747471741177460.7494943482354910.625252825882254
230.3870389998471780.7740779996943560.612961000152822
240.4872748084027210.9745496168054410.512725191597279
250.7001726677181120.5996546645637760.299827332281888
260.6390331318615220.7219337362769560.360966868138478
270.5736397528763110.8527204942473790.426360247123689
280.5579572989444640.8840854021110730.442042701055536
290.4918517531149060.9837035062298120.508148246885094
300.4270967743950210.8541935487900410.572903225604979
310.4263684220418660.8527368440837310.573631577958134
320.363574902249910.727149804499820.63642509775009
330.6185367063515680.7629265872968640.381463293648432
340.581391977051940.837216045896120.41860802294806
350.5447268223119730.9105463553760540.455273177688027
360.4887008817200250.977401763440050.511299118279975
370.4739740734102790.9479481468205580.526025926589721
380.4226611136591910.8453222273183830.577338886340809
390.372538606214630.745077212429260.62746139378537
400.3477060646928810.6954121293857620.652293935307119
410.524496840865870.951006318268260.47550315913413
420.4698436569480270.9396873138960550.530156343051973
430.4360078912459130.8720157824918270.563992108754087
440.387783054411890.7755661088237810.61221694558811
450.3472617260356180.6945234520712360.652738273964382
460.3230958270943180.6461916541886370.676904172905682
470.3014481512429850.602896302485970.698551848757015
480.2968788140391410.5937576280782810.703121185960859
490.2590555129926830.5181110259853660.740944487007317
500.256624033905840.5132480678116790.74337596609416
510.2361128904272420.4722257808544840.763887109572758
520.206391706240350.4127834124806990.79360829375965
530.2777687684555640.5555375369111270.722231231544436
540.3559677413940770.7119354827881540.644032258605923
550.3394362076862970.6788724153725930.660563792313703
560.4016344482217150.803268896443430.598365551778285
570.3779713644651720.7559427289303450.622028635534828
580.3465549066634640.6931098133269290.653445093336536
590.3461664627694190.6923329255388380.653833537230581
600.4234398175223220.8468796350446440.576560182477678
610.3791917105059450.758383421011890.620808289494055
620.3369521344662720.6739042689325440.663047865533728
630.3394454175331240.6788908350662470.660554582466876
640.3052883105343780.6105766210687550.694711689465622
650.2659873424675390.5319746849350780.734012657532461
660.2495279946974870.4990559893949740.750472005302513
670.2213893676464310.4427787352928620.778610632353569
680.2436382092156180.4872764184312360.756361790784382
690.210155767961260.420311535922520.78984423203874
700.1774716906975820.3549433813951640.822528309302418
710.148776901146770.297553802293540.85122309885323
720.1236831082826130.2473662165652260.876316891717387
730.1076579889894920.2153159779789830.892342011010508
740.08754289046573230.1750857809314650.912457109534268
750.07124854544520620.1424970908904120.928751454554794
760.05951155317531720.1190231063506340.940488446824683
770.04714125077915430.09428250155830860.952858749220846
780.03673011863325530.07346023726651050.963269881366745
790.04174200201368180.08348400402736360.958257997986318
800.03824101181685720.07648202363371430.961758988183143
810.03201733480635110.06403466961270230.967982665193649
820.04223284033593980.08446568067187960.95776715966406
830.03295245186569710.06590490373139430.967047548134303
840.02575891058130410.05151782116260820.974241089418696
850.02356509472913480.04713018945826960.976434905270865
860.01859405663974460.03718811327948930.981405943360255
870.0151210998071830.03024219961436610.984878900192817
880.01548032701830720.03096065403661450.984519672981693
890.0129878819700140.0259757639400280.987012118029986
900.009802251923316420.01960450384663280.990197748076684
910.008332817191194040.01666563438238810.991667182808806
920.006784351260456410.01356870252091280.993215648739544
930.00498570699695850.0099714139939170.995014293003041
940.004735011343198910.009470022686397820.9952649886568
950.007017622301945590.01403524460389120.992982377698054
960.005705680702298980.0114113614045980.994294319297701
970.004858297631387390.009716595262774780.995141702368613
980.003709824064891840.007419648129783680.996290175935108
990.002792435160482580.005584870320965160.997207564839517
1000.002312291502123110.004624583004246220.997687708497877
1010.001812016914379980.003624033828759970.99818798308562
1020.001325473903971470.002650947807942930.998674526096029
1030.0016113856524260.0032227713048520.998388614347574
1040.001252669475850970.002505338951701950.998747330524149
1050.005495307817376340.01099061563475270.994504692182624
1060.01312153206325580.02624306412651160.986878467936744
1070.01374202532511010.02748405065022030.98625797467489
1080.01857356976407310.03714713952814610.981426430235927
1090.01438446893145930.02876893786291860.98561553106854
1100.01039184141641690.02078368283283390.989608158583583
1110.007474239515151140.01494847903030230.992525760484849
1120.02186030425490210.04372060850980420.978139695745098
1130.02195896014113740.04391792028227470.978041039858863
1140.054676084978930.109352169957860.94532391502107
1150.04688926585099560.09377853170199120.953110734149004
1160.03935805691945930.07871611383891860.96064194308054
1170.1025239485141660.2050478970283310.897476051485834
1180.096328145671370.192656291342740.90367185432863
1190.08602058769620280.1720411753924060.913979412303797
1200.1491044011898810.2982088023797610.85089559881012
1210.1460654492191740.2921308984383480.853934550780826
1220.1850908034884050.370181606976810.814909196511595
1230.1841339221542560.3682678443085130.815866077845744
1240.1744011046192420.3488022092384840.825598895380758
1250.1509588145727630.3019176291455260.849041185427237
1260.1211508876999490.2423017753998990.878849112300051
1270.09477429155194780.1895485831038960.905225708448052
1280.09242629017886620.1848525803577320.907573709821134
1290.1302268451496470.2604536902992950.869773154850352
1300.1126165170909610.2252330341819220.887383482909039
1310.09419782492921260.1883956498584250.905802175070787
1320.0836187819287560.1672375638575120.916381218071244
1330.08194509887316450.1638901977463290.918054901126836
1340.0729533502478810.1459067004957620.92704664975212
1350.1715120388681580.3430240777363170.828487961131842
1360.1366285669904160.2732571339808330.863371433009584
1370.1142398417889620.2284796835779230.885760158211038
1380.1609553139341110.3219106278682210.83904468606589
1390.391954458218440.783908916436880.60804554178156
1400.3377506037674250.675501207534850.662249396232575
1410.4814081405487280.9628162810974570.518591859451272
1420.390283213132020.780566426264040.60971678686798
1430.5534319600366770.8931360799266450.446568039963323
1440.4997416852793470.9994833705586930.500258314720653
1450.4030767509351620.8061535018703230.596923249064838
1460.2986133808187430.5972267616374870.701386619181257
1470.2901804484839530.5803608969679060.709819551516047
1480.1729023858608620.3458047717217240.827097614139138


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level100.072463768115942NOK
5% type I error level290.210144927536232NOK
10% type I error level390.282608695652174NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/10l3bz1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/10l3bz1290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/1eke51290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/1eke51290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/2eke51290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/2eke51290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/3eke51290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/3eke51290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/47bwq1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/47bwq1290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/57bwq1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/57bwq1290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/602dt1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/602dt1290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/702dt1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/702dt1290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/8abue1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/8abue1290537972.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/9abue1290537972.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905378826xof9dbomza62ea/9abue1290537972.ps (open in new window)


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