Home » date » 2010 » Dec » 04 »

p_Stress_MR3v2

*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: Sat, 04 Dec 2010 13:59:58 +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/04/t1291471120fbz96hld3ll3sqi.htm/, Retrieved Sat, 04 Dec 2010 14:58:51 +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/04/t1291471120fbz96hld3ll3sqi.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 «
23 10 0 0 53 7 12 2 4 21 6 0 0 86 4 11 4 3 21 13 0 0 66 6 14 7 5 21 12 1 0 67 5 12 3 3 24 8 0 0 76 4 21 7 6 22 6 0 0 78 3 12 2 5 21 10 0 0 53 5 22 7 6 22 10 0 0 80 6 11 2 6 21 9 0 0 74 5 10 1 5 20 9 0 0 76 6 13 2 5 22 7 1 0 79 7 10 6 3 21 5 0 0 54 6 8 1 5 21 14 1 0 67 7 15 1 7 23 6 0 0 87 6 10 1 5 22 10 1 0 58 4 14 2 5 23 10 1 0 75 6 14 2 3 22 7 0 0 88 4 11 2 5 24 10 1 0 64 5 10 1 6 23 8 0 0 57 3 13 7 5 21 6 1 0 66 3 7 1 2 23 10 0 0 54 4 12 2 5 23 12 0 0 56 5 14 4 4 21 7 1 0 86 3 11 2 6 20 15 0 0 80 7 9 1 3 32 8 1 0 76 7 11 1 5 22 10 0 0 69 4 15 5 4 21 13 1 0 67 4 13 2 5 21 8 0 0 80 5 9 1 2 21 11 1 0 54 6 15 3 2 22 7 0 0 71 5 10 1 5 21 9 0 0 84 4 11 2 2 21 10 1 0 74 6 13 5 2 21 8 1 0 71 5 8 2 2 22 15 1 0 63 5 20 6 5 21 9 1 0 71 6 12 4 5 21 7 0 0 76 2 10 1 1 21 11 1 0 69 6 10 3 5 21 9 1 0 74 7 9 6 2 23 8 0 0 75 5 14 7 6 21 8 1 0 54 5 8 4 1 23 12 0 0 69 5 11 5 3 23 13 0 0 68 6 13 3 2 21 9 0 0 75 4 11 2 5 21 11 1 0 75 6 11 2 3 20 8 0 0 72 5 10 2 4 21 10 1 0 67 5 14 2 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
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
PStress[t] = + 7.6711792310796 -0.0928953860553277AGE[t] + 0.69427644065709Pstress_M[t] + 0.00132951929824787Pstress_OKT[t] -0.0313243922834601BelInSprt[t] + 0.191375049293081KunnenRekRel[t] + 0.407160247689161Depressie[t] -0.194751314134405Slaapgebrek[t] + 0.175770377072836`ToekZorgen `[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.67117923107962.1484883.57050.0004970.000248
AGE-0.09289538605532770.066865-1.38930.1670630.083532
Pstress_M0.694276440657090.338262.05250.0420830.021041
Pstress_OKT0.001329519298247870.333230.0040.9968230.498411
BelInSprt-0.03132439228346010.016238-1.92910.0558530.027926
KunnenRekRel0.1913750492930810.1077531.77610.0780110.039006
Depressie0.4071602476891610.0616586.603600
Slaapgebrek-0.1947513141344050.092416-2.10730.0369660.018483
`ToekZorgen `0.1757703770728360.1107891.58650.1149930.057496


Multiple Linear Regression - Regression Statistics
Multiple R0.631622752228292
R-squared0.398947301132442
Adjusted R-squared0.362793755335897
F-TEST (value)11.0348042589662
F-TEST (DF numerator)8
F-TEST (DF denominator)133
p-value7.2215566859768e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.90495367626601
Sum Squared Residuals482.636851659679


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.4135197581277-0.413519758127713
268.01904718397413-2.01904718397413
31310.01705268303942.98294731696057
41210.10177368913361.89822631086640
5812.0682646143497-4.06826461434965
669.13357551699705-3.13357551699705
71013.6659470920175-3.66594709201745
8109.413662009693050.586337990306955
999.11494938952846-0.11494938952846
10910.3633004692430-1.36330046924303
1178.61716125648139-1.61716125648139
1259.11849178911243-4.11849178911242
131412.79858866734741.20141133265259
1468.7133165670259-2.71331656702591
151011.4600353479947-1.46003534799474
161010.8658346375611-0.865834637561083
1778.60454639576637-1.60454639576637
181010.019553971927-0.0195539719270039
1989.13189604591151-1.13189604591151
2067.92827899558108-1.92827899558108
21109.983840595037840.0161594049621587
221210.36161434980071.63838565019932
2379.43876233482546-2.43876233482546
24158.643947518634366.35605248136564
2589.51463814528535-1.51463814528535
261010.0683265204327-0.0683265204326985
271310.86385095580982.13614904419023
2887.992531656920030.00746834307996646
291111.7460762041063-0.746076204106319
3079.11602718032351-2.11602718032351
3198.295428219737030.704571780262972
32109.915765234789990.0842347652100144
3388.3668160663047-0.366816066304697
341513.15874466546791.84125533453214
35910.3246406093041-1.32464060930412
3677.77509394879095-0.775093948790954
37119.767720212627121.23227978737288
3898.283747979192020.716252020807981
3989.5337377081574-1.53373770815739
4088.33405772978187-0.334057729781871
41128.362394815840973.63760518415903
42139.613147003991813.38685299600819
4399.10465888150667-0.104658881506675
44119.830144666604261.16985533339574
4588.89997186894347-0.899971868943468
461011.1108454986463-1.11084549864634
471313.2040964053036-0.204096405303569
481210.46469096113101.53530903886903
491210.36957934369971.63042065630031
5098.570433507107710.429566492892294
5189.66603333382005-1.66603333382005
5298.432325066634310.567674933365692
53128.617108825730393.38289117426961
541211.17977654621150.820223453788547
551614.31605615129621.68394384870376
56119.785261900943841.21473809905616
57139.211713925941253.78828607405876
581010.0302473713546-0.0302473713545974
5999.97576474771397-0.975764747713973
60149.988431104507744.01156889549226
611311.17270102609411.82729897390595
621210.77028457260361.22971542739642
63910.5031813250981-1.50318132509809
64911.0183168889372-2.01831688893717
651010.9119944917688-0.911994491768752
66810.0738968343792-2.07389683437918
6799.66846848852655-0.668468488526547
6898.916130026393990.0838699736060096
69119.073909170709871.92609082929013
7079.23413994659314-2.23413994659314
711111.3373732173340-0.337373217334017
7299.81974531239653-0.81974531239653
73119.282195434852861.71780456514714
7499.58207188627284-0.582071886272845
75810.2753911153100-2.27539111531005
7698.291385378989670.708614621010331
7789.64765934410316-1.64765934410316
7899.1370606178854-0.137060617885401
79109.40320357637750.596796423622493
80910.2440636456331-1.24406364563309
811713.81528753579673.18471246420325
8279.07837232864177-2.07837232864177
831110.83392115385520.166078846144771
8499.2734061692131-0.273406169213109
85109.601921150931350.398078849068647
86118.866646513511112.13335348648889
8788.50493029918662-0.504930299186625
881211.69688141931740.303118580682595
89109.496621250619780.503378749380216
9079.6279231599815-2.6279231599815
9199.0002190523059-0.000219052305901545
9278.27462486772217-1.27462486772217
931211.22156553601620.778434463983807
9489.47415476597007-1.47415476597007
951310.54443319677552.4555668032245
96911.0992586616482-2.09925866164824
971513.04410438070201.95589561929803
9888.67840885057-0.678408850570005
991411.9938226841162.00617731588401
1001413.73955648835740.260443511642557
101910.0186792766742-1.01867927667418
1021311.42633018758311.57366981241690
103118.66966156953442.3303384304656
1041011.9229874256271-1.92298742562706
10569.86457435479679-3.86457435479679
10688.64427002491804-0.644270024918035
1071010.9752609867872-0.975260986787247
108107.914449653271872.08555034672813
109109.453181940742750.54681805925725
1101211.36534119718120.634658802818793
111109.347061794647070.652938205352933
11299.0368003475435-0.0368003475435022
11396.981282622861032.01871737713897
114118.782563252695352.21743674730465
11578.51064924979036-1.51064924979036
11678.49269612671155-1.49269612671155
11758.08072701379303-3.08072701379303
11899.07511111164341-0.0751111116434137
1191111.6816142036233-0.681614203623329
1201512.42808180608052.57191819391945
12197.438471438554441.56152856144556
12299.71143835021613-0.711438350216127
12389.28322017144213-1.28322017144213
1241315.9025205273436-2.9025205273436
1251010.8189686267102-0.818968626710225
1261311.39670258905541.60329741094457
12798.239343726563280.760656273436715
1281110.19724386387620.802756136123795
129810.7296972594544-2.72969725945438
130108.851625188512171.14837481148783
13199.38812824994953-0.388128249949526
13288.43336675499014-0.433366754990136
13388.08378073489939-0.0837807348993903
1341310.84836176799342.15163823200663
1351111.0140004999754-0.0140004999754446
13689.51463814528535-1.51463814528535
137129.70222522374092.29777477625911
1381511.68694711615153.31305288384848
1391110.83392115385520.166078846144771
1401010.0642268276895-0.0642268276895192
14158.08072701379303-3.08072701379303
142117.09304301487433.9069569851257


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.995105089519110.00978982096178010.00489491048089005
130.9884361097998260.02312778040034810.0115638902001741
140.9822740637135810.03545187257283760.0177259362864188
150.9672012798533470.06559744029330510.0327987201466525
160.9436184567956660.1127630864086680.056381543204334
170.9159865818132860.1680268363734280.0840134181867142
180.8841644169267820.2316711661464360.115835583073218
190.8518293882234350.2963412235531310.148170611776565
200.8133447472181040.3733105055637930.186655252781896
210.8243243184512250.351351363097550.175675681548775
220.8779615341848380.2440769316303230.122038465815162
230.8576099537605660.2847800924788690.142390046239434
240.9904452218827060.01910955623458730.00955477811729367
250.9867029580194610.02659408396107740.0132970419805387
260.982570289726960.03485942054608130.0174297102730406
270.988510904039090.02297819192182030.0114890959609101
280.9825668722524430.03486625549511400.0174331277475570
290.9792718651098380.04145626978032310.0207281348901615
300.9783906876014190.04321862479716250.0216093123985812
310.9722030572965670.05559388540686690.0277969427034334
320.9615523113209640.07689537735807230.0384476886790361
330.9492374048723010.1015251902553980.0507625951276989
340.9552099477367950.08958010452640930.0447900522632046
350.9505705281278850.09885894374422930.0494294718721146
360.936816729334260.1263665413314810.0631832706657405
370.922035187288860.1559296254222790.0779648127111395
380.8992231721831420.2015536556337170.100776827816858
390.8902191375136390.2195617249727230.109780862486361
400.8655978379137870.2688043241724260.134402162086213
410.9351979823238370.1296040353523250.0648020176761626
420.9528846826366370.09423063472672560.0471153173633628
430.941648861689760.1167022766204800.0583511383102399
440.9260502752350940.1478994495298130.0739497247649064
450.9139746343452780.1720507313094440.086025365654722
460.9029262903810680.1941474192378640.0970737096189318
470.8935325378964250.2129349242071490.106467462103575
480.8867743471354890.2264513057290230.113225652864511
490.8874125936441840.2251748127116330.112587406355816
500.8661781393852040.2676437212295910.133821860614796
510.8701575928259490.2596848143481030.129842407174051
520.843344831601810.3133103367963780.156655168398189
530.8910868077343940.2178263845312120.108913192265606
540.8676427955355320.2647144089289350.132357204464468
550.8775869386658490.2448261226683020.122413061334151
560.8662334394736160.2675331210527680.133766560526384
570.9143624349896030.1712751300207950.0856375650103973
580.8924433901816340.2151132196367330.107556609818366
590.8752196026388670.2495607947222670.124780397361133
600.8976841853144260.2046316293711490.102315814685574
610.8980432697240210.2039134605519580.101956730275979
620.9071044166949970.1857911666100070.0928955833050033
630.9284346493574270.1431307012851450.0715653506425727
640.9369743840092760.1260512319814480.0630256159907241
650.9369907932818260.1260184134363490.0630092067181743
660.9394415547466470.1211168905067060.060558445253353
670.9248665704368650.150266859126270.075133429563135
680.9060393587313070.1879212825373860.093960641268693
690.9128571239604320.1742857520791370.0871428760395683
700.9275246263730760.1449507472538490.0724753736269244
710.9128508415292270.1742983169415460.0871491584707728
720.9032555300327950.1934889399344090.0967444699672046
730.9062333060755930.1875333878488140.0937666939244069
740.8840598938675010.2318802122649980.115940106132499
750.8902319037575150.2195361924849700.109768096242485
760.8734287148393840.2531425703212330.126571285160616
770.8641543548279980.2716912903440050.135845645172002
780.8440322936712650.3119354126574690.155967706328735
790.8163016815584340.3673966368831330.183698318441566
800.7931005921734270.4137988156531470.206899407826573
810.8489362696843080.3021274606313830.151063730315692
820.8501027622461740.2997944755076520.149897237753826
830.8266472200845630.3467055598308730.173352779915437
840.7951544927866630.4096910144266730.204845507213337
850.7577846691540730.4844306616918540.242215330845927
860.7916851251711760.4166297496576490.208314874828824
870.7550949085551470.4898101828897060.244905091444853
880.7117148535788090.5765702928423810.288285146421191
890.6712106529851850.657578694029630.328789347014815
900.7069381320618360.5861237358763280.293061867938164
910.6603085202347550.679382959530490.339691479765245
920.642956637534680.714086724930640.35704336246532
930.6009484317193270.7981031365613460.399051568280673
940.5870793369077290.8258413261845420.412920663092271
950.65224724547620.69550550904760.3477527545238
960.6540051526485820.6919896947028370.345994847351418
970.660258506973570.679482986052860.33974149302643
980.6166417843067710.7667164313864580.383358215693229
990.6445334683133750.710933063373250.355466531686625
1000.6279667218997540.7440665562004920.372033278100246
1010.6142754660809880.7714490678380250.385724533919012
1020.6104822849306310.7790354301387390.389517715069369
1030.662276562852940.675446874294120.33772343714706
1040.6578471297971360.6843057404057280.342152870202864
1050.799750027705580.4004999445888390.200249972294419
1060.7733833279472480.4532333441055050.226616672052752
1070.7977534611140530.4044930777718930.202246538885947
1080.7815692035066010.4368615929867980.218430796493399
1090.7373257648255870.5253484703488270.262674235174413
1100.7304119640476870.5391760719046260.269588035952313
1110.7140155444738030.5719689110523950.285984455526197
1120.6529748584189930.6940502831620140.347025141581007
1130.6064148369287840.7871703261424330.393585163071216
1140.5968378123949980.8063243752100050.403162187605002
1150.5369163591755940.9261672816488120.463083640824406
1160.4737845872171970.9475691744343940.526215412782803
1170.6001754836048720.7996490327902560.399824516395128
1180.5268047540030940.9463904919938130.473195245996906
1190.4886495402839320.9772990805678650.511350459716068
1200.7889663038472980.4220673923054030.211033696152702
1210.7305063889270560.5389872221458890.269493611072944
1220.6765398473467370.6469203053065270.323460152653263
1230.5892287070549960.8215425858900080.410771292945004
1240.5137622801435440.9724754397129120.486237719856456
1250.429748429892280.859496859784560.57025157010772
1260.3366317216086330.6732634432172660.663368278391367
1270.4275615844568920.8551231689137830.572438415543108
1280.3285532045114070.6571064090228140.671446795488593
1290.3654627951037140.7309255902074280.634537204896286
1300.3140033821102870.6280067642205740.685996617889713


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00840336134453781OK
5% type I error level100.0840336134453782NOK
10% type I error level160.134453781512605NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/1024uz1291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/1024uz1291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/1dlf51291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/1dlf51291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/2dlf51291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/2dlf51291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/3ovw81291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/3ovw81291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/4ovw81291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/4ovw81291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/5ovw81291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/5ovw81291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/6y4vb1291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/6y4vb1291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/7rdcw1291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/7rdcw1291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/8rdcw1291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/8rdcw1291471186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/9rdcw1291471186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471120fbz96hld3ll3sqi/9rdcw1291471186.ps (open in new window)


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