Home » date » 2010 » Nov » 23 »

*Unverified author*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 15:44:50 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw.htm/, Retrieved Tue, 23 Nov 2010 16:47:31 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw.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 «
9 26 24 14 11 12 24 9 23 25 11 7 8 25 9 25 17 6 17 8 30 9 23 18 12 10 8 19 9 19 18 8 12 9 22 9 29 16 10 12 7 22 10 25 20 10 11 4 25 10 21 16 11 11 11 23 10 22 18 16 12 7 17 10 25 17 11 13 7 21 10 24 23 13 14 12 19 10 18 30 12 16 10 19 10 22 23 8 11 10 15 10 15 18 12 10 8 16 10 22 15 11 11 8 23 10 28 12 4 15 4 27 10 20 21 9 9 9 22 10 12 15 8 11 8 14 10 24 20 8 17 7 22 10 20 31 14 17 11 23 10 21 27 15 11 9 23 10 20 34 16 18 11 21 10 21 21 9 14 13 19 10 23 31 14 10 8 18 10 28 19 11 11 8 20 10 24 16 8 15 9 23 10 24 20 9 15 6 25 10 24 21 9 13 9 19 10 23 22 9 16 9 24 10 23 17 9 13 6 22 10 29 24 10 9 6 25 10 24 25 16 18 16 26 10 18 26 11 18 5 29 10 25 25 8 12 7 32 10 21 17 9 17 9 25 10 26 32 16 9 6 29 10 22 33 11 9 6 28 10 22 13 16 12 5 17 10 22 32 12 18 12 28 10 23 25 12 12 7 29 10 30 29 14 18 10 26 10 23 22 9 14 9 25 10 17 18 10 15 8 14 10 23 17 9 16 5 25 10 23 20 10 10 8 26 10 25 15 12 11 8 20 10 24 20 14 14 10 18 10 24 33 14 9 6 32 10 23 29 10 12 8 25 10 21 23 14 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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
YT[t] = + 18.2651799335285 -0.080823679576389T1[t] -0.0591540614026579X1[t] + 0.216924456733213X2[t] -0.132556183679637X3[t] -0.254001352868105X4[t] + 0.395674100791331`X5 `[t] -0.0147661337424251t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)18.265179933528515.3497621.18990.235940.11797
T1-0.0808236795763891.54324-0.05240.9583010.47915
X1-0.05915406140265790.06241-0.94780.3447320.172366
X20.2169244567332130.1111961.95080.0529290.026464
X3-0.1325561836796370.103796-1.27710.2035340.101767
X4-0.2540013528681050.129774-1.95730.052160.02608
`X5 `0.3956741007913310.0756655.22931e-060
t-0.01476613374242510.006382-2.31380.022030.011015


