Home » date » 2010 » Dec » 14 »

Personal standards - Multiple regression

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 14 Dec 2010 16:32:11 +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/14/t1292344246nruc4h8rloxd4gw.htm/, Retrieved Tue, 14 Dec 2010 17:30:56 +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/14/t1292344246nruc4h8rloxd4gw.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 «
25 11 7 8 23 25 17 6 17 8 25 30 18 8 12 9 19 22 16 10 12 7 29 22 20 10 11 4 25 25 16 11 11 11 21 23 18 16 12 7 22 17 17 11 13 7 25 21 30 12 16 10 18 19 23 8 11 10 22 15 18 12 10 8 15 16 21 9 9 9 20 22 31 14 17 11 20 23 27 15 11 9 21 23 21 9 14 13 21 19 16 8 15 9 24 23 20 9 15 6 24 25 17 9 13 6 23 22 25 16 18 16 24 26 26 11 18 5 18 29 25 8 12 7 25 32 17 9 17 9 21 25 32 12 18 12 22 28 22 9 14 9 23 25 17 9 16 5 23 25 20 14 14 10 24 18 29 10 12 8 23 25 23 14 17 7 21 25 20 10 12 8 28 20 11 6 6 4 16 15 26 13 12 8 29 24 22 10 12 8 27 26 14 15 13 8 16 14 19 12 14 7 28 24 20 11 11 8 25 25 28 8 12 7 22 20 19 9 9 7 23 21 30 9 15 9 26 27 29 15 18 11 23 23 26 9 15 6 25 25 23 10 12 8 21 20 21 12 14 9 24 22 28 11 13 6 22 25 23 14 13 10 27 25 18 6 11 8 26 17 20 8 16 10 24 25 21 10 11 5 24 26 28 12 16 14 22 27 10 5 8 6 24 19 22 10 15 6 20 22 31 10 21 12 26 32 29 13 18 12 21 21 22 10 13 8 19 18 23 10 15 10 21 23 20 9 19 10 16 20 18 8 15 10 22 21 25 14 11 5 15 17 21 8 10 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
PS[t] = + 7.46043060983696 + 0.328154021465217CM[t] -0.362736672389800D[t] + 0.186560236681879PE[t] + 0.0233844134026162PC[t] + 0.401270321441297O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.460430609836962.2481093.31850.0011310.000565
CM0.3281540214652170.0555445.90800
D-0.3627366723898000.107118-3.38639e-040.00045
PE0.1865602366818790.101141.84460.0670320.033516
PC0.02338441340261620.1286210.18180.8559730.427987
O0.4012703214412970.0717735.590800


