Home » date » 2010 » Dec » 22 »

Meervoudige lineaire regressie

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


Multiple Linear Regression - Estimated Regression Equation
CM[t] = -2.63961096398292 + 0.772391502321592DA[t] + 0.419767875666413PC[t] + 0.558040238534683PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-2.639610963982922.498439-1.05650.2923820.146191
DA0.7723915023215920.1303735.924500
PC0.4197678756664130.1359813.0870.0023960.001198
PS0.5580402385346830.0862926.466900


Multiple Linear Regression - Regression Statistics
Multiple R0.62120705296726
R-squared0.385898202656269
Adjusted R-squared0.374012361417358
F-TEST (value)32.4670500723958
F-TEST (DF numerator)3
F-TEST (DF denominator)155
p-value2.22044604925031e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.52785891001842
Sum Squared Residuals3177.73347790015


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12426.6040503013487-2.60405030134868
22523.1658445302531.83415546974703
31722.0940882113184-5.09408821131842
41820.5899946013665-2.58999460136646
51819.5943171833506-1.59431718335056
61620.2995644366609-4.29956443666092
72020.7143815252657-0.714381525265727
81623.3090676801828-7.30906768018284
91822.1437122579171-4.14371225791705
101720.5139157004478-3.51391570044783
112323.0414576063537-0.0414576063537089
123021.42953035269938.5704696473007
132316.10780338927426.89219661072581
141818.9158738857624-0.915873885762416
151522.0497640531836-7.0497640531836
161217.1961129884055-5.19611298840554
172120.36670868567220.63329131432785
181514.71022739940670.289772600593319
192018.75478143201771.24521856798227
203125.62624218714765.37375781285238
212725.55909793813641.44090206186361
223426.05494471472147.94505528527856
232120.37165947273380.628340527266247
243121.5767373674759.42326263252503
251920.3756433375796-1.37564333757956
261620.1523574218852-4.15235742188524
272020.781525774277-0.781525774276961
282118.69258797006812.3074120299319
292221.48278916274150.517210837258484
301719.1074050586729-2.10740505867291
312421.55391727659862.44608272340145
322530.9439852857269-5.94398528572692
332624.13870185739251.86129814260754
342524.33518381736460.664816182635437
351722.0408294012762-5.0408294012762
363228.42042724466683.57957275533316
373324.00042949452428.9995705054758
381321.3041765065842-8.30417650658423
393227.29142825084434.70857174915574
402525.7506291110469-0.750629111046883
412926.88059502708532.11940497291474
422222.0408294012762-0.0408294012761991
431816.25501040404991.74498959595014
441720.3617578986105-3.36175789861055
452022.9514932664661-2.95149326646606
461521.1480348399012-6.14803483990115
472022.4162731188078-2.41627311880779
483328.54976495562774.4502350443723
492922.39345302793146.60654697206862
502325.0632511615513-2.06325116155133
512624.23265006212591.76734993787409
521819.3889005714711-1.38890057147105
532019.6032518352580.396748164742037
541112.0444131306325-1.04441313063253
552828.6760857239586-0.676085723958564
562624.15258729636151.84741270363853
572222.9514932664661-0.951493266466062
581719.4510940334207-2.45109403342068
591216.7230863026969-4.7230863026969
601420.1169679156578-6.11696791565783
611721.4827891627415-4.48278916274152
622120.99587703806390.00412296193613052
631922.9604279183735-3.96042791837347
641824.5723551720279-6.57235517202789
651017.785907969724-7.78590796972404
662925.25478233446183.74521766553817
673119.174549307684111.8254506923159
681922.7371420026792-3.73714200267915
69920.5228503523552-11.5228503523552
702023.165844530253-3.16584453025297
712817.638700954948410.3612990450516
721918.96913269580460.0308673041953589
733023.15690987834566.84309012165443
742926.39863368946922.60136631053079
752620.7815257742775.21847422572304
762319.6032518352583.39674816474204
771322.4113223317462-9.4113223317462
782122.6838831926369-1.68388319263693
791922.8221555555052-3.8221555555052
802822.32630877892015.67369122107986
812326.3225547885506-3.32255478855057
821814.83956511036753.16043488963246
832120.58999460136650.410005398633535
842021.688205774621-1.68820577462102
852320.87547397901042.12452602098959
862119.95587546191311.04412453808686
872121.6921896394668-0.692189639466823
881524.3669385601484-9.36693856014838
892827.57292376364240.427076236357593
901917.50936324398751.4906367560125
912621.01869712894034.98130287105972
921014.3437183337825-4.34371833378249
931617.4422189949763-1.44221899497627
942219.87979656099452.1202034390055
951920.2284363228039-1.22843632280388
963127.97880620033983.02119379966019
973125.21540896338865.78459103661139
982924.15753808342314.84246191657693
991917.29501198020061.70498801979941
1002218.48717135818863.5128286418114
1012322.11690830219480.883091697805162
1021515.8885013384257-0.888501338425677
1032019.67039608426920.329603915730803
1041819.4560448204823-1.45604482048229
1052323.5323535958772-0.532353595877158
1062519.7593935019415.24060649805895
1072116.5226204778794.477379522121
1082419.11235584573454.88764415426549
1092525.0682019486129-0.0682019486129373
1101719.0630809005381-2.06308090053809
1111314.2904595237403-1.29045952374027
1122818.62145985621119.37854014378894
1132121.5499334117528-0.54993341175275
1142526.9159845333127-1.91598453331267
115922.795351599783-13.795351599783
1161617.3572054421502-1.35720544215022
1171919.303887018645-0.303887018645008
1181719.5361075862467-2.53610758624673
1192524.22866619728010.771333802719888
1202014.79029016517115.20970983482888
1212922.0448132661226.955186733878
1221418.2817547463091-4.28175474630909
1232226.742322664217-4.74232266421699
1241517.218933079282-2.21893307928195
1251926.3493587442728-7.34935874427279
1262020.9336835761142-0.933683576114239
1271517.4954778050185-2.49547780501849
1282022.6078042917183-2.60780429171829
1291820.5810599494591-2.58105994945906
1303326.04105927575246.95894072424757
1312223.8671079187175-1.86710791871753
1321616.5986993787976-0.59869937879764
1331719.2456774215412-2.24567742154118
1341615.26331685087980.736683149120239
1352117.37109088111923.62890911888077
1362626.1082035247637-0.108203524763664
1371820.5228503523552-2.52285035235523
1381822.1258429541022-4.12584295410224
1391719.0362769448159-2.03627694481587
1402225.1353461976242-3.13534619762417
1413024.78670643581485.2132935641852
1423027.00993273804612.99006726195388
1432428.288072591076-4.28807259107597
1442122.7639459584014-1.76394595840137
1452124.853850684826-3.85385068482603
1462927.30434676759751.69565323240253
1473122.04082940127628.9591705987238
1482018.96913269580461.03086730419536
1491613.6702258232562.32977417674405
1502218.89800458194763.1019954180524
1512021.0540866351677-1.0540866351677
1522826.46976180332631.53023819667375
1533824.978237608725313.0217623912747
1542217.43328434306894.56671565693114
1552024.7066436700504-4.70664367005035
1561717.4332843430689-0.433284343068862
1572824.92497879868313.07502120131693
1582223.8760425706249-1.87604257062493
1593125.92162313891485.07837686108523


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.2494454926883990.4988909853767970.750554507311601
80.2489135378199180.4978270756398360.751086462180082
90.1955654580817610.3911309161635220.80443454191824
100.1137537322191480.2275074644382970.886246267780852
110.1185198660072890.2370397320145790.88148013399271
120.5786517028245710.8426965943508580.421348297175429
130.5328396152491570.9343207695016860.467160384750843
140.4602275087526180.9204550175052360.539772491247382
150.4711191692527940.9422383385055880.528880830747206
160.4099401107668880.8198802215337760.590059889233112
170.3360909365220850.672181873044170.663909063477915
180.2982215458058880.5964430916117760.701778454194112
190.2548809413165530.5097618826331070.745119058683447
200.3661822394313120.7323644788626230.633817760568688
210.3341717345970870.6683434691941750.665828265402913
220.4523744925729730.9047489851459470.547625507427027
230.3935067024532090.7870134049064180.606493297546791
240.5680746414365030.8638507171269930.431925358563497
250.5079188808386880.9841622383226230.492081119161312
260.4694073277000540.9388146554001080.530592672299946
270.4193917822947580.8387835645895160.580608217705242
280.3706988198909910.7413976397819830.629301180109008
290.3221864167330260.6443728334660510.677813583266974
300.2704954167668110.5409908335336230.729504583233189
310.2726512164782150.545302432956430.727348783521785
320.3171818138437370.6343636276874740.682818186156263
330.3162050831692980.6324101663385960.683794916830702
340.3122984603020820.6245969206041650.687701539697918
350.3004602815158260.6009205630316520.699539718484174
360.280113328678690.560226657357380.71988667132131
370.4607407350064780.9214814700129570.539259264993522
380.6799637178745540.6400725642508920.320036282125446
390.6811926261820620.6376147476358750.318807373817938
400.632580956578670.7348380868426590.367419043421329
410.588149836935560.823700326128880.41185016306444
420.5357950383035610.9284099233928780.464204961696439
430.491160897503270.982321795006540.50883910249673
440.4596476755181130.9192953510362270.540352324481887
450.425933434943740.851866869887480.57406656505626
460.4693597098500480.9387194197000960.530640290149952
470.4369731243559420.8739462487118840.563026875644058
480.4304584855447680.8609169710895360.569541514455232
490.4918327431349360.9836654862698720.508167256865064
500.4548157773659180.9096315547318360.545184222634082
510.4110626162914250.822125232582850.588937383708575
520.3657574864114240.7315149728228480.634242513588576
530.3211046548087230.6422093096174450.678895345191277
540.2806188429710230.5612376859420450.719381157028977
550.24145339335190.4829067867038010.7585466066481
560.209636175609060.419272351218120.79036382439094
570.1770783607629390.3541567215258780.822921639237061
580.1531871776433390.3063743552866790.84681282235666
590.1489917355438920.2979834710877850.851008264456108
600.1758750192959150.3517500385918290.824124980704085
610.1722898908404930.3445797816809870.827710109159506
620.1437750967318640.2875501934637270.856224903268136
630.1372990084284320.2745980168568650.862700991571568
640.1707792492894870.3415584985789740.829220750710513
650.2244700097132550.4489400194265090.775529990286745
660.2130908913705440.4261817827410870.786909108629457
670.4795843409340180.9591686818680350.520415659065982
680.4637214584483220.9274429168966440.536278541551678
690.6941741431305420.6116517137389160.305825856869458
700.6728774616437770.6542450767124450.327122538356223
710.8325238678218630.3349522643562730.167476132178137
720.8026104851504960.3947790296990080.197389514849504
730.8385701780436540.3228596439126920.161429821956346
740.8185345431454510.3629309137090970.181465456854549
750.8281822046318370.3436355907363250.171817795368163
760.8157433900440650.368513219911870.184256609955935
770.8994403851732650.2011192296534690.100559614826735
780.88085212605680.2382957478864010.1191478739432
790.8747228972772730.2505542054454540.125277102722727
800.8871843605903130.2256312788193740.112815639409687
810.8772558731566580.2454882536866840.122744126843342
820.8655806169531660.2688387660936690.134419383046834
830.8397011785584650.320597642883070.160298821441535
840.8144036875489520.3711926249020960.185596312451048
850.7906821538852530.4186356922294940.209317846114747
860.7579360684129360.4841278631741280.242063931587064
870.7217766089546890.5564467820906220.278223391045311
880.8415317302199130.3169365395601740.158468269780087
890.8121426079553770.3757147840892450.187857392044623
900.7829485483633370.4341029032733250.217051451636663
910.7878238915033640.4243522169932720.212176108496636
920.7863313514237520.4273372971524970.213668648576248
930.7585950782687570.4828098434624870.241404921731243
940.7272363735124610.5455272529750780.272763626487539
950.6897526999278620.6204946001442760.310247300072138
960.6687559772067090.6624880455865820.331244022793291
970.690049515868690.6199009682626210.309950484131311
980.6982479932412490.6035040135175020.301752006758751
990.660270546761350.6794589064773010.339729453238651
1000.6397674662367460.7204650675265070.360232533763254
1010.5956903907112350.808619218577530.404309609288765
1020.5524341049406030.8951317901187940.447565895059397
1030.504323617412250.99135276517550.49567638258775
1040.4604672095538480.9209344191076970.539532790446152
1050.4129681422015290.8259362844030590.587031857798471
1060.4179021294870510.8358042589741020.582097870512949
1070.4107272138138590.8214544276277170.589272786186141
1080.4194267057369740.8388534114739480.580573294263026
1090.3715885978371570.7431771956743140.628411402162843
1100.3387994336304770.6775988672609540.661200566369523
1110.2988847292036040.5977694584072090.701115270796396
1120.4840179021038630.9680358042077270.515982097896137
1130.4355008625674740.8710017251349480.564499137432526
1140.3904632610713460.7809265221426920.609536738928654
1150.7989048450159630.4021903099680740.201095154984037
1160.7707105779949180.4585788440101630.229289422005082
1170.7360442484636250.527911503072750.263955751536375
1180.7114282057013280.5771435885973430.288571794298672
1190.6645508851428050.670898229714390.335449114857195
1200.7024950866813280.5950098266373440.297504913318672
1210.7283843889617170.5432312220765670.271615611038283
1220.7139724933121340.5720550133757310.286027506687866
1230.7269951946256410.5460096107487180.273004805374359
1240.6984703719572450.6030592560855090.301529628042755
1250.7706828945077680.4586342109844650.229317105492232
1260.7283638046610940.5432723906778130.271636195338906
1270.7184880913902320.5630238172195370.281511908609768
1280.7059462305679850.588107538864030.294053769432015
1290.6799683983628550.640063203274290.320031601637145
1300.7107144728881550.578571054223690.289285527111845
1310.6723871486036610.6552257027926780.327612851396339
1320.6140126534801070.7719746930397870.385987346519893
1330.614038638855040.7719227222899190.38596136114496
1340.5571466467388970.8857067065222060.442853353261103
1350.522888232299670.954223535400660.47711176770033
1360.4609865068410440.9219730136820870.539013493158956
1370.4381027647732490.8762055295464980.561897235226751
1380.4606017152199030.9212034304398070.539398284780097
1390.4366347877867420.8732695755734840.563365212213258
1400.4024887820632430.8049775641264860.597511217936757
1410.3785809301951940.7571618603903870.621419069804806
1420.3086414042104430.6172828084208860.691358595789557
1430.267056737105740.5341134742114790.73294326289426
1440.2443597391242370.4887194782484740.755640260875763
1450.2716270885039090.5432541770078190.728372911496091
1460.2235954223814960.4471908447629930.776404577618504
1470.3029082348730740.6058164697461490.697091765126925
1480.2240380109713990.4480760219427980.7759619890286
1490.1606611315191450.3213222630382890.839338868480855
1500.1228244569557060.2456489139114120.877175543044294
1510.07650794476830910.1530158895366180.92349205523169
1520.06427578522215680.1285515704443140.935724214777843


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


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/19y4e1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/19y4e1293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/29y4e1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/29y4e1293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/328lz1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/328lz1293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/428lz1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/428lz1293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/528lz1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/528lz1293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/6dzl21293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/6dzl21293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/7dzl21293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/7dzl21293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/8oqkn1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/8oqkn1293044284.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/9oqkn1293044284.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930442442xqa52wnlvepbgp/9oqkn1293044284.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