Home » date » 2010 » Nov » 23 »

time effect

*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 21:38:35 +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/t1290548219lx541v2k2f70luq.htm/, Retrieved Tue, 23 Nov 2010 22:37:09 +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/t1290548219lx541v2k2f70luq.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 «
14 9 23 26 9 15 6 11 13 4 18 9 21 20 9 15 6 12 16 4 11 9 21 21 9 14 13 15 19 6 12 9 21 31 14 10 8 10 15 8 16 9 24 21 8 10 7 12 14 8 18 9 22 18 8 12 9 11 13 4 14 9 21 26 11 18 5 5 19 4 14 9 22 22 10 12 8 16 15 5 15 9 21 22 9 14 9 11 14 5 15 9 20 29 15 18 11 15 15 8 17 9 22 15 14 9 8 12 16 4 19 9 21 16 11 11 11 9 16 4 10 9 21 24 14 11 12 11 16 4 18 9 23 17 6 17 8 15 17 4 14 9 22 19 20 8 7 12 15 4 14 9 23 22 9 16 9 16 15 8 17 9 22 31 10 21 12 14 20 4 14 9 24 28 8 24 20 11 18 4 16 9 23 38 11 21 7 10 16 4 18 9 21 26 14 14 8 7 16 4 14 9 23 25 11 7 8 11 19 8 12 9 23 25 16 18 16 10 16 3 17 9 21 29 14 18 10 11 17 4 9 9 20 28 11 13 6 16 17 4 16 9 32 15 11 11 8 14 16 4 14 9 22 18 12 13 9 12 15 10 11 9 21 21 9 13 9 12 14 5 16 9 21 25 7 18 11 11 15 4 13 9 21 23 13 14 12 6 12 4 17 9 22 23 10 12 8 14 14 4 15 9 21 19 9 9 7 9 16 4 14 9 21 18 9 12 8 15 14 4 16 9 21 18 13 8 9 12 7 10 9 9 22 26 16 5 4 12 10 4 15 9 21 18 12 10 8 9 14 8 17 9 21 18 6 11 8 13 16 4 13 9 21 28 14 11 8 15 16 4 15 9 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 16.8555988203748 -0.0786345448628769Month[t] + 0.0176147950614903Age[t] -0.0124312897250591Concern_over_mistakes[t] -0.249744352622465Doubts_about_actions[t] + 0.0885995494564707Parental_expectations[t] -0.0926244834865925Parental_criticism[t] + 0.0351359704360569Popularity[t] + 0.0421600459244758Perceived_learning_competence[t] -0.142798650718867Amotivation[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.85559882037484.6148833.65240.0003720.000186
Month-0.07863454486287690.384686-0.20440.8383410.419171
Age0.01761479506149030.0627890.28050.7794970.389748
Concern_over_mistakes-0.01243128972505910.038788-0.32050.7490910.374545
Doubts_about_actions-0.2497443526224650.07832-3.18880.0017790.000889
Parental_expectations0.08859954945647070.0695851.27330.2051320.102566
Parental_criticism-0.09262448348659250.086807-1.0670.2878830.143941
Popularity0.03513597043605690.0637960.55080.5827180.291359
Perceived_learning_competence0.04216004592447580.0896180.47040.6388050.319402
Amotivation-0.1427986507188670.073836-1.9340.0552230.027611


Multiple Linear Regression - Regression Statistics
Multiple R0.419882877183372
R-squared0.176301630551787
Adjusted R-squared0.120978605738101
F-TEST (value)3.18676773631822
F-TEST (DF numerator)9
F-TEST (DF denominator)134
p-value0.00159616503008553
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.23501532220863
Sum Squared Residuals669.369327727986


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11415.1187435064363-1.11874350643635
21815.31971776287322.68028223712679
31114.5166062869294-3.51660628692941
41212.6223785088577-0.622378508857652
51614.41873828546171.58126171453826
61814.90665128296863.09334871703138
71414.9845927958550-0.984592795854973
81414.5672631956204-0.567263195620417
91514.66612747050300.33387252949702
101512.98648473799612.01351526200391
111713.43392097973573.56607902026433
121913.94702568996155.05297431003849
131013.0759897716792-3.07598977167917
141816.28099236921121.71900763078882
151411.84759459320632.15240540679370
161414.6680001054871-0.668000105487062
171715.16560653872591.83439346127412
181415.0726934805885-1.07269348058852
191615.00039630508030.999603694919672
201813.54687989280064.4531201071994
211413.41940640096290.58059359903707
221212.9566609593639-0.956660959363893
231713.86143918214683.13856081785317
24914.7086687735221-5.70866877352209
251614.60677302800301.39322697199697
261413.25893757990700.741062420092959
271114.6250951812076-3.62509518120762
281615.48243023406880.517569765931228
291313.2596440265179-0.259644026517915
301714.58519856981762.41480143018237
311514.60251936106470.397480638935307
321414.9146205464400-0.914620546439961
331612.21130031754493.78869968245507
34912.5608275480887-3.56082754808873
351513.20617796416781.79382203583218
361715.58930220582771.41069779417228
371313.5373064284695-0.537306428469528
381513.80735525013061.19264474986939
391613.95928579262792.04071420737206
401617.0569149648932-1.05691496489316
411213.9100914487873-1.91009144878734
421113.4714638472947-2.47146384729472
431515.2844491754492-0.284449175449200
441714.94687237750832.05312762249165
451314.3551518351716-1.35515183517163
461611.81172197926924.18827802073083
471414.2388318808711-0.238831880871055
481113.5181277155191-2.51812771551909
491213.2180225913502-1.21802259135017
501214.0125858833841-2.01258588338413
511514.06452610741460.935473892585384
521615.16433943133680.835660568663244
531514.86564454093330.134355459066687
541215.0194526107514-3.01945261075140
551214.4780397816004-2.47803978160035
56812.8834643798061-4.88346437980607
571315.4410597590180-2.44105975901798
581114.9545700845368-3.95457008453676
591414.726401615604-0.726401615604001
601513.20757791587071.79242208412926
611014.0220843152958-4.02208431529579
621112.741917967334-1.74191796733400
631213.8374257407787-1.83742574077869
641513.12246733997531.87753266002472
651514.48424365735470.515756342645343
661413.75316391253900.246836087460958
671613.19250206173592.80749793826409
681514.92770128224550.0722987177544991
691515.2427298471073-0.242729847107324
701314.8170685028367-1.81706850283673
711714.83754966062202.16245033937797
721313.3745828755644-0.37458287556444
731513.74397569067251.25602430932753
741314.554042127295-1.55404212729500
751514.06711020946670.932889790533274
761614.52157870748081.47842129251923
771514.54615632285560.453843677144362
781614.21173582212131.78826417787872
791514.31803959853450.681960401465486
801414.7377088005423-0.737708800542279
811512.29900489760072.70099510239928
82711.6715508490726-4.67155084907257
831714.98051134228222.0194886577178
841314.5147066422741-1.51470664227414
851513.63075274509091.36924725490912
861413.84630597941310.153694020586945
871313.7154514978716-0.715451497871638
881615.26640009257370.733599907426265
891214.1509407882566-2.15094078825657
901415.5285006361618-1.52850063616180
911714.67389233711392.32610766288613
921515.4878392217852-0.487839221785187
931713.22650107346383.77349892653621
941213.9346446367192-1.93464463671918
951615.36004819446620.639951805533752
961114.0844254755203-3.08442547552025
971513.23414243321271.76585756678735
98914.0630057963438-5.06300579634381
991614.7229951777141.27700482228601
1001013.0708203937425-3.07082039374252
1011013.2045645870976-3.20456458709756
1021514.87642840071640.123571599283556
1031113.9252878062601-2.92528780626008
1041315.1863686071566-2.18636860715656
1051413.2253255602870.774674439713003
1061814.61842802115423.38157197884583
1071615.08349590900750.916504090992459
1081412.30089992839211.69910007160793
1091413.17718914541810.82281085458187
1101413.19818070633110.801819293668948
1111414.3127438182216-0.312743818221648
1121213.7001098309657-1.70010983096573
1131414.4638814051687-0.463881405168717
1141514.31180477630150.68819522369848
1151514.96467339662960.0353266033704079
1161313.5736718031087-0.573671803108669
1171714.88198994324682.11801005675318
1181715.35501007993491.64498992006510
1191914.93870160441314.06129839558688
1201513.86072298340531.13927701659474
1211314.0527081029942-1.05270810299424
122912.1771991614099-3.17719916140986
1231515.0418790087624-0.0418790087624142
1241514.55877216243330.441227837566655
1251613.84999065452792.15000934547209
1261113.2810069511133-2.28100695111328
1271414.5860703071595-0.58607030715945
1281112.6338756957475-1.63387569574755
1291513.36792842483991.63207157516014
1301313.3853231292893-0.385323129289257
1311612.68708874602283.31291125397724
1321414.6631349353270-0.663134935327046
1331514.79541022988230.204589770117651
1341613.01481939340492.98518060659512
1351615.44027817894360.559721821056384
1361112.4000225370024-1.4000225370024
1371313.9992080202958-0.999208020295785
1381614.60677302800301.39322697199697
1391213.9855072458696-1.98550724586963
140911.4645641357693-2.46456413576929
1411311.45945819780431.54054180219571
1421314.5147066422741-1.51470664227414
1431914.93870160441314.06129839558688
1441315.4912077042297-2.49120770422968


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.3322780628833770.6645561257667540.667721937116623
140.2955050947336140.5910101894672290.704494905266386
150.2284169015238910.4568338030477820.771583098476109
160.2611218336345780.5222436672691570.738878166365422
170.8844310599731620.2311378800536770.115568940026838
180.8439213940264720.3121572119470550.156078605973528
190.8247768821057810.3504462357884380.175223117894219
200.8609604941132420.2780790117735170.139039505886758
210.8437480755395990.3125038489208030.156251924460402
220.826544263636890.3469114727262180.173455736363109
230.8360774408520320.3278451182959360.163922559147968
240.9242466920226340.1515066159547330.0757533079773663
250.9017390286783140.1965219426433710.0982609713216856
260.8985352335096540.2029295329806910.101464766490346
270.9434899675832270.1130200648335460.0565100324167729
280.9225907846665780.1548184306668430.0774092153334216
290.9126349200892240.1747301598215520.0873650799107759
300.9251648441969680.1496703116060650.0748351558030323
310.9006288692491860.1987422615016280.0993711307508142
320.8742568795831960.2514862408336080.125743120416804
330.8857929350241820.2284141299516370.114207064975819
340.9063201188249060.1873597623501870.0936798811750935
350.8915063985457880.2169872029084240.108493601454212
360.8808555174175880.2382889651648240.119144482582412
370.8558988706108630.2882022587782730.144101129389137
380.8404262524335940.3191474951328120.159573747566406
390.842074098261360.3158518034772810.157925901738640
400.8374759904881770.3250480190236460.162524009511823
410.8059204223174530.3881591553650940.194079577682547
420.8349453941053310.3301092117893380.165054605894669
430.8011864263517010.3976271472965970.198813573648299
440.794353793798660.411292412402680.20564620620134
450.7544914076925550.491017184614890.245508592307445
460.8190808621366070.3618382757267860.180919137863393
470.7991735649358040.4016528701283910.200826435064195
480.8922260165482250.2155479669035490.107773983451775
490.8797576415570830.2404847168858330.120242358442917
500.879902999743860.2401940005122800.120097000256140
510.8683986963800830.2632026072398330.131601303619917
520.8576584154891450.2846831690217090.142341584510855
530.8393275030921140.3213449938157720.160672496907886
540.8428166829989750.3143666340020500.157183317001025
550.8260994258447120.3478011483105760.173900574155288
560.9103817421284370.1792365157431270.0896182578715633
570.9170857605330730.1658284789338550.0829142394669274
580.9449888718118370.1100222563763260.0550111281881629
590.932381847479050.1352363050419000.0676181525209498
600.9275725585469790.1448548829060420.072427441453021
610.9377821156155680.1244357687688630.0622178843844316
620.9206514657428240.1586970685143520.0793485342571758
630.9084315102283420.1831369795433160.0915684897716579
640.9408544802851240.1182910394297530.0591455197148765
650.9322296499463830.1355407001072340.0677703500536172
660.9169844555131970.1660310889736050.0830155444868027
670.9325983465736520.1348033068526960.0674016534263478
680.919698832441190.1606023351176200.0803011675588101
690.8993872582135290.2012254835729420.100612741786471
700.8918996625138420.2162006749723170.108100337486158
710.8921269678804450.2157460642391090.107873032119555
720.8678204506489470.2643590987021070.132179549351053
730.8523018583264130.2953962833471740.147698141673587
740.8446433144034290.3107133711931420.155356685596571
750.8189480917704970.3621038164590050.181051908229503
760.8071306650226270.3857386699547450.192869334977373
770.7713592698553010.4572814602893980.228640730144699
780.7524921494744440.4950157010511120.247507850525556
790.7124360025542890.5751279948914220.287563997445711
800.6729591080750290.6540817838499430.327040891924971
810.7000611181122970.5998777637754060.299938881887703
820.8075441751191320.3849116497617370.192455824880868
830.7937127245196450.412574550960710.206287275480355
840.7735345617773080.4529308764453850.226465438222692
850.7476856144155190.5046287711689620.252314385584481
860.7041961349170910.5916077301658180.295803865082909
870.6631400501832790.6737198996334420.336859949816721
880.6288839106445970.7422321787108060.371116089355403
890.6207656585914150.758468682817170.379234341408585
900.5970051185754950.8059897628490090.402994881424505
910.5978015510077490.8043968979845030.402198448992251
920.551321561243370.897356877513260.44867843875663
930.7130618602975120.5738762794049770.286938139702488
940.6927476036924810.6145047926150380.307252396307519
950.6575477007229880.6849045985540230.342452299277012
960.689220830765640.6215583384687220.310779169234361
970.696625686589850.60674862682030.303374313410150
980.8920049093597080.2159901812805840.107995090640292
990.8756425167593720.2487149664812550.124357483240628
1000.870715518163810.2585689636723820.129284481836191
1010.8784209260663220.2431581478673550.121579073933678
1020.8456585687517920.3086828624964160.154341431248208
1030.870243530475920.2595129390481610.129756469524080
1040.9004827314243740.1990345371512530.0995172685756264
1050.8917922110558750.2164155778882500.108207788944125
1060.8948558609484350.210288278103130.105144139051565
1070.8751359347496610.2497281305006790.124864065250339
1080.9077121136824790.1845757726350420.092287886317521
1090.8843507196601210.2312985606797580.115649280339879
1100.8896438512680330.2207122974639340.110356148731967
1110.858569104463660.282861791072680.14143089553634
1120.8408035329728980.3183929340542030.159196467027101
1130.7996217304501130.4007565390997740.200378269549887
1140.7475147678424770.5049704643150450.252485232157523
1150.7052170946459460.5895658107081090.294782905354054
1160.6392145496768320.7215709006463350.360785450323168
1170.7021546413742850.5956907172514310.297845358625716
1180.7317228112421650.5365543775156700.268277188757835
1190.7329518663941420.5340962672117150.267048133605858
1200.7445716642724330.5108566714551330.255428335727567
1210.7450668992546210.5098662014907570.254933100745379
1220.699730761916120.6005384761677590.300269238083879
1230.6294170560574650.741165887885070.370582943942535
1240.5447883431201380.9104233137597230.455211656879862
1250.5043979768689210.9912040462621580.495602023131079
1260.4193942817926160.8387885635852320.580605718207384
1270.3276369241760150.655273848352030.672363075823985
1280.2980516248592430.5961032497184860.701948375140757
1290.2219259469627770.4438518939255530.778074053037223
1300.2292170712372450.458434142474490.770782928762755
1310.9811689859046720.03766202819065660.0188310140953283


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/4d0191290548303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/4d0191290548303.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/5d0191290548303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/5d0191290548303.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/6d0191290548303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/6d0191290548303.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/7590u1290548303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290548219lx541v2k2f70luq/7590u1290548303.ps (open in new window)


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


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


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by