Multiple Linear Regression - Regression Statistics
Multiple R0.605858798778077
R-squared0.367064884056814
Adjusted R-squared0.346380729941024
F-TEST (value)17.7461878306445
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value7.54951656745106e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.40927289715423
Sum Squared Residuals1778.34067815237


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12522.39639210732362.60360789267640
23024.25298630725225.74701369274785
32220.53862828528321.46137171471678
42223.1227812851809-1.12278128518093
52522.57360260838692.42639739161312
62319.45685945818933.54314054181066
71718.7937770436835-1.79377704368349
82121.6696775851730-0.669677585173036
91923.3938848919955-4.39388489199547
101523.2200335336539-8.22003353365394
111617.0860954231925-1.08609542319246
122221.00194328868470.998056711315265
132324.0090508616482-1.00905086164818
142321.56883817794231.4311618220577
151922.4295524471459-3.42955244714589
162322.44835255960490.551647440395089
172523.32807873286811.67192126713187
182221.56922587366740.430774126332575
192623.22321697753742.77678302246258
202922.70020388487516.29979611512492
213225.19655953738236.8034404626177
222521.58307941772023.4169205822798
232826.07516352086011.92483647913991
242523.46670945788321.53329054211676
252522.10552217031042.89447782968955
261821.4213727878477-3.42137278784772
272525.0045460489836-0.00454604898358882
282521.69155135775733.30844864224273
292024.0575114630031-4.05751146300312
301516.5269290283780-1.52692902837805
312425.3394958960663-1.33949589606632
322624.31254918449231.68745081550775
331415.6462203516491-1.64622035164913
342423.35362015671940.646379843280557
352522.30440358960752.69559641039245
362024.9772106374541-4.97721063745406
372121.5026773832730-0.502677383272959
382727.4823128306108-0.482312830610751
392324.3803773473337-1.38037734733372
402525.6982731831007-0.698273183100736
412022.2330812773097-2.23308127730969
422222.4516157406899-0.451615740689922
432524.05217644356390.947823556436078
442523.42308557988541.57691442011461
451723.8630492300674-6.86304923006741
462523.97091329555031.02908670444972
472622.52387072181343.47612927818658
482724.43619578844072.56380421155931
491920.191563551002-1.19156355100200
502222.0165688176436-0.0165688176435811
513228.63724483998533.36275516001471
522124.3266944626333-3.32669446263334
531821.2889468496438-3.28894684964376
542322.83953081416060.16046918583944
552020.9576947616757-0.957694761675739
562122.3255043730554-1.32550437305537
571718.7741072251434-1.77410722514342
581820.3006604066273-2.30066040662729
591920.7496791060040-1.74967910600404
602222.0682765809344-0.0682765809344132
611418.8510893511519-4.8510893511519
621826.6429142940773-8.64291429407725
633523.562032711943511.4379672880565
642919.21632460271889.78367539728123
652121.9816944326307-0.981694432630688
662520.49532081432834.50467918567167
672623.21420021813262.78579978186737
681716.88722239112380.112777608876169
692520.09471363697434.90528636302571
702020.7722734892362-0.772273489236228
712221.07047528771720.929524712282784
722422.70567391104881.29432608895116
732122.9951676639565-1.99516766395646
742625.4821958514860.517804148514024
752420.59509309602053.40490690397949
761620.2987397994430-4.29873979944297
771820.8107987510593-2.81079875105926
781919.0560620045677-0.0560620045676748
792116.86661990375814.13338009624188
802218.52601737704043.47398262295963
812319.73402419127493.26597580872509
822924.81240594107884.18759405892122
832119.21565087437541.78434912562461
842321.89278796226841.10721203773160
852722.99606727259904.00393272740102
862525.3746950753506-0.374695075350648
872121.0001409137780-0.000140913778044122
881017.1119616413152-7.1119616413152
892022.6490195793518-2.64901957935177
902622.57492372824553.42507627175453
912423.64748326134840.352516738651611
922931.6584752151628-2.65847521516283
931918.98258268182110.0174173181788753
942422.09401617955111.90598382044894
951920.7666852307848-1.76668523078483
962221.82443709696720.175562903032759
971723.7736200572454-6.77362005724542
982423.02361763335080.976382366649221
991920.2962579947228-1.29625799472284
1001922.8153403514384-3.81534035143841
1012319.45982251795763.54017748204243
1022724.07484238205532.92515761794465
1031416.535329320714-2.53532932071400
1042224.0873202920243-2.08732029202431
1052124.4545998179461-3.45459981794611
1061823.8367869289911-5.83678692899107
1072023.1800605324662-3.18006053246622
1081923.3532655211774-4.35326552117744
1092423.8398299312470.160170068753001
1102525.1649483334544-0.164948333454413
1112924.40994950651354.59005049348653
1122824.94670560416253.05329439583751
1131717.1062381095522-0.106238109552167
1142922.94307220494056.05692779505950
1152627.5286218564100-1.52862185640998
1161419.5469105942641-5.54691059426405
1172621.67803938243294.32196061756713
1182020.3008968098917-0.300896809891660
1193224.66103622987577.33896377012431
1202320.84547496130682.15452503869318
1212122.1588588066973-1.15885880669729
1223026.71739020898803.28260979101198
1232421.71725246129782.28274753870219
1242221.49415047143090.505849528569086
1252422.2553595200761.74464047992401
1262422.92037560857981.07962439142021
1272419.98505558381324.01494441618681
1281918.51290616425470.487093835745272
1293126.82086767642944.17913232357062
1302226.6010375214530-4.60103752145304
1312721.46976210052055.5302378994795
1321917.73590694522341.26409305477656
1332119.24546706874021.75453293125985
1342323.0320339448358-0.0320339448358385
1351921.4391304477228-2.43913044772283
1361922.3733623294629-3.37336232946291
1372023.1407040596382-3.14070405963825
1382320.80738427751352.19261572248651
1391720.8970807780462-3.8970807780462
1401723.3435280898338-6.3435280898338
1411719.7459731472925-2.74597314729248
1422123.5510323826098-2.55103238260975
1432124.6834795872242-3.6834795872242
1441821.259817450436-3.25981745043600
1451920.6492902959521-1.64929029595212
1462023.8525057494042-3.85250574940422
1471518.7664416321540-3.76644163215395
1482421.41144878787982.58855121212023
1492018.49243029639511.50756970360488
1502223.2253187184531-1.22531871845307
1511316.8359413686559-3.83594136865588
1521918.12855439318590.87144560681412
1532122.6212243668162-1.62122436681623
1542322.37653195122490.623468048775058
1551622.3793138772619-6.37931387726185
1562624.06985436623751.93014563376249
1572122.2168258710245-1.21682587102449
1582119.96394641313691.03605358686310
1592423.44015542271860.559844577281409


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.5064391997365940.9871216005268110.493560800263406
100.936336455298510.127327089402980.06366354470149
110.9085359797163260.1829280405673470.0914640202836736
120.8545256675511110.2909486648977780.145474332448889
130.8424154920869840.3151690158260330.157584507913017
140.8278053822315370.3443892355369250.172194617768463
150.7844399400845850.4311201198308300.215560059915415
160.709661238886350.58067752222730.29033876111365
170.6297050217532360.7405899564935290.370294978246764
180.5530825851432850.893834829713430.446917414856715
190.5679715445567870.8640569108864260.432028455443213
200.6624671490980710.6750657018038580.337532850901929
210.7845449400977650.430910119804470.215455059902235
220.7486740121755880.5026519756488240.251325987824412
230.6933876751609170.6132246496781660.306612324839083
240.6302719075703310.7394561848593380.369728092429669
250.5736432257628060.8527135484743880.426356774237194
260.5822643397212060.8354713205575890.417735660278794
270.5202352468529220.9595295062941560.479764753147078
280.4750424075893050.950084815178610.524957592410695
290.5258567870103230.9482864259793540.474143212989677
300.4756972427734020.9513944855468040.524302757226598
310.4218997019527580.8437994039055150.578100298047242
320.3738526621770310.7477053243540610.626147337822969
330.3262333964719570.6524667929439150.673766603528043
340.2745839517270890.5491679034541790.725416048272911
350.2625539847080620.5251079694161230.737446015291938
360.3632638827295390.7265277654590780.636736117270461
370.3100635076661970.6201270153323930.689936492333803
380.266496888859880.532993777719760.73350311114012
390.2362009063830350.4724018127660710.763799093616965
400.2102617689086300.4205235378172610.78973823109137
410.1868296211908440.3736592423816890.813170378809156
420.1529416225385560.3058832450771120.847058377461444
430.1238264461899000.2476528923797990.8761735538101
440.1059748237675110.2119496475350210.894025176232489
450.2059332546201940.4118665092403870.794066745379806
460.1712413990516580.3424827981033170.828758600948342
470.1684169113123970.3368338226247930.831583088687603
480.1662709704979460.3325419409958920.833729029502054
490.1372526203914510.2745052407829030.862747379608549
500.1150143337947030.2300286675894070.884985666205297
510.1049820949948930.2099641899897850.895017905005107
520.1129731574049320.2259463148098630.887026842595068
530.1120592554870470.2241185109740930.887940744512953
540.0895407345259890.1790814690519780.910459265474011
550.07558261063278760.1511652212655750.924417389367213
560.06148064632013820.1229612926402760.938519353679862
570.05032909962929480.1006581992585900.949670900370705
580.0413898570060840.0827797140121680.958610142993916
590.0328561767211130.0657123534422260.967143823278887
600.02469127453051730.04938254906103460.975308725469483
610.03288789706027380.06577579412054760.967112102939726
620.1193863102882250.2387726205764490.880613689711775
630.5576204184221270.8847591631557450.442379581577873
640.8598998268921680.2802003462156650.140100173107832
650.8374794660953160.3250410678093680.162520533904684
660.8524117374559650.295176525088070.147588262544035
670.8575448576898290.2849102846203410.142455142310171
680.829660029979310.340679940041380.17033997002069
690.860147939202510.279704121594980.13985206079749
700.834271643662010.3314567126759810.165728356337990
710.8064096448061980.3871807103876040.193590355193802
720.778095905180250.44380818963950.22190409481975
730.7563285049260410.4873429901479180.243671495073959
740.7224343399382440.5551313201235130.277565660061756
750.7219574881835980.5560850236328040.278042511816402
760.7445527520757920.5108944958484150.255447247924208
770.7296537890866870.5406924218266250.270346210913313
780.689949904222760.6201001915544790.310050095777239
790.7103644470777190.5792711058445620.289635552922281
800.7107918166783280.5784163666433440.289208183321672
810.7129290775926080.5741418448147830.287070922407392
820.7375993006066280.5248013987867440.262400699393372
830.750717091475260.4985658170494790.249282908524740
840.7254242753456230.5491514493087540.274575724654377
850.7469099512277420.5061800975445160.253090048772258
860.713393309707420.5732133805851610.286606690292581
870.6727495715067870.6545008569864270.327250428493213
880.7793847248362790.4412305503274420.220615275163721
890.7610587809536910.4778824380926180.238941219046309
900.7629502045428830.4740995909142350.237049795457117
910.732352363112150.5352952737756990.267647636887850
920.7129607867721820.5740784264556360.287039213227818
930.6798174725736170.6403650548527660.320182527426383
940.6785366589236110.6429266821527780.321463341076389
950.6429084562960610.7141830874078780.357091543703939
960.6043199906499320.7913600187001370.395680009350068
970.6861348249447230.6277303501105540.313865175055277
980.64558742769820.7088251446036010.354412572301801
990.605123674108660.7897526517826810.394876325891341
1000.6082506904701830.7834986190596330.391749309529817
1010.6177387403283560.7645225193432890.382261259671644
1020.61384066188560.7723186762288010.386159338114401
1030.581416940310230.8371661193795390.418583059689769
1040.5432160058530510.9135679882938980.456783994146949
1050.5265434738179890.9469130523640220.473456526182011
1060.6366130090324170.7267739819351670.363386990967583
1070.6329537782257080.7340924435485830.367046221774292
1080.660008225328330.679983549343340.33999177467167
1090.6149476315176130.7701047369647750.385052368482387
1100.5689041133504950.862191773299010.431095886649505
1110.5928774275573840.8142451448852320.407122572442616
1120.5794902846778430.8410194306443140.420509715322157
1130.533632542264650.93273491547070.46636745773535
1140.6666290176222720.6667419647554560.333370982377728
1150.6215397942568400.7569204114863190.378460205743160
1160.6614046047760650.677190790447870.338595395223935
1170.68678564250890.62642871498220.3132143574911
1180.6367261057726410.7265477884547190.363273894227359
1190.8632811108544580.2734377782910830.136718889145542
1200.8750971181779590.2498057636440820.124902881822041
1210.8470217420217760.3059565159564470.152978257978224
1220.8446260040808090.3107479918383820.155373995919191
1230.8435756966488660.3128486067022690.156424303351134
1240.8053000486238950.3893999027522100.194699951376105
1250.7727348326203980.4545303347592040.227265167379602
1260.752560693299120.4948786134017620.247439306700881
1270.768931473982160.4621370520356810.231068526017841
1280.718509120395520.5629817592089610.281490879604480
1290.8912645035059850.2174709929880310.108735496494016
1300.867227689048310.2655446219033810.132772310951690
1310.963228622316440.07354275536712230.0367713776835611
1320.946322599787470.1073548004250590.0536774002125297
1330.932146864398890.1357062712022210.0678531356011107
1340.9081650440865280.1836699118269450.0918349559134725
1350.8784033446405670.2431933107188670.121596655359433
1360.842028755734580.3159424885308420.157971244265421
1370.7956970473506530.4086059052986950.204302952649347
1380.766227682513730.4675446349725410.233772317486270
1390.735397400253740.529205199492520.26460259974626
1400.8012080677715030.3975838644569930.198791932228497
1410.7437234575846730.5125530848306540.256276542415327
1420.6859770988266860.6280458023466280.314022901173314
1430.6584040183843710.6831919632312590.341595981615629
1440.5954599328491990.8090801343016030.404540067150801
1450.4931512279482340.9863024558964670.506848772051766
1460.5763283245301360.8473433509397270.423671675469864
1470.5244005533774520.9511988932450960.475599446622548
1480.5627060382216040.8745879235567920.437293961778396
1490.621899110689650.75620177862070.37810088931035
1500.4822946173125210.9645892346250430.517705382687479


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/11cre1292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/11cre1292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/2b3qg1292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/2b3qg1292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/3b3qg1292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/3b3qg1292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/4b3qg1292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/4b3qg1292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/5mcpj1292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/5mcpj1292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/6mcpj1292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/6mcpj1292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/7x4o41292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/7x4o41292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/8x4o41292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/8x4o41292344319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/9qdo71292344319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292344246nruc4h8rloxd4gw/9qdo71292344319.ps (open in new window)


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