Home » date » 2010 » Dec » 02 »

Paper model

*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: Thu, 02 Dec 2010 12:04:19 +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/02/t129129141976wihzz02st81s8.htm/, Retrieved Thu, 02 Dec 2010 13:03:54 +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/02/t129129141976wihzz02st81s8.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 «
66 4818 4488 5 73 68 0 4964 1 54 3132 2916 12 58 54 1 3132 1 82 5576 3362 11 68 41 1 2788 1 61 3782 2989 6 62 49 1 3038 1 65 4225 3185 12 65 49 1 3185 1 77 6237 5544 11 81 72 1 5832 1 66 4818 5148 12 73 78 1 5694 1 66 4224 3828 7 64 58 0 3712 1 66 4488 3828 8 68 58 1 3944 1 48 2448 1104 13 51 23 1 1173 1 57 3876 2223 12 68 39 1 2652 1 80 4880 5040 13 61 63 1 3843 1 60 4140 2760 12 69 46 1 3174 1 70 5110 4060 12 73 58 1 4234 1 85 5185 3315 11 61 39 0 2379 1 59 3658 2596 12 62 44 0 2728 1 72 4536 3528 12 63 49 1 3087 1 70 4830 3990 12 69 57 1 3933 1 74 3478 5624 11 47 76 0 3572 1 70 4620 4410 13 66 63 0 4158 1 51 2958 918 9 58 18 1 1044 1 70 4410 2800 11 63 40 0 2520 1 71 4899 4189 11 69 59 1 4071 1 72 4248 4464 11 59 62 0 3658 1 50 2950 3500 9 59 70 1 4130 1 69 4347 4485 11 63 65 0 4095 1 73 4745 4088 12 65 56 0 3640 1 66 4290 2970 12 65 45 1 2925 1 73 5183 4161 10 71 57 0 4047 1 58 3480 2900 12 60 50 1 3000 1 78 6318 3120 12 81 40 0 3240 1 83 5561 4814 12 67 58 1 3886 1 76 5016 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
Vrienden_vinden[t] = + 17.6345996892029 -0.181159874985208Groepsgevoel[t] + 0.00145155830344216InteractieGR_NV[t] + 0.00217752371159492InteractieGR_U[t] + 0.0389399054811559NVC[t] -0.00437109904214467Uitingsangst[t] -0.146541157879546Geslacht[t] -0.00243327707071304InteractieNV_U[t] -2.36746598370249Leeftijd[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.63459968920298.8508471.99240.0483120.024156
Groepsgevoel-0.1811598749852080.135777-1.33420.1843370.092168
InteractieGR_NV0.001451558303442160.0019620.740.4605630.230281
InteractieGR_U0.002177523711594920.0010921.99450.0480830.024042
NVC0.03893990548115590.1455220.26760.789420.39471
Uitingsangst-0.004371099042144670.101495-0.04310.9657110.482855
Geslacht-0.1465411578795460.313971-0.46670.6414310.320715
InteractieNV_U-0.002433277070713040.001576-1.5440.1249020.062451
Leeftijd-2.367465983702491.300442-1.82050.0708640.035432


Multiple Linear Regression - Regression Statistics
Multiple R0.350079775474221
R-squared0.122555849196081
Adjusted R-squared0.0713182345505966
F-TEST (value)2.39191168527362
F-TEST (DF numerator)8
F-TEST (DF denominator)137
p-value0.0191049602741371
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.73130022144076
Sum Squared Residuals410.643862576234


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1510.5435072663380-5.54350726633796
21210.63535043196921.36464956803080
31111.3649286560521-0.364928656052079
4610.8760465970390-4.87604659703897
51210.98037006004431.01962993995574
61110.94538410595160.0546158940484499
71210.01412850606911.98587149393088
8710.9838307180645-3.98383071806446
9810.8117402938128-2.81174029381285
101311.41348535038131.58651464961872
111211.28574478702530.714255212974731
121311.43499778798551.5650022120145
131211.03297836857880.967021631421218
141210.98420473660211.01579526339795
151111.0294604595230-0.0294604595229894
161211.12531884373710.874681156262936
171211.07115754256290.92884245743706
181211.00636962722880.99363037277125
191111.962522423801-0.962522423800994
201311.07210984864851.92789015135146
21911.8136086255253-2.81360862552530
221111.2308928326117-0.230892832611686
231111.0141600599458-0.0141600599457506
241111.2358269862543-0.23582698625434
2599.90807197249024-0.908071972490241
261111.0480431260908-0.0480431260908234
271211.26100768693280.738992313067167
281211.07553031134390.924469688656142
291011.2946740208515-1.29467402085151
301210.79756962270581.20243037729425
311212.1969534711554-0.196953471155447
321211.53877302291050.46122697708947
33911.3757298206751-2.37572982067514
34911.1246130241807-2.12461302418067
351210.87421625074501.12578374925498
361411.37361914268692.62638085731313
371211.94094685793650.0590531420635451
381110.56357433737810.436425662621931
39911.1161007889729-2.11610078897293
401111.1837247804429-0.183724780442889
4179.44390614943709-2.44390614943709
421511.12601505071783.87398494928216
431110.80056140512780.199438594872224
441211.60915302210650.390846977893515
451210.85803168963431.14196831036571
46911.7529551632901-2.75295516329012
471210.67084358653441.32915641346557
481111.3356938666300-0.335693866629967
491110.59634472107270.403655278927346
50811.2144594572438-3.21445945724382
51710.4830697611230-3.48306976112299
521211.69746517962830.302534820371736
53811.6294592252584-3.62945922525844
541010.4163907913601-0.416390791360069
551210.35173349577031.64826650422973
561511.07179808685263.92820191314744
571211.57780197865640.422198021343571
581211.25847894150870.741521058491282
591210.92630262066021.07369737933984
601210.63855328817051.36144671182951
6189.69360106617084-1.69360106617084
621011.1769303169177-1.17693031691771
631412.08409569096971.91590430903026
641010.9295821259906-0.929582125990552
651210.99160086091801.00839913908201
661411.03757055127322.96242944872684
67611.2833989583816-5.28339895838157
681110.75986615019610.240133849803944
691011.1999714110604-1.19997141106044
701412.64381217628831.35618782371166
711211.03069282845140.969307171548573
721311.21661143102211.78338856897793
731110.93109759514560.0689024048544474
741110.92684111543360.073158884566371
751211.19079039392680.809209606073198
761310.92355534204212.07644465795791
771210.36833848391271.63166151608731
78810.2308629658036-2.23086296580362
791211.37859865260420.62140134739584
801111.2255177481915-0.225517748191538
811011.1395103063947-1.13951030639467
821211.00588435933640.994115640663582
831111.122227310061-0.122227310060990
841211.03833164693680.961668353063216
851211.00894360696780.991056393032151
861010.6969990986762-0.6969990986762
871211.35351832567240.646481674327636
881211.02121975722870.978780242771261
891111.2985559580985-0.298555958098510
901010.9543690738741-0.95436907387409
911211.31959969674820.680400303251784
921111.0203031384541-0.0203031384540535
931210.50376280616291.49623719383712
94129.788329167622962.21167083237704
95109.785651063710630.214348936289374
961111.0497925283835-0.0497925283834792
971010.9373494642369-0.937349464236905
981111.0853205359066-0.0853205359065512
991110.71454391914980.285456080850211
1001211.21230177853070.787698221469252
1011110.87945181875940.120548181240594
1021110.67638714433690.323612855663097
10376.760983413714670.239016586285329
1041210.69164206377511.30835793622489
10588.2390165862852-0.239016586285199
1061011.0130575946915-1.01305759469147
1071211.21542784087110.784572159128858
1081111.0269899566807-0.0269899566807348
1091311.24114404268911.7588559573109
110911.3928956093908-2.39289560939079
1111111.2565965548330-0.25659655483305
1121311.19361903786231.80638096213773
113810.7837760268410-2.78377602684097
1141211.10607620192950.893923798070503
1151110.58403276127040.415967238729583
1161110.82230033967080.177699660329158
1171210.84534366982401.15465633017597
1181311.28915128433941.71084871566059
1191111.2386203775146-0.238620377514557
1201010.7900008924281-0.790000892428113
1211010.8637324932235-0.863732493223543
1221010.8773544333450-0.877354433344983
1231211.00277096514460.99722903485538
1241211.17818103490830.821818965091681
1251310.92814880357982.07185119642024
1261110.99235632984970.00764367015026635
1271110.24364622849200.756353771507987
1281211.03465660947240.965343390527581
129910.7078332365051-1.70783323650509
1301111.8009655208978-0.800965520897843
1311210.86519889806841.13480110193162
1321210.86477629337721.13522370662279
1331310.89668230600692.10331769399306
134610.8447872605399-4.84478726053989
1351111.8123422676052-0.812342267605178
1361011.7635305294252-1.76353052942524
1371211.09483219472160.905167805278443
1381111.0648559834634-0.0648559834634111
1391212.1150880599938-0.115088059993787
1401211.08138040097080.918619599029181
141711.0928525819036-4.0928525819036
1421211.07790905440610.922090945593855
1431212.1345107291208-0.134510729120844
144910.9876059933981-1.98760599339813
1451211.13508706807930.864912931920652
1461211.21226146490710.787738535092876


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.9979396202406630.004120759518674710.00206037975933735
130.9961929613019930.007614077396014850.00380703869800742
140.9927766552903620.01444668941927550.00722334470963775
150.9936328734857290.01273425302854200.00636712651427102
160.9985547460258260.002890507948348680.00144525397417434
170.997110240263350.005779519473298890.00288975973664945
180.9951852839311810.009629432137637880.00481471606881894
190.9919646263790970.01607074724180690.00803537362090344
200.9973456352759740.005308729448052310.00265436472402615
210.9987823189673430.00243536206531290.00121768103265645
220.9980449213914850.003910157217029530.00195507860851476
230.9965698209787550.006860358042489430.00343017902124472
240.9943950206250890.01120995874982250.00560497937491126
250.991579823082310.01684035383538070.00842017691769034
260.9877412994922860.02451740101542720.0122587005077136
270.9845299589168520.03094008216629520.0154700410831476
280.9787337763715940.04253244725681310.0212662236284065
290.9706848692939330.05863026141213370.0293151307060669
300.9634327477565370.0731345044869250.0365672522434625
310.9500587813865920.09988243722681660.0499412186134083
320.9335500820137150.1328998359725700.0664499179862851
330.9362866384555270.1274267230889460.0637133615444731
340.9488533341076870.1022933317846260.0511466658923131
350.9358900407740950.1282199184518100.0641099592259049
360.964431302531440.0711373949371230.0355686974685615
370.9521296828360720.09574063432785540.0478703171639277
380.9365621815874480.1268756368251040.0634378184125522
390.9436916717999220.1126166564001570.0563083282000785
400.9267953539718580.1464092920562850.0732046460281425
410.9276856843871810.1446286312256370.0723143156128187
420.9683799932946370.06324001341072680.0316200067053634
430.9574385616162610.08512287676747730.0425614383837386
440.9481023733865030.1037952532269950.0518976266134973
450.9471489693290960.1057020613418090.0528510306709044
460.962085475255320.07582904948935990.0379145247446800
470.9609508501263040.07809829974739240.0390491498736962
480.9485189214252550.102962157149490.051481078574745
490.9363454204574240.1273091590851530.0636545795425764
500.9660200880155030.06795982396899490.0339799119844975
510.9830319020512350.03393619589752960.0169680979487648
520.9769904666237930.04601906675241480.0230095333762074
530.9911470822651610.01770583546967730.00885291773483863
540.987859087220040.02428182555991940.0121409127799597
550.9875341216082270.02493175678354640.0124658783917732
560.9974164279820380.005167144035923430.00258357201796172
570.996276937585170.007446124829659710.00372306241482986
580.9949821424707150.01003571505857070.00501785752928536
590.9939575347186250.01208493056274950.00604246528137474
600.9930482422490530.01390351550189360.00695175775094682
610.9938573923807540.01228521523849170.00614260761924585
620.9923998360010580.01520032799788510.00760016399894255
630.9930357266206170.01392854675876630.00696427337938313
640.9909809710864530.01803805782709490.00901902891354744
650.9885522432328290.02289551353434170.0114477567671708
660.99377638695580.01244722608839980.00622361304419989
670.9998425375269070.0003149249461869130.000157462473093457
680.999761657144740.0004766857105186090.000238342855259304
690.999719890111550.000560219776901690.000280109888450845
700.9995937490234860.000812501953027980.00040625097651399
710.9994656702056380.001068659588723870.000534329794361937
720.9994557842862730.001088431427453070.000544215713726535
730.9991534312290740.001693137541851750.000846568770925875
740.9987170018719730.002565996256054270.00128299812802714
750.9982388968788460.003522206242307080.00176110312115354
760.99849166450820.003016670983598110.00150833549179905
770.9984767158136250.003046568372750310.00152328418637516
780.9988808564570520.002238287085896470.00111914354294824
790.9983550865888330.003289826822333840.00164491341116692
800.9975406814754310.004918637049137520.00245931852456876
810.9971888882692060.005622223461587750.00281111173079387
820.9963666578334050.007266684333190060.00363334216659503
830.9947989893770670.01040202124586590.00520101062293293
840.9933127031275610.01337459374487740.00668729687243872
850.9915667362873160.01686652742536780.00843326371268388
860.9901647784721980.01967044305560370.00983522152780186
870.9874870259994320.02502594800113670.0125129740005683
880.9835301023255150.03293979534897110.0164698976744855
890.9778004237531760.04439915249364840.0221995762468242
900.973173588893320.05365282221336050.0268264111066802
910.966633307380790.06673338523842050.0333666926192102
920.9552960785666280.08940784286674350.0447039214333717
930.9495962239024180.1008075521951640.050403776097582
940.9619971137982070.07600577240358540.0380028862017927
950.9494240676167640.1011518647664710.0505759323832355
960.9333392999988740.1333214000022530.0666607000011263
970.9196959594256080.1606080811487840.080304040574392
980.9016060078225670.1967879843548650.0983939921774327
990.8787952545206720.2424094909586550.121204745479328
1000.8681378947307570.2637242105384860.131862105269243
1010.8353963356508760.3292073286982490.164603664349124
1020.798736079722160.4025278405556810.201263920277840
1030.7616157587417570.4767684825164870.238384241258243
1040.7228844579039410.5542310841921180.277115542096059
1050.6727917935109190.6544164129781620.327208206489081
1060.6318529285240990.7362941429518020.368147071475901
1070.6130449199762840.7739101600474320.386955080023716
1080.5557833755338780.8884332489322440.444216624466122
1090.5272923699612710.945415260077460.47270763003873
1100.5157802372212750.968439525557450.484219762778725
1110.4603330883175680.9206661766351360.539666911682432
1120.4470187027898250.894037405579650.552981297210175
1130.5387877953035210.9224244093929590.461212204696479
1140.4925634267630990.9851268535261970.507436573236901
1150.4285483370226730.8570966740453460.571451662977327
1160.3678938122645550.7357876245291090.632106187735445
1170.3427457860107160.6854915720214320.657254213989284
1180.3796605012446450.7593210024892890.620339498755355
1190.3184950307886810.6369900615773610.68150496921132
1200.2715109003627030.5430218007254050.728489099637297
1210.2309118855413310.4618237710826610.76908811445867
1220.1902981331986220.3805962663972430.809701866801378
1230.1523703000905810.3047406001811630.847629699909419
1240.1141194740306150.228238948061230.885880525969385
1250.1548344369915040.3096688739830080.845165563008496
1260.1121409239720260.2242818479440510.887859076027974
1270.0914304705322510.1828609410645020.908569529467749
1280.07661206227742630.1532241245548530.923387937722574
1290.07689433624960980.1537886724992200.92310566375039
1300.04950371313699040.09900742627398080.95049628686301
1310.03865517199292720.07731034398585450.961344828007073
1320.02680978403793710.05361956807587420.973190215962063
1330.01379996423650090.02759992847300180.9862000357635
1340.2209972606090310.4419945212180630.779002739390969


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level270.219512195121951NOK
5% type I error level570.463414634146341NOK
10% type I error level740.601626016260163NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/10zpu41291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/10zpu41291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/1s6fb1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/1s6fb1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/2s6fb1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/2s6fb1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/3lgww1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/3lgww1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/4lgww1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/4lgww1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/5lgww1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/5lgww1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/6epvh1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/6epvh1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/7epvh1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/7epvh1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/8oyck1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/8oyck1291291447.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/9oyck1291291447.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129129141976wihzz02st81s8/9oyck1291291447.ps (open in new window)


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