Multiple Linear Regression - Regression Statistics
Multiple R0.502263051134702
R-squared0.252268172535141
Adjusted R-squared0.217605107685776
F-TEST (value)7.2777226604579
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value1.63300429179003e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.45408407493565
Sum Squared Residuals1801.53521630534


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12624.13028976829841.86971023170162
22325.347500449936-2.34750044993599
32525.3741531909091-0.374153190909052
42323.1772579132161-0.177257913216066
51922.9627025346874-3.9627025346874
62924.00809614295294.99190385704707
72525.7574726286814-0.75747262868142
82123.6268895256234-2.62688952562345
92223.0878421757866-1.08784217578657
102523.49774803926641.50225196073357
112421.36799530097172.63200469902834
121820.9651166190543-2.96511661905435
132219.57681560343052.42318439656946
141521.7617505938414-6.76175059384144
152224.3446847094334-2.34468470943345
162825.05738664268572.9426133573143
172023.1418160737661-3.14181607376606
181220.0885460308846-8.08854603088456
192422.40206664724981.59793335275023
202022.4178212677963-2.41782126779630
212124.1599356442117-3.15993564421175
222021.7207713443076-1.7207713443076
232120.18741063906690.812589360933083
242322.07028357323170.929716426768281
252822.77338482402465.22661517597543
262422.68810371907781.31189628092218
272424.2069980566450-0.206998056644954
282421.26214156550682.73785843449315
292322.76892332327950.231076676720495
302323.4182519046109-0.418251904610935
312924.92357883487574.07642116512434
322422.81386029912341.18613970087660
331825.6363550042354-7.6363550042354
342526.5043262604116-1.50432626041160
352123.2392147449499-2.23921474494994
362627.2607588185069-1.26075881850687
372225.7065422389044-3.70654223890439
382223.4633973100057-1.46339731000574
392223.2360747192300-1.23607471923005
402326.0964049825159-3.09640498251590
413023.53450805357316.46549194642686
422323.2377500527786-0.237750052778584
431719.4455546818638-2.44555468186384
442324.2548811364202-1.25488113642017
452324.7085844194678-1.70858441946782
462522.91683671777752.08316328222251
472421.34312973213042.65687026786958
482427.7775845411027-3.77758454110267
492323.4563468637236-0.456346863723595
502124.2554233597999-3.25542335979989
512426.0583740164932-2.05837401649321
522422.26312227802701.73687772197298
532821.95129837742126.04870162257884
541621.4341929789634-5.4341929789634
552020.3327352745890-0.332735274589025
562923.78554538114295.2144546188571
572724.14797032439412.85202967560587
582223.4466677209928-1.44666772099284
592824.15529522744153.84470477255850
601620.7808813048786-4.78088130487858
612523.12240208525371.87759791474626
622423.71739203755860.282607962441426
632823.86822540354014.13177459645985
642424.4168721842752-0.416872184275207
652322.86453152803130.135468471968737
663026.95596426122683.04403573877321
672421.58393330139382.41606669860615
682124.2091984978139-3.20919849781391
692523.39394925547541.60605074452461
702524.02812524816940.97187475183056
712221.03242791823790.967572081762072
722322.56031544568290.439684554317121
732622.96555943344523.03444056655483
742321.82312644156421.17687355843577
752523.14329926859261.85670073140740
762121.4342151171374-0.434215117137413
772523.64980804720231.35019195279768
782422.22907436727961.77092563272041
792923.51251654472055.48748345527954
802223.6501217579009-1.65012175790086
812723.56589388989893.43410611010106
822619.71922467606896.28077532393105
832221.35477893274120.64522106725879
842421.99984238144152.00015761855855
852723.06557243292003.93442756708003
862421.34556297740122.65443702259875
872424.658700615808-0.658700615807986
882924.18264268379534.81735731620467
892222.0958198385512-0.0958198385511574
902120.53108454084820.468915459151794
912420.45082408399263.54917591600735
922421.52489083149052.47510916850947
932321.78684403733721.21315596266276
942022.1292611274564-2.12926112745638
952721.19357794364355.80642205635649
962623.20473809597452.79526190402554
972521.82900093828843.17099906171155
982119.98954076382881.01045923617116
992120.57693898122450.423061018775502
1001920.2150775834596-1.21507758345957
1012121.3464128191757-0.346412819175655
1022120.98508336580090.0149166341991357
1031619.5601712420730-3.56017124207303
1042220.37268760991261.62731239008742
1052921.49824854348347.50175145651664
1061521.4481587489022-6.44815874890216
1071720.3886896991058-3.38868969910584
1081519.6493873290368-4.64938732903676
1092121.3279979997044-0.327997999704354
1102120.68442096702330.315579032976685
1111918.95504888483280.04495111516719
1122417.83543673415686.16456326584324
1132021.7906882736065-1.79068827360649
1141724.4817908931081-7.48179089310812
1152324.1480825171234-1.14808251712340
1162421.84892125950862.15107874049140
1171421.5133116379342-7.51331163793423
1181922.2915575818798-3.29155758187984
1192421.68833936801632.31166063198369
1201319.9554033140635-6.95540331406355
1212224.6845701216641-2.68457012166414
1221620.5712630248371-4.57126302483710
1231922.618312797572-3.61831279757200
1242522.06816408306992.93183591693012
1252523.50508736349671.49491263650334
1262320.82318825335052.17681174664951
1272422.79299185444291.20700814555708
1282622.77601539031753.22398460968255
1292620.82394071636615.17605928363388
1302523.41960189638031.58039810361965
1311821.5862924403213-3.58629244032127
1322119.22176919748171.77823080251832
1332622.81212795015993.18787204984014
1342321.18033463735761.81966536264239
1352319.09862494597433.90137505402567
1362221.82715070815820.172849291841754
1372021.5923532410073-1.59235324100729
1381321.2574506098304-8.25745060983036
1392420.56669689423743.43330310576262
1401520.7204514264666-5.72045142646664
1411422.2587253215388-8.25872532153883
1422223.1348164241320-1.13481642413203
1431017.0104115841435-7.01041158414355
1442423.45350750691770.546492493082285
1452220.94667070728651.05332929271347
1462424.7574857221061-0.757485722106145
1471920.7572509061611-1.75725090616112
1482021.1138228524966-1.11382285249664
1491316.3426989662444-3.34269896624436
1502019.19371129503870.806288704961296
1512222.1060433360234-0.106043336023380
1522422.37023705454591.62976294545413
1532922.24889896153746.75110103846263
1541219.9719025274833-7.9719025274833
1552019.91431736181470.085682638185284
1562120.37069675069140.629303249308619
1572422.52533839076551.4746616092345
1582220.81899652666841.18100347333161
1592016.89001385461793.10998614538215


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.3888119205789580.7776238411579160.611188079421042
120.3271609506185950.654321901237190.672839049381405
130.6054959526754520.7890080946490960.394504047324548
140.7989457399692450.402108520061510.201054260030755
150.7358930750394960.5282138499210080.264106924960504
160.7287997300884690.5424005398230610.271200269911531
170.6462548381272970.7074903237454050.353745161872703
180.7705510485505740.4588979028988530.229448951449426
190.7125536777042180.5748926445915630.287446322295782
200.6585370735619950.6829258528760110.341462926438005
210.5902127871100680.8195744257798630.409787212889932
220.5146036738187430.9707926523625140.485396326181257
230.5019114708571620.9961770582856770.498088529142838
240.5416610351044230.9166779297911540.458338964895577
250.6751287524351910.6497424951296180.324871247564809
260.6082066760991980.7835866478016030.391793323900802
270.5496778760248140.9006442479503710.450322123975186
280.5132061612499260.9735876775001480.486793838750074
290.4510428306991730.9020856613983470.548957169300827
300.394921652974090.789843305948180.60507834702591
310.3911365887191210.7822731774382430.608863411280879
320.3303106556751820.6606213113503640.669689344324818
330.6219342241277720.7561315517444560.378065775872228
340.5776768708595110.8446462582809780.422323129140489
350.55322236800280.89355526399440.4467776319972
360.4970716997907720.9941433995815440.502928300209228
370.4830148942217290.9660297884434570.516985105778272
380.4319044530522560.8638089061045120.568095546947744
390.3825548415100720.7651096830201440.617445158489928
400.3595262734836140.7190525469672270.640473726516386
410.5097023993446720.9805952013106560.490297600655328
420.4559547596677270.9119095193354530.544045240332273
430.4370202503257670.8740405006515330.562979749674233
440.3904145028563260.7808290057126520.609585497143674
450.3509042471563130.7018084943126260.649095752843687
460.3201695611115520.6403391222231050.679830438888448
470.2906118007357920.5812236014715850.709388199264208
480.2871705649557130.5743411299114260.712829435044287
490.2487347569393150.497469513878630.751265243060685
500.252832407244920.505664814489840.74716759275508
510.2320680949045100.4641361898090210.76793190509549
520.1997209588839840.3994419177679670.800279041116016
530.2581902658740270.5163805317480530.741809734125973
540.3448581922029280.6897163844058560.655141807797072
550.3309725494094380.6619450988188760.669027450590562
560.3834857686921670.7669715373843350.616514231307833
570.3579419193720680.7158838387441360.642058080627932
580.3295963100279610.6591926200559220.670403689972039
590.3280651805548360.6561303611096720.671934819445164
600.4179175113748390.8358350227496770.582082488625161
610.3733737209164060.7467474418328120.626626279083594
620.3306895682581530.6613791365163050.669310431741847
630.3284689447310430.6569378894620870.671531055268957
640.2945056332805400.5890112665610790.70549436671946
650.2562162389695010.5124324779390020.743783761030499
660.2383317882999490.4766635765998980.761668211700051
670.2078796577639050.415759315527810.792120342236095
680.2316081701556450.463216340311290.768391829844355
690.1985057940658820.3970115881317640.801494205934118
700.1669370510447580.3338741020895160.833062948955242
710.1389054926604550.2778109853209090.861094507339545
720.1151865074430960.2303730148861920.884813492556904
730.0986535742556520.1973071485113040.901346425744348
740.07964463577530870.1592892715506170.920355364224691
750.06393846797183660.1278769359436730.936061532028163
760.05377455811341810.1075491162268360.946225441886582
770.04218418428591640.08436836857183280.957815815714084
780.03257149363446550.0651429872689310.967428506365535
790.03677726196256640.07355452392513270.963222738037434
800.03435947671592320.06871895343184640.965640523284077
810.02847976954018190.05695953908036390.971520230459818
820.03699074989941210.07398149979882420.963009250100588
830.02891479061725920.05782958123451840.97108520938274
840.02252112476736540.04504224953473080.977478875232635
850.02017250079394490.04034500158788970.979827499206055
860.0156704633593250.031340926718650.984329536640675
870.01281653732293350.02563307464586710.987183462677066
880.01311180702030990.02622361404061970.98688819297969
890.01109681059684280.02219362119368560.988903189403157
900.008435632673667810.01687126534733560.991564367326332
910.007009882311874630.01401976462374930.992990117688125
920.005684285655983080.01136857131196620.994315714344017
930.004172385724984800.008344771449969610.995827614275015
940.004107159012126370.008214318024252740.995892840987874
950.006095032815711120.01219006563142220.993904967184289
960.0049235407924840.0098470815849680.995076459207516
970.004132592073915490.008265184147830980.995867407926085
980.003183519546736040.006367039093472080.996816480453264
990.002416002782183520.004832005564367040.997583997217816
1000.002045476543347740.004090953086695490.997954523456652
1010.001621383270851660.003242766541703320.998378616729148
1020.001194824776916670.002389649553833340.998805175223083
1030.001514341498144370.003028682996288740.998485658501856
1040.001178049046612250.002356098093224490.998821950953388
1050.005144787914121130.01028957582824230.994855212085879
1060.01297522783279850.02595045566559690.987024772167202
1070.01376218603548950.02752437207097910.98623781396451
1080.01884532676345050.03769065352690110.98115467323655
1090.01468696022822920.02937392045645840.98531303977177
1100.01063908807700780.02127817615401560.989360911922992
1110.007680369153452230.01536073830690450.992319630846548
1120.02212775385329220.04425550770658440.977872246146708
1130.02211825922263240.04423651844526480.977881740777368
1140.05532848596498740.1106569719299750.944671514035013
1150.04713639170565680.09427278341131360.952863608294343
1160.03942747995681460.07885495991362920.960572520043185
1170.1037658932952070.2075317865904140.896234106704793
1180.0979247994118950.195849598823790.902075200588105
1190.08724583162094140.1744916632418830.912754168379059
1200.1523436132538380.3046872265076760.847656386746162
1210.1495101123288110.2990202246576220.850489887671189
1220.1898212314671350.3796424629342710.810178768532865
1230.1892017623483830.3784035246967670.810798237651617
1240.179172696914950.35834539382990.82082730308505
1250.1551863820878950.3103727641757900.844813617912105
1260.1243628190448060.2487256380896110.875637180955194
1270.09731904476253530.1946380895250710.902680955237465
1280.09474043605050620.1894808721010120.905259563949494
1290.132633760853390.265267521706780.86736623914661
1300.1146561010108530.2293122020217070.885343898989147
1310.09610701241889340.1922140248377870.903892987581107
1320.08526733619917320.1705346723983460.914732663800827
1330.08332499376890050.1666499875378010.9166750062311
1340.07409555307210050.1481911061442010.9259044469279
1350.1731010135385920.3462020270771850.826898986461408
1360.1380309681349250.2760619362698500.861969031865075
1370.1156667783362390.2313335566724780.884333221663761
1380.163171768623360.326343537246720.83682823137664
1390.3949034503525630.7898069007051260.605096549647437
1400.3404830589815740.6809661179631480.659516941018426
1410.4844937380520160.9689874761040310.515506261947984
1420.3932680680070860.7865361360141710.606731931992914
1430.5564286642972340.8871426714055310.443571335702766
1440.5025856130784580.9948287738430850.497414386921542
1450.4056433860077280.8112867720154570.594356613992272
1460.3008476352833820.6016952705667640.699152364716618
1470.292262080086770.584524160173540.70773791991323
1480.1744211088474480.3488422176948960.825578891152552


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level110.0797101449275362NOK
5% type I error level300.217391304347826NOK
10% type I error level390.282608695652174NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/103cm21290527079.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/103cm21290527079.ps (open in new window)


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/60cnw1290527079.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/60cnw1290527079.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/7tl4h1290527079.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/7tl4h1290527079.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/93cm21290527079.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290527235d1npdh5ajronoaw/93cm21290527079.ps (open in new window)


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