Home » date » 2010 » Dec » 10 »

*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: Fri, 10 Dec 2010 14:50:29 +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/Dec/10/t1291992621hswuu1auz2oe6nq.htm/, Retrieved Fri, 10 Dec 2010 15:50: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/Dec/10/t1291992621hswuu1auz2oe6nq.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 «
23 13 14 22 11 23 8 1 6 15 20 12 7 20 22 24 4 2 5 23 26 26 22 25 23 24 7 2 20 26 19 16 12 23 21 21 4 2 12 19 17 18 15 20 19 21 4 2 11 19 17 12 9 22 12 19 5 2 12 16 21 18 20 18 24 12 15 1 11 23 18 20 10 22 21 21 5 1 9 22 16 18 12 23 21 25 7 2 13 19 26 24 23 28 26 27 4 2 9 24 20 17 10 19 18 21 4 1 14 19 14 19 11 26 21 27 7 1 12 25 22 12 20 27 22 20 8 1 18 23 23 25 11 23 26 16 4 2 9 31 25 23 22 27 20 26 8 1 15 29 24 22 19 23 20 24 4 2 12 18 24 23 20 23 26 25 5 2 12 17 16 16 16 19 27 25 16 1 12 22 16 16 12 21 27 27 7 1 15 21 20 15 14 25 16 23 4 2 11 24 20 24 14 22 26 22 6 1 13 22 15 18 9 13 20 10 4 1 10 16 22 23 19 12 25 25 5 2 17 22 20 18 17 20 16 18 4 1 13 21 20 19 14 24 20 21 4 1 17 25 24 17 19 23 20 20 6 1 15 22 27 22 20 25 24 18 4 1 13 24 25 22 20 28 24 25 4 1 17 25 13 8 9 24 22 28 4 1 21 29 15 12 10 18 18 27 8 1 12 19 19 22 6 19 21 20 5 2 12 29 20 16 15 24 17 20 4 1 15 25 11 12 9 22 15 20 10 2 8 19 28 28 24 28 28 27 4 2 15 27 21 15 11 24 23 23 4 1 16 25 25 17 4 28 19 23 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PE[t] = + 8.53915846784639 + 0.0328034599961517`I/ToKnow`[t] -0.11938165883205`I/Accomp.`[t] + 0.0235331791205159`I/Exp.Stimulation`[t] -0.00277426290252649`E/Identified`[t] + 0.130427824598309`E/Introjected`[t] -1.11540755578888e-05`E/Ext.Regulation`[t] -0.0560877663415208Amotivation[t] -1.30866706505860gender[t] + 0.224081627325535PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.539158467846392.9776812.86770.0047840.002392
`I/ToKnow`0.03280345999615170.1057260.31030.7568240.378412
`I/Accomp.`-0.119381658832050.093553-1.27610.2040680.102034
`I/Exp.Stimulation`0.02353317912051590.0712810.33010.7417890.370895
`E/Identified`-0.002774262902526490.102188-0.02710.978380.48919
`E/Introjected`0.1304278245983090.0783871.66390.0984010.049201
`E/Ext.Regulation`-1.11540755578888e-050.083525-1e-040.9998940.499947
Amotivation-0.05608776634152080.109442-0.51250.6091290.304564
gender-1.308667065058600.582139-2.2480.026160.01308
PS0.2240816273255350.0667863.35520.0010240.000512


