Home » date » 2010 » Dec » 03 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 03 Dec 2010 11:31: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/03/t1291375827zpiqtf1vzfzz6g2.htm/, Retrieved Fri, 03 Dec 2010 12:30:39 +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/03/t1291375827zpiqtf1vzfzz6g2.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 «
4 4 5 4 4 4 4 4 4 4 4 3 4 4 5 5 4 4 5 5 4 3 3 2 3 4 4 3 2 3 2 3 2 4 3 5 4 3 3 4 5 4 4 3 3 3 3 4 4 2 3 4 4 2 4 2 4 4 3 4 4 5 3 4 3 2 3 2 2 3 4 3 2 4 4 4 4 2 3 2 4 2 3 2 5 4 2 5 5 5 4 3 4 2 3 3 4 4 4 3 4 4 4 4 4 4 3 3 4 4 5 4 3 2 3 3 3 3 3 4 4 4 4 4 4 4 2 3 2 2 2 4 2 4 2 4 4 3 4 4 3 3 2 4 4 4 3 3 2 4 4 2 3 4 4 4 2 4 4 4 4 4 4 3 4 4 4 4 4 4 4 4 4 4 4 4 3 3 4 3 4 3 5 4 4 4 4 4 4 3 4 3 2 4 4 4 1 4 4 4 4 4 4 4 2 4 4 4 3 4 4 2 4 4 4 4 4 3 4 3 2 4 4 4 3 2 4 4 4 3 4 4 5 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 3 2 3 3 5 4 4 4 2 4 4 4 4 4 3 3 3 3 4 4 4 4 3 4 3 4 4 3 3 4 4 3 3 3 4 4 4 4 3 4 4 2 3 2 3 2 3 2 2 2 4 2 2 5 2 4 3 4 4 4 5 4 4 4 4 4 2 4 4 5 4 4 4 4 5 5 4 3 2 4 4 4 4 4 3 3 4 3 4 3 4 4 2 4 4 4 4 5 4 2 4 4 4 4 3 3 4 3 3 4 3 2 2 4 2 1 4 4 4 4 4 4 4 4 4 4 4 3 4 4 4 3 2 3 4 4 2 4 3 2 2 5 2 2 4 2 4 4 4 4 4 4 4 4 3 4 4 4 4 4 4 3 4 4 3 4 4 3 4 4 4 3 4 4 2 3 2 3 1 4 3 4 4 4 4 4 4 4 5 3 4 4 2 4 4 4 4 3 4 4 4 4 5 4 4 5 5 5 5 4 4 2 4 3 4 4 3 3 2 3 3 4 3 3 3 2 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 time16 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 0.653455385234217 + 0.0261778726526484x1[t] + 0.228695811251476x2[t] + 0.164523727475987x3[t] + 0.101091007906319x4[t] + 0.197018661004521x5[t] + 0.0540437767073316x6[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.6534553852342170.4127871.5830.1155920.057796
x10.02617787265264840.0618730.42310.6728580.336429
x20.2286958112514760.0727593.14320.0020270.001014
x30.1645237274759870.0656362.50660.0132930.006647
x40.1010910079063190.0814261.24150.2164250.108212
x50.1970186610045210.0739422.66450.0085840.004292
x60.05404377670733160.0623170.86720.3872440.193622


Multiple Linear Regression - Regression Statistics
Multiple R0.55649571399397
R-squared0.309687479693659
Adjusted R-squared0.281122823680983
F-TEST (value)10.8416316848426
F-TEST (DF numerator)6
F-TEST (DF denominator)145
p-value5.9757754300449e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.643938914498158
Sum Squared Residuals60.1253122127345


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
143.968354624478880.0316453755211221
243.638567805321040.361432194678961
354.063946354790850.936053645209152
433.03752181388844-0.0375218138884397
522.83533979807580-0.835339798075795
653.543457935504411.45654206449559
743.219170393940920.780829606059077
823.4032113713474-1.40321137134740
943.653937886273070.346062113726933
1042.441302476066751.55869752393325
1143.256089318071750.743910681928247
1222.74880108783993-0.74880108783993
1353.744900587111231.25509941288877
1433.01665245534209-0.0166524553420947
1543.713480940574710.286519059425295
1643.681803790327750.31819620967225
1732.941930083576420.0580699164235791
1843.739658813227350.260341186772646
1922.61677229389248-0.616772293892475
2043.586212060015740.413787939984263
2133.20204554136442-0.202045541364422
2233.2881023911049-0.288102391104897
2343.28226719072440.717732809275598
2443.510963001975880.489036998024122
2543.739658813227350.260341186772646
2643.329650344709580.670349655290422
2753.739658813227351.26034118677265
2833.1819155470239-0.181915547023902
2913.73965881322735-2.73965881322735
3043.490284406917540.509715593082464
3143.687303067922060.312696932077943
3233.1819155470239-0.181915547023902
3333.49028440691754-0.490284406917536
3443.866927693786320.133072306213678
3543.739658813227350.260341186772646
3643.793702589934690.206297410065314
3733.39517453710091-0.395174537100912
3843.687303067922060.312696932077943
3933.32026140184724-0.320261401847241
4043.494913436391390.505086563608614
4133.27702541684053-0.277025416840526
4243.467047532336700.532952467663297
4332.526343918388580.47365608161142
4422.66027342166970-0.660273421669704
4533.84074982113367-0.840749821133673
4643.464655134982710.53534486501729
4744.03776848213819-0.0377684821381942
4833.68730306792206-0.687303067922057
4933.3519385520942-0.351938552094197
5043.741346844629390.258653155370612
5143.633259291214730.366740708785275
5233.04133306008071-0.0413330600807061
5322.78869600829644-0.788696008296438
5443.739658813227350.260341186772646
5543.408374726155520.591625273844479
5633.10550514385619-0.105505143856194
5722.58536028641603-0.585360286416033
5843.739658813227350.260341186772646
5933.73965881322735-0.739658813227354
6033.52109130904403-0.521091309044034
6143.467047532336700.532952467663297
6232.768017413238100.231982586761904
6343.793702589934690.206297410065314
6433.41061135827538-0.410611358275378
6543.767524717282040.232475282717963
6644.43098802086566-0.430988020865658
6743.468735563738740.531264436261263
6833.04302109148274-0.0430210914827404
6932.634431471803240.365568528196756
7033.68561503652002-0.685615036520023
7142.67979067160021.32020932839980
7232.559518336549570.440481663450427
7322.45278289175076-0.452782891750756
7443.842437852535710.157562147464292
7543.905870572105380.0941294278946235
7644.06394635479084-0.063946354790843
7732.51213518256440.487864817435603
7854.101201201707860.898798798292137
7933.30421183626275-0.304211836262749
8022.94193008357642-0.941930083576421
8133.31394434097136-0.313944340971357
8233.34643927449989-0.34643927449989
8343.356567581568050.643432418431954
8443.149420613495370.85057938650463
8533.40456347996325-0.404563479963249
8622.28825916427477-0.288259164274768
8743.457658589474370.542341410525634
8843.079327271203550.920672728796455
8932.725394172641410.274605827358593
9043.468735563738740.531264436261263
9133.1819155470239-0.181915547023902
9223.05431074367875-1.05431074367875
9333.46241850286285-0.462418502862853
9433.09537683678804-0.0953768367880378
9532.825133071931880.174866928068119
9643.287766468318710.712233531681291
9743.717292186766980.282707813233022
9842.962530259559001.03746974044100
9933.05431074367875-0.0543107436787454
10043.732662267719010.26733773228099
10143.123242740842720.87675725915728
10232.559182413763380.440817586236615
10343.788394075828380.211605924171624
10433.70409199771237-0.704091997712368
10543.597501712211740.402498287788257
10644.06563438619288-0.0656343861928771
10733.54895721309872-0.548957213098717
10833.49028440691754-0.490284406917536
10933.46873556373874-0.468735563738737
11033.41469178703141-0.414691787031405
11133.01549111021425-0.0154911102142459
11222.55918241376338-0.559182413763385
11343.548277728466260.451722271533743
11422.74015150918341-0.740151509183413
11533.1819155470239-0.181915547023902
11633.3519385520942-0.351938552094197
11733.12324274084272-0.123242740842721
11843.772153746755890.227846253244113
11943.165126617233590.83487338276641
12032.932541140714080.067458859285916
12143.659437163867370.340562836132626
12233.02846879381229-0.0284687938122853
12333.54895721309872-0.548957213098717
12433.44753028240621-0.447530282406210
12543.706484395066360.293515604933639
12623.04451835939678-1.04451835939678
12743.501574059113540.498425940886459
12833.46873556373874-0.468735563738737
12933.01052615795421-0.0105261579542077
13043.755364816965580.244635183034425
13143.219170393940920.780829606059078
13243.659437163867370.340562836132626
13333.23727643409322-0.237276434093219
13422.21402551365356-0.214025513653557
13543.739658813227350.260341186772646
13623.63157125981269-1.63157125981269
13733.32026140184724-0.320261401847241
13843.622182316950350.377817683049646
13933.211356065151-0.211356065151001
14033.01134394123578-0.0113439412357851
14133.35656758156805-0.356567581568046
14233.54264015222283-0.542640152222834
14343.739658813227350.260341186772646
14433.68730306792206-0.687303067922057
14533.56813854024302-0.568138540243022
14622.98584555321560-0.985845553215596
14723.73965881322735-1.73965881322735
14833.09074780731419-0.090747807314188
14943.633259291214730.366740708785275
15033.26621762513991-0.26621762513991
15143.57682311715340.423176882846600
15234.45716589351831-1.45716589351831


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.8274995044895730.3450009910208550.172500495510427
110.7339480420789010.5321039158421980.266051957921099
120.637407939688020.7251841206239620.362592060311981
130.5852027664335490.8295944671329030.414797233566451
140.8007089578616480.3985820842767050.199291042138352
150.7277200582524650.5445598834950690.272279941747535
160.6488644608148050.702271078370390.351135539185195
170.5554922876468620.8890154247062770.444507712353138
180.5126124726975880.9747750546048240.487387527302412
190.4328269580045820.8656539160091630.567173041995418
200.4131267671843440.8262535343686880.586873232815656
210.3863705068977690.7727410137955380.613629493102231
220.3313159066118430.6626318132236860.668684093388157
230.2935536519998740.5871073039997480.706446348000126
240.2529836403198360.5059672806396720.747016359680164
250.2136211410238040.4272422820476070.786378858976196
260.2993322015767410.5986644031534820.700667798423259
270.3502617405449910.7005234810899810.64973825945501
280.4461036756601550.892207351320310.553896324339845
290.99926042806130.001479143877399650.000739571938699827
300.9988850202273280.002229959545344590.00111497977267230
310.9982706626496380.003458674700723820.00172933735036191
320.9977070170580460.004585965883908910.00229298294195445
330.9977756988578040.004448602284392150.00222430114219608
340.9966861801424320.006627639715135040.00331381985756752
350.995160257547580.009679484904839080.00483974245241954
360.9938325636583030.01233487268339440.00616743634169719
370.9932556369871880.01348872602562340.00674436301281172
380.9908774644115270.01824507117694550.00912253558847276
390.9889314462508270.02213710749834550.0110685537491727
400.9909798339417270.01804033211654660.00902016605827328
410.9879482450953760.02410350980924730.0120517549046237
420.990244794171130.01951041165774110.00975520582887057
430.9895003267159260.02099934656814720.0104996732840736
440.9926541665113120.01469166697737520.0073458334886876
450.994946349478560.01010730104288070.00505365052144033
460.9939173558012220.01216528839755520.00608264419877758
470.991762279784670.01647544043065820.0082377202153291
480.9922901228090250.01541975438195090.00770987719097547
490.990102193513470.01979561297305910.00989780648652953
500.9866938728315840.02661225433683150.0133061271684158
510.9838971608469460.03220567830610850.0161028391530542
520.9781934288812530.04361314223749410.0218065711187471
530.9805712008150260.03885759836994860.0194287991849743
540.9750392269799040.0499215460401920.024960773020096
550.9742663978777260.05146720424454750.0257336021222737
560.9668699092596560.06626018148068870.0331300907403443
570.9641781788552920.07164364228941560.0358218211447078
580.9553564799322380.0892870401355240.044643520067762
590.9596688558753180.08066228824936360.0403311441246818
600.9549355428507060.0901289142985870.0450644571492935
610.951719934851950.09656013029609930.0482800651480496
620.9418662306528980.1162675386942040.0581337693471018
630.9285571111306210.1428857777387570.0714428888693786
640.9175698450268460.1648603099463080.0824301549731538
650.9011280289380750.1977439421238500.0988719710619248
660.893177768559810.2136444628803780.106822231440189
670.8849946712340710.2300106575318580.115005328765929
680.8601996413077630.2796007173844750.139800358692237
690.8424834935402610.3150330129194780.157516506459739
700.8437816775912910.3124366448174170.156218322408709
710.9160043927301530.1679912145396930.0839956072698466
720.9061474007334410.1877051985331180.093852599266559
730.8985575833444750.2028848333110500.101442416655525
740.8781588646123540.2436822707752910.121841135387646
750.8563153404253340.2873693191493330.143684659574666
760.8283226480480680.3433547039038640.171677351951932
770.8136217318882020.3727565362235970.186378268111798
780.861130342824750.2777393143505000.138869657175250
790.8407117374991460.3185765250017080.159288262500854
800.8725598147478730.2548803705042550.127440185252127
810.8528871341980.2942257316040010.147112865802001
820.8303086565606130.3393826868787750.169691343439387
830.8301406077350880.3397187845298240.169859392264912
840.8587890001179170.2824219997641670.141210999882083
850.8399214604409780.3201570791180440.160078539559022
860.8263990831960870.3472018336078270.173600916803913
870.8164916010910380.3670167978179250.183508398908962
880.8397219758758160.3205560482483690.160278024124184
890.8133099031780640.3733801936438720.186690096821936
900.8019443795762260.3961112408475490.198055620423774
910.7677257849917930.4645484300164140.232274215008207
920.8238467701526690.3523064596946620.176153229847331
930.805206185375650.3895876292486990.194793814624349
940.7693964383555090.4612071232889820.230603561644491
950.7339258922754980.5321482154490040.266074107724502
960.7610805760999650.4778388478000710.238919423900035
970.74264266866320.51471466267360.2573573313368
980.8251959022326040.3496081955347920.174804097767396
990.7902421315182710.4195157369634580.209757868481729
1000.7728715693277240.4542568613445520.227128430672276
1010.8273719091750640.3452561816498730.172628090824936
1020.8309916940377550.3380166119244900.169008305962245
1030.8059177867912120.3881644264175760.194082213208788
1040.7989346411222550.4021307177554910.201065358877745
1050.7897700036785320.4204599926429370.210229996321468
1060.7512969151142980.4974061697714050.248703084885702
1070.7263747337252670.5472505325494670.273625266274733
1080.6961225238476620.6077549523046760.303877476152338
1090.6739700548254460.6520598903491090.326029945174554
1100.6525921771279130.6948156457441730.347407822872087
1110.5993192955135180.8013614089729640.400680704486482
1120.5643548092172370.8712903815655270.435645190782763
1130.5207155441217830.9585689117564340.479284455878217
1140.5607369494414130.8785261011171750.439263050558587
1150.5045214951943250.990957009611350.495478504805675
1160.4539180586546780.9078361173093560.546081941345322
1170.3962904419207430.7925808838414870.603709558079257
1180.3660587554944590.7321175109889190.63394124450554
1190.4336331478306660.8672662956613320.566366852169334
1200.3765013030519220.7530026061038430.623498696948078
1210.3651540937393250.730308187478650.634845906260675
1220.3079998209083940.6159996418167880.692000179091606
1230.2765351958120850.553070391624170.723464804187915
1240.2412639791640140.4825279583280280.758736020835986
1250.2091794326990670.4183588653981330.790820567300933
1260.2686974119761870.5373948239523750.731302588023813
1270.2579838878216630.5159677756433260.742016112178337
1280.2401661713100170.4803323426200330.759833828689983
1290.1886648031849770.3773296063699550.811335196815023
1300.1765020738193290.3530041476386570.823497926180671
1310.2986901677541510.5973803355083030.701309832245849
1320.3710203697447290.7420407394894580.628979630255271
1330.4036062027014080.8072124054028170.596393797298592
1340.3246255994097490.6492511988194990.675374400590251
1350.5181351202324710.9637297595350570.481864879767529
1360.5126037956557770.9747924086884470.487396204344223
1370.4115393062598270.8230786125196540.588460693740173
1380.3677397107086460.7354794214172920.632260289291354
1390.2773267381808590.5546534763617180.722673261819141
1400.2081804929321240.4163609858642470.791819507067876
1410.1432616379092710.2865232758185420.856738362090729
1420.08228315945039160.1645663189007830.917716840549608


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level70.0526315789473684NOK
5% type I error level260.195488721804511NOK
10% type I error level330.248120300751880NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/10e39z1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/10e39z1291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/1p2cn1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/1p2cn1291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/2itt81291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/2itt81291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/3itt81291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/3itt81291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/4bkaa1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/4bkaa1291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/5bkaa1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/5bkaa1291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/6bkaa1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/6bkaa1291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/73uaw1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/73uaw1291375857.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/8e39z1291375857.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291375827zpiqtf1vzfzz6g2/8e39z1291375857.ps (open in new window)


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