Home » date » 2010 » Nov » 19 »

workshop 7 - tutorial 4

*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, 19 Nov 2010 15:44:14 +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/19/t12901814095tihr0h2zbose66.htm/, Retrieved Fri, 19 Nov 2010 16:43:29 +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/19/t12901814095tihr0h2zbose66.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 time30 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
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
O[t] = + 18.2651799335288 -0.080823679576423maand[t] -0.0591540614026575CM[t] + 0.216924456733212D[t] -0.132556183679637PE[t] -0.254001352868106PC[t] + 0.39567410079133`PS `[t] -0.0147661337424250t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)18.265179933528815.3497621.18990.235940.11797
maand-0.0808236795764231.54324-0.05240.9583010.47915
CM-0.05915406140265750.06241-0.94780.3447320.172366
D0.2169244567332120.1111961.95080.0529290.026464
PE-0.1325561836796370.103796-1.27710.2035340.101767
PC-0.2540013528681060.129774-1.95730.052160.02608
`PS `0.395674100791330.0756655.22931e-060
t-0.01476613374242500.006382-2.31380.022030.011015


Multiple Linear Regression - Regression Statistics
Multiple R0.502263051134702
R-squared0.252268172535140
Adjusted R-squared0.217605107685776
F-TEST (value)7.27772266045789
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value1.63300429067981e-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.86971023170157
22325.347500449936-2.34750044993602
32525.3741531909091-0.374153190909075
42323.1772579132161-0.177257913216094
51922.9627025346874-3.96270253468743
62924.00809614295304.99190385704704
72525.7574726286814-0.757472628681422
82123.6268895256234-2.62688952562344
92223.0878421757866-1.08784217578657
102523.49774803926641.50225196073358
112421.36799530097162.63200469902835
121820.9651166190543-2.96511661905435
132219.57681560343052.42318439656946
141521.7617505938414-6.76175059384143
152224.3446847094334-2.34468470943344
162825.05738664268572.94261335731430
172023.1418160737661-3.14181607376606
181220.0885460308846-8.08854603088456
192422.40206664724981.59793335275023
202022.4178212677963-2.41782126779629
212124.1599356442117-3.15993564421174
222021.7207713443076-1.72077134430760
232120.18741063906690.81258936093309
242322.07028357323170.929716426768283
252822.77338482402465.22661517597543
262422.68810371907781.31189628092218
272424.2069980566450-0.206998056644952
282421.26214156550682.73785843449316
292322.76892332327950.231076676720498
302323.4182519046109-0.418251904610932
312924.92357883487574.07642116512435
322422.81386029912341.18613970087661
331825.6363550042354-7.6363550042354
342526.5043262604116-1.50432626041159
352123.2392147449499-2.23921474494993
362627.2607588185069-1.26075881850686
372225.7065422389044-3.70654223890439
382223.4633973100057-1.46339731000574
392223.2360747192300-1.23607471923004
402326.0964049825159-3.0964049825159
413023.53450805357316.46549194642686
422323.2377500527786-0.237750052778580
431719.4455546818638-2.44555468186384
442324.2548811364202-1.25488113642017
452324.7085844194678-1.70858441946782
462522.91683671777752.08316328222252
472421.34312973213042.65687026786958
482427.7775845411027-3.77758454110267
492323.4563468637236-0.456346863723594
502124.2554233597999-3.25542335979988
512426.0583740164932-2.05837401649321
522422.2631222780271.73687772197298
532821.95129837742126.04870162257884
541621.4341929789634-5.4341929789634
552020.332735274589-0.332735274589016
562923.78554538114295.2144546188571
572724.14797032439412.85202967560587
582223.4466677209928-1.44666772099284
592824.15529522744153.8447047725585
601620.7808813048786-4.78088130487857
612523.12240208525371.87759791474626
622423.71739203755860.282607962441427
632823.86822540354014.13177459645985
642424.4168721842752-0.416872184275199
652322.86453152803130.135468471968741
663026.95596426122683.04403573877321
672421.58393330139382.41606669860615
682124.2091984978139-3.20919849781390
692523.39394925547541.60605074452461
702524.02812524816940.971874751830566
712221.03242791823790.96757208176207
722322.56031544568290.439684554317123
732622.96555943344523.03444056655483
742321.82312644156421.17687355843577
752523.14329926859261.85670073140740
762121.4342151171374-0.434215117137412
772523.64980804720231.35019195279768
782422.22907436727961.77092563272042
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.658700615807987
882924.18264268379534.81735731620468
892222.0958198385512-0.0958198385511527
902120.53108454084820.468915459151793
912420.45082408399273.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.4230610187755
1001920.2150775834596-1.21507758345957
1012121.3464128191757-0.346412819175655
1022120.98508336580090.0149166341991343
1031619.5601712420730-3.56017124207303
1042220.37268760991261.62731239008742
1052921.49824854348347.50175145651664
1061521.4481587489022-6.44815874890216
1071720.3886896991058-3.38868969910585
1081519.6493873290368-4.64938732903676
1092121.3279979997044-0.327997999704353
1102120.68442096702330.315579032976684
1111918.95504888483280.0449511151671882
1122417.83543673415686.16456326584323
1132021.7906882736065-1.79068827360649
1141724.4817908931081-7.48179089310812
1152324.1480825171234-1.14808251712339
1162421.84892125950862.1510787404914
1171421.5133116379342-7.51331163793424
1181922.2915575818798-3.29155758187984
1192421.68833936801632.31166063198369
1201319.9554033140636-6.95540331406356
1212224.6845701216641-2.68457012166414
1221620.5712630248371-4.57126302483711
1231922.618312797572-3.618312797572
1242522.06816408306992.93183591693012
1252523.50508736349671.49491263650334
1262320.82318825335052.17681174664951
1272422.79299185444291.20700814555707
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.172849291841752
1372021.5923532410073-1.59235324100729
1381321.2574506098304-8.25745060983036
1392420.56669689423743.43330310576262
1401520.7204514264666-5.72045142646664
1411422.2587253215388-8.25872532153882
1422223.1348164241320-1.13481642413203
1431017.0104115841435-7.01041158414355
1442423.45350750691770.546492493082284
1452220.94667070728651.05332929271347
1462424.7574857221061-0.757485722106147
1471920.7572509061611-1.75725090616112
1482021.1138228524966-1.11382285249664
1491316.3426989662444-3.34269896624437
1502019.19371129503870.806288704961293
1512222.1060433360234-0.106043336023381
1522422.37023705454591.62976294545413
1532922.24889896153746.75110103846262
1541219.9719025274833-7.97190252748331
1552019.91431736181470.0856826381852847
1562120.37069675069140.629303249308614
1572422.52533839076551.4746616092345
1582220.81899652666841.18100347333161
1592016.89001385461793.10998614538215


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.3888119205789610.7776238411579210.611188079421039
120.3271609506186010.6543219012372010.6728390493814
130.6054959526754510.7890080946490980.394504047324549
140.7989457399692450.402108520061510.201054260030755
150.7358930750394970.5282138499210070.264106924960503
160.728799730088470.5424005398230610.271200269911530
170.6462548381272970.7074903237454050.353745161872703
180.7705510485505740.4588979028988520.229448951449426
190.7125536777042190.5748926445915620.287446322295781
200.6585370735619940.6829258528760110.341462926438006
210.5902127871100680.8195744257798630.409787212889932
220.5146036738187420.9707926523625160.485396326181258
230.5019114708571610.9961770582856770.498088529142838
240.5416610351044230.9166779297911540.458338964895577
250.6751287524351910.6497424951296170.324871247564809
260.6082066760991970.7835866478016050.391793323900803
270.5496778760248110.9006442479503790.450322123975189
280.5132061612499260.9735876775001470.486793838750074
290.4510428306991770.9020856613983540.548957169300823
300.3949216529740880.7898433059481770.605078347025912
310.3911365887191230.7822731774382460.608863411280877
320.3303106556751820.6606213113503630.669689344324818
330.6219342241277710.7561315517444580.378065775872229
340.5776768708595080.8446462582809840.422323129140492
350.5532223680028010.8935552639943970.446777631997199
360.4970716997907750.994143399581550.502928300209225
370.4830148942217290.9660297884434580.516985105778271
380.4319044530522550.8638089061045090.568095546947746
390.3825548415100710.7651096830201410.617445158489929
400.3595262734836120.7190525469672250.640473726516388
410.5097023993446710.9805952013106580.490297600655329
420.4559547596677280.9119095193354560.544045240332272
430.4370202503257670.8740405006515340.562979749674233
440.3904145028563250.780829005712650.609585497143675
450.3509042471563120.7018084943126240.649095752843688
460.3201695611115520.6403391222231050.679830438888448
470.2906118007357910.5812236014715810.70938819926421
480.2871705649557140.5743411299114280.712829435044286
490.2487347569393170.4974695138786330.751265243060683
500.2528324072449220.5056648144898430.747167592755078
510.232068094904510.464136189809020.76793190509549
520.1997209588839830.3994419177679670.800279041116017
530.2581902658740290.5163805317480580.741809734125971
540.3448581922029290.6897163844058590.655141807797071
550.3309725494094380.6619450988188770.669027450590562
560.3834857686921660.7669715373843330.616514231307834
570.3579419193720670.7158838387441350.642058080627933
580.3295963100279610.6591926200559220.670403689972039
590.3280651805548340.6561303611096680.671934819445166
600.4179175113748410.8358350227496810.58208248862516
610.3733737209164060.7467474418328120.626626279083594
620.3306895682581540.6613791365163080.669310431741846
630.3284689447310440.6569378894620880.671531055268956
640.2945056332805390.5890112665610780.705494366719461
650.25621623896950.5124324779390.7437837610305
660.2383317882999480.4766635765998970.761668211700052
670.2078796577639050.4157593155278110.792120342236095
680.2316081701556430.4632163403112870.768391829844357
690.1985057940658820.3970115881317640.801494205934118
700.1669370510447580.3338741020895160.833062948955242
710.1389054926604540.2778109853209080.861094507339546
720.1151865074430960.2303730148861920.884813492556904
730.09865357425565190.1973071485113040.901346425744348
740.07964463577530870.1592892715506170.920355364224691
750.06393846797183670.1278769359436730.936061532028163
760.05377455811341860.1075491162268370.946225441886581
770.04218418428591540.08436836857183080.957815815714085
780.03257149363446620.06514298726893230.967428506365534
790.03677726196256660.07355452392513310.963222738037433
800.03435947671592290.06871895343184590.965640523284077
810.02847976954018120.05695953908036240.971520230459819
820.03699074989941220.07398149979882430.963009250100588
830.02891479061725950.0578295812345190.97108520938274
840.02252112476736510.04504224953473020.977478875232635
850.0201725007939450.040345001587890.979827499206055
860.01567046335932510.03134092671865020.984329536640675
870.01281653732293350.02563307464586700.987183462677066
880.01311180702030990.02622361404061990.98688819297969
890.01109681059684290.02219362119368580.988903189403157
900.008435632673667630.01687126534733530.991564367326332
910.00700988231187460.01401976462374920.992990117688125
920.005684285655983080.01136857131196620.994315714344017
930.00417238572498480.00834477144996960.995827614275015
940.004107159012126430.008214318024252860.995892840987874
950.006095032815710970.01219006563142190.993904967184289
960.004923540792483950.00984708158496790.995076459207516
970.004132592073915360.008265184147830720.995867407926085
980.003183519546736010.006367039093472010.996816480453264
990.002416002782183490.004832005564366980.997583997217817
1000.002045476543347750.004090953086695510.997954523456652
1010.001621383270851680.003242766541703360.998378616729148
1020.001194824776916680.002389649553833350.998805175223083
1030.001514341498144390.003028682996288780.998485658501856
1040.001178049046612260.002356098093224510.998821950953388
1050.005144787914121130.01028957582824230.994855212085879
1060.01297522783279870.02595045566559750.987024772167201
1070.01376218603548960.02752437207097910.98623781396451
1080.01884532676345060.03769065352690120.98115467323655
1090.01468696022822900.02937392045645810.98531303977177
1100.01063908807700780.02127817615401560.989360911922992
1110.007680369153452350.01536073830690470.992319630846548
1120.02212775385329210.04425550770658420.977872246146708
1130.02211825922263250.0442365184452650.977881740777368
1140.05532848596498740.1106569719299750.944671514035013
1150.04713639170565710.09427278341131410.952863608294343
1160.03942747995681470.07885495991362940.960572520043185
1170.1037658932952080.2075317865904160.896234106704792
1180.09792479941189480.1958495988237900.902075200588105
1190.08724583162094070.1744916632418810.91275416837906
1200.1523436132538380.3046872265076750.847656386746162
1210.1495101123288110.2990202246576210.85048988767119
1220.1898212314671350.3796424629342700.810178768532865
1230.1892017623483850.378403524696770.810798237651615
1240.1791726969149500.3583453938299010.82082730308505
1250.1551863820878940.3103727641757880.844813617912106
1260.1243628190448060.2487256380896110.875637180955194
1270.09731904476253530.1946380895250710.902680955237465
1280.0947404360505060.1894808721010120.905259563949494
1290.1326337608533910.2652675217067810.86736623914661
1300.1146561010108540.2293122020217070.885343898989146
1310.09610701241889350.1922140248377870.903892987581106
1320.08526733619917370.1705346723983470.914732663800826
1330.0833249937689010.1666499875378020.916675006231099
1340.07409555307210090.1481911061442020.9259044469279
1350.1731010135385920.3462020270771840.826898986461408
1360.1380309681349260.2760619362698510.861969031865074
1370.1156667783362390.2313335566724780.88433322166376
1380.1631717686233590.3263435372467190.83682823137664
1390.3949034503525630.7898069007051250.605096549647437
1400.3404830589815730.6809661179631450.659516941018427
1410.4844937380520170.9689874761040340.515506261947983
1420.3932680680070850.7865361360141710.606731931992915
1430.5564286642972330.8871426714055350.443571335702767
1440.5025856130784580.9948287738430850.497414386921542
1450.4056433860077290.8112867720154580.594356613992271
1460.3008476352833820.6016952705667650.699152364716618
1470.2922620800867700.5845241601735410.70773791991323
1480.1744211088474490.3488422176948970.825578891152551


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/19/t12901814095tihr0h2zbose66/106avp1290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/106avp1290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/1h9yv1290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/1h9yv1290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/2h9yv1290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/2h9yv1290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/3s0gy1290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/3s0gy1290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/4s0gy1290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/4s0gy1290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/5s0gy1290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/5s0gy1290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/62ax11290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/62ax11290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/7vje41290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/7vje41290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/8vje41290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/8vje41290181421.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/9vje41290181421.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t12901814095tihr0h2zbose66/9vje41290181421.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