Multiple Linear Regression - Regression Statistics
Multiple R0.384075787173551
R-squared0.147514210292983
Adjusted R-squared0.0919173109642641
F-TEST (value)2.65328124543061
F-TEST (DF numerator)9
F-TEST (DF denominator)138
p-value0.00723210258212192
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.22509740153913
Sum Squared Residuals1435.37294841919


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1611.0484119477087-5.0484119477087
2513.0532314339314-8.05323143393135
32012.55224475010507.44775524989498
41211.62552357382820.374476426171776
51111.1392200130443-0.139220013044329
61210.06745725315331.93254274684670
71113.6339159287121-2.63391592871215
8912.9957255638590-3.99572556385905
91311.12004196084891.87995803915113
10912.9175685141238-3.9175685141238
111412.42035965962511.57964034037493
121213.5563319350571-1.55633193505712
131814.48971045816743.51028954183258
14913.9999437264796-4.99994372647963
151514.40555613954760.594443860452394
161210.88344026050981.11655973949023
171211.28997818064550.710021819354517
181213.7227240441565-1.72272404415652
191513.90372876346641.09627123653356
201112.2874732305774-1.28747323057742
211313.2739787675797-0.273978767579683
221011.7188065611581-1.71880656115805
231712.22133528548984.77866471451018
241312.65027705941520.349722940584771
251713.86720315708023.13279684291977
261513.57321121265001.42678878735005
271314.1747703456721-1.17477034567209
281714.32484418576882.67515581423116
292115.9902153686275.00978463137301
301212.6316069268877-0.631606926887657
311212.9638712587123-0.963871258712325
321513.85760899297751.14239100702247
33810.6537148631648-2.65371486316477
341513.46228250908161.53771749091835
351614.69819488068681.30180511931315
36912.1362744794507-3.13627447945073
371312.01122474824250.988775251757525
381114.3134232838367-3.31342328383673
39912.5466307129125-3.54663071291247
401512.83881440716342.16118559283659
41913.6501263783843-4.65012637838426
421511.53090447799603.46909552200398
431412.31667408759891.68332591240113
44812.5896265559029-4.58962655590291
451112.1409810271029-1.14098102710295
461412.27389815126271.72610184873733
471412.21657114761391.78342885238612
481212.0613608846806-0.0613608846805687
491513.29788588212761.70211411787241
501112.1771579222283-1.17715792222827
511113.3347178838296-2.33471788382955
52913.4125362056837-4.4125362056837
53811.6233399264475-3.6233399264475
541312.73381233914120.26618766085885
551211.20770948998060.792290510019423
562413.949311562075810.0506884379242
571111.5962189454810-0.596218945480953
581113.5192504378576-2.51925043785763
591611.62762379157874.37237620842127
601212.1941943299722-0.194194329972162
611812.35485508954785.64514491045225
621210.13681587524021.86318412475978
631410.20971489227153.79028510772851
641612.31383374845573.68616625154431
652412.753512116177711.2464878838223
661314.0294753400870-1.02947534008696
671111.9964734149453-0.996473414945308
681414.1571264702155-0.157126470215545
691612.69500498296753.30499501703254
701212.7588020136760-0.758802013676048
712115.79396801694255.20603198305751
721110.61908098891270.380919011087297
73612.3975164448178-6.39751644481782
74911.7725603310556-2.77256033105557
751413.53324659426120.466753405738816
761614.19711256569831.80288743430174
771815.50313017855232.49686982144766
78912.6476070099501-3.64760700995009
791313.7266582277665-0.726658227766493
801711.84000077680865.15999922319145
811113.0321385055612-2.03213850556118
821613.86777128328542.13222871671458
831114.2279342055268-3.22793420552682
841113.4640027143945-2.46400271439448
851111.7253846302890-0.725384630288966
862014.02946995410985.97053004589023
871012.2911931399818-2.29119313998178
881211.54882527284970.451174727150334
891112.1627516813086-1.16275168130863
901413.85797388037450.142026119625547
911214.0342034893621-2.0342034893621
921213.4478357959972-1.44783579599725
931215.7216194477623-3.72161944776231
941010.8067618846480-0.806761884648027
951211.73147979309450.268520206905495
961011.9969492247895-1.99694922478945
971010.9231171730596-0.923117173059569
981311.95882155809831.04117844190168
991213.2531303858511-1.25313038585109
1001313.6559155607580-0.655915560757962
101913.2402851926328-4.24028519263278
1021412.63347293821581.3665270617842
1031411.68749801549442.31250198450557
1041212.5497007875942-0.549700787594184
1051814.25399943483003.74600056517004
1061713.67326346491583.32673653508419
1071210.98722287946421.01277712053576
1081513.55744614081381.44255385918618
109813.9907315023649-5.99073150236493
110810.0003198674303-2.00031986743034
1111214.8082032436240-2.80820324362396
1121013.8550444291371-3.85504442913713
1131815.16978143360162.83021856639844
1141514.37441779854990.625582201450097
1151612.63431699870643.36568300129361
1161112.7939835667638-1.79398356676378
1171012.4098640068407-2.40986400684074
118711.7178592967391-4.71785929673908
1191713.05018306275873.94981693724126
120714.8367467384094-7.83674673840944
1211411.39331265347092.60668734652914
1221213.2600220533565-1.26002205335645
1231513.60146133419311.39853866580686
1241312.05236871707590.94763128292408
1251010.994055356021-0.994055356020998
1261614.07394035176611.92605964823386
1271111.4209241542991-0.420924154299101
128711.6517221633458-4.65172216334577
1291510.49508048043674.50491951956334
1301813.2509914077624.749008592238
1311113.5846881044724-2.58468810447241
1321311.25941139222951.74058860777048
1331110.92767643576380.0723235642361557
1341311.49873491500451.50126508499545
1351210.48596624142401.51403375857603
1361112.7161361153613-1.71613611536130
1371114.7726911029711-3.77269110297114
1381313.0473882440804-0.0473882440803908
139810.2894162447455-2.28941624474551
1401212.5135941052091-0.513594105209136
141910.7237593763653-1.72375937636527
1421413.06249886292350.93750113707646
1431814.20631462091853.79368537908148
1441513.64307986828071.35692013171928
145911.8114280234618-2.81142802346185
1461114.4573987634984-3.45739876349843
1471714.54374439858202.45625560141803
1481211.38930128359200.610698716407979


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.9914484576753620.01710308464927540.00855154232463768
140.9915531655770440.01689366884591140.00844683442295568
150.9822002931348720.03559941373025650.0177997068651282
160.9660598268983820.06788034620323670.0339401731016184
170.9435817001520690.1128365996958620.0564182998479312
180.9161231191184990.1677537617630030.0838768808815014
190.9111970527773540.1776058944452930.0888029472226463
200.8748539559223930.2502920881552130.125146044077607
210.824468467033070.3510630659338590.175531532966930
220.7756166363169250.4487667273661510.224383363683075
230.7696187280683060.4607625438633880.230381271931694
240.7184266836157060.5631466327685870.281573316384294
250.7298005480322750.5403989039354490.270199451967725
260.6738076497840760.6523847004318480.326192350215924
270.6069880795894460.7860238408211090.393011920410554
280.5645196095962970.8709607808074050.435480390403703
290.5800928281149890.8398143437700220.419907171885011
300.5141550641627670.9716898716744660.485844935837233
310.4925873597810620.9851747195621250.507412640218938
320.4278618615339090.8557237230678170.572138138466091
330.3929368958496630.7858737916993250.607063104150337
340.3381403192719980.6762806385439970.661859680728001
350.3172568985939460.6345137971878910.682743101406054
360.3408564516935190.6817129033870380.659143548306481
370.2945372640874610.5890745281749220.705462735912539
380.3770305675815550.754061135163110.622969432418445
390.3779721799507250.755944359901450.622027820049275
400.3284548921785360.6569097843570720.671545107821464
410.3952065110427910.7904130220855830.604793488957209
420.3859620324563730.7719240649127460.614037967543627
430.3967083843972090.7934167687944190.60329161560279
440.4513024998643990.9026049997287970.548697500135601
450.3984565422236260.7969130844472520.601543457776374
460.3711279070361060.7422558140722120.628872092963894
470.3281352083984460.6562704167968910.671864791601554
480.2820532807758600.5641065615517190.71794671922414
490.2443607776738090.4887215553476170.755639222326191
500.2405801244365390.4811602488730790.75941987556346
510.2187091379536000.4374182759072010.7812908620464
520.2536888363657920.5073776727315840.746311163634208
530.2441426959927480.4882853919854960.755857304007252
540.2081143066512990.4162286133025990.7918856933487
550.1730588930888480.3461177861776970.826941106911152
560.645982434635280.7080351307294390.354017565364719
570.5985615315658870.8028769368682250.401438468434113
580.5686135029955090.8627729940089810.431386497004491
590.5986467450961080.8027065098077840.401353254903892
600.5547958645984580.8904082708030840.445204135401542
610.6914974799109270.6170050401781450.308502520089073
620.6620495178962080.6759009642075830.337950482103792
630.6820246449229310.6359507101541390.317975355077069
640.7103181171227190.5793637657545610.289681882877281
650.97971379665950.04057240668099890.0202862033404994
660.9750132846527280.04997343069454450.0249867153472723
670.9674894038781080.0650211922437840.032510596121892
680.9574216796583580.08515664068328370.0425783203416419
690.9588900926654210.08221981466915790.0411099073345789
700.9478675342634170.1042649314731650.0521324657365826
710.9686612304408770.06267753911824540.0313387695591227
720.9595222731859710.0809554536280580.040477726814029
730.9805112634098350.03897747318033030.0194887365901652
740.9820898466129820.03582030677403520.0179101533870176
750.9769385022198160.04612299556036770.0230614977801838
760.9724777139994870.05504457200102640.0275222860005132
770.969745458165140.06050908366972020.0302545418348601
780.970376073198620.05924785360276170.0296239268013809
790.9612158736356890.07756825272862250.0387841263643113
800.9864547653707820.0270904692584350.0135452346292175
810.9842423824050170.03151523518996540.0157576175949827
820.9836093882347670.03278122353046520.0163906117652326
830.983491654807720.03301669038455930.0165083451922797
840.9816131112306030.03677377753879360.0183868887693968
850.9756646290851170.04867074182976680.0243353709148834
860.988075472980740.02384905403851850.0119245270192593
870.9861562289604020.02768754207919580.0138437710395979
880.9809500982626060.03809980347478780.0190499017373939
890.974718669512310.05056266097538110.0252813304876905
900.9658854422115270.06822911557694650.0341145577884733
910.9580030094775090.0839939810449820.041996990522491
920.9467270392432960.1065459215134080.0532729607567041
930.9584770052932530.08304598941349450.0415229947067472
940.9463731538502010.1072536922995970.0536268461497987
950.9343011843558110.1313976312883770.0656988156441886
960.9183741089037570.1632517821924870.0816258910962434
970.8990443289498510.2019113421002970.100955671050149
980.8747249857416760.2505500285166480.125275014258324
990.8633629878863340.2732740242273320.136637012113666
1000.8361835372084510.3276329255830970.163816462791549
1010.8670523781442570.2658952437114860.132947621855743
1020.8433492284485440.3133015431029120.156650771551456
1030.8462332683320070.3075334633359870.153766731667994
1040.809820903355880.3803581932882410.190179096644121
1050.8198363391292470.3603273217415070.180163660870753
1060.8649169385969450.270166122806110.135083061403055
1070.8335437641141430.3329124717717140.166456235885857
1080.8291964155869910.3416071688260180.170803584413009
1090.871652059323160.2566958813536790.128347940676839
1100.870574238714740.258851522570520.12942576128526
1110.8431041655444530.3137916689110940.156895834455547
1120.8469770872921260.3060458254157470.153022912707874
1130.8579362590792140.2841274818415720.142063740920786
1140.8191580881067830.3616838237864340.180841911893217
1150.820790594036690.3584188119266200.179209405963310
1160.783219125064350.43356174987130.21678087493565
1170.7509868862217570.4980262275564870.249013113778243
1180.7354076393750830.5291847212498350.264592360624917
1190.7585417392860550.482916521427890.241458260713945
1200.947095872317890.1058082553642220.0529041276821108
1210.926090714817990.1478185703640190.0739092851820096
1220.9115793244855850.1768413510288290.0884206755144146
1230.8848871641396850.230225671720630.115112835860315
1240.8511171491382170.2977657017235660.148882850861783
1250.811219435108530.3775611297829400.188780564891470
1260.8080623169201470.3838753661597060.191937683079853
1270.7642247562549610.4715504874900770.235775243745039
1280.862550954683090.2748980906338200.137449045316910
1290.8549042678313650.290191464337270.145095732168635
1300.873776964491180.252446071017640.12622303550882
1310.8112276600521420.3775446798957160.188772339947858
1320.717723672072990.564552655854020.28227632792701
1330.6087209955482570.7825580089034860.391279004451743
1340.6446004829417890.7107990341164230.355399517058211
1350.5131894608836680.9736210782326640.486810539116332


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level170.138211382113821NOK
10% type I error level310.252032520325203NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/10dmxm1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/10dmxm1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/17lis1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/17lis1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/2iciv1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/2iciv1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/3iciv1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/3iciv1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/4iciv1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/4iciv1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/5s3hg1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/5s3hg1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/6s3hg1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/6s3hg1291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/7luy11291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/7luy11291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/8luy11291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/8luy11291992617.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/9dmxm1291992617.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291992621hswuu1auz2oe6nq/9dmxm1291992617.ps (open in new window)


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