Home » date » 2010 » Dec » 19 »

MR

*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, 18 Dec 2010 23:03:08 +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/19/t1292713281vhw0cz1y7ptnz94.htm/, Retrieved Sun, 19 Dec 2010 00:01:33 +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/19/t1292713281vhw0cz1y7ptnz94.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 «
14 11 11 26 9 2 1 1 18 12 8 20 9 1 1 1 11 15 12 21 9 4 1 1 12 10 10 31 14 1 1 2 16 12 7 21 8 5 2 1 18 11 6 18 8 1 1 1 14 5 8 26 11 1 1 1 14 16 16 22 10 1 1 1 15 11 8 22 9 1 1 1 15 15 16 29 15 1 1 1 17 12 7 15 14 2 1 2 19 9 11 16 11 1 1 1 10 11 16 24 14 3 2 2 18 15 16 17 6 1 1 1 14 12 12 19 20 1 1 2 14 16 13 22 9 1 1 2 17 14 19 31 10 1 1 1 14 11 7 28 8 1 1 2 16 10 8 38 11 2 1 1 18 7 12 26 14 4 2 2 14 11 13 25 11 1 1 1 12 10 11 25 16 2 1 1 17 11 8 29 14 1 1 2 9 16 16 28 11 2 4 1 16 14 15 15 11 3 1 2 14 12 11 18 12 1 1 1 11 12 12 21 9 1 2 2 16 11 7 25 7 1 2 1 13 6 9 23 13 1 1 2 17 14 15 23 10 1 1 1 15 9 6 19 9 2 1 1 14 15 14 18 9 1 1 2 16 12 14 18 13 1 1 2 9 12 7 26 16 1 1 2 15 9 15 18 12 1 1 2 17 13 14 18 6 1 1 1 13 15 17 28 14 1 1 2 15 11 14 17 14 1 1 2 16 10 5 29 10 2 2 1 16 13 14 12 4 1 1 2 12 16 8 28 12 1 1 1 11 13 8 20 14 1 1 1 15 14 13 17 9 2 1 1 17 14 14 17 9 1 1 1 13 16 16 20 10 1 1 2 16 9 11 31 14 1 1 1 14 8 10 21 10 1 1 2 11 8 10 19 9 1 1 2 12 12 10 23 1 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 18.9957165366223 -0.0278024991470845Popularity[t] + 0.0455463905768971KnowingPeople[t] -0.00637402452264036CMistakes[t] -0.280840510374423DAction[t] + 0.181746271876873Tobacco[t] -0.914459276859248Drugs[t] -0.762811775254921Gender[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)18.99571653662231.55945912.18100
Popularity-0.02780249914708450.078309-0.3550.7231080.361554
KnowingPeople0.04554639057689710.0661990.6880.4926050.246302
CMistakes-0.006374024522640360.035558-0.17930.8579990.429
DAction-0.2808405103744230.073563-3.81770.0002030.000102
Tobacco0.1817462718768730.2018330.90050.3694470.184723
Drugs-0.9144592768592480.368378-2.48240.0142590.007129
Gender-0.7628117752549210.401175-1.90140.0593430.029672


Multiple Linear Regression - Regression Statistics
Multiple R0.430048346921455
R-squared0.184941580689876
Adjusted R-squared0.143296259995198
F-TEST (value)4.44087301057838
F-TEST (DF numerator)7
F-TEST (DF denominator)137
p-value0.000177261813259388
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.19879831012477
Sum Squared Residuals662.355819179236


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11415.1838316030315-1.18383160303153
21814.87588780741263.12411219258743
31115.5135306633869-4.51353066338689
41212.7854569899845-0.785456989984458
51614.91733371333571.08266628666430
61815.10618608482562.89381391517442
71414.4705801335575-0.470580133557483
81414.8354603760197-0.835460376019714
91514.89094225751440.109057742485617
101513.41444215163621.5855578483638
111712.87694348419874.12305651580128
121914.55974955392624.44025044607376
131012.5245842728517-2.52458427285174
141816.01849503927771.98150496072231
151411.21239000486922.78760999513077
161414.2168499394085-0.216849939408523
171714.97033832534082.02966167465919
181414.3251804549211-0.325180454921146
191614.43682561542721.56317438457275
201812.62260692996415.37739307003592
211414.5378711160821-0.537871116082101
221213.2521245540801-1.25212455408015
231712.67930975872894.32069024127114
24911.9547441598086-2.95474415980858
251614.20997741351991.79002258648013
261414.1827534970653-0.182753497065282
271113.3744282930834-2.37442829308336
281614.47349553725921.52650446274084
291313.1829533025514-0.182953302551449
301714.83914495921432.16085504078566
311515.0563228200996-0.0563228200995524
321414.3156949272231-0.315694927223066
331613.27574038316662.72425961683337
34912.0634019218240-3.06340192182396
351513.68553478155921.31446521844080
361715.97663323189541.02336676810457
371312.98439130185520.0156086981447623
381513.02907639646191.97092360353807
391613.72393389791552.27606610208450
401615.81374662452520.186253375474806
411213.8711640835198-1.87116408351985
421113.4438827563934-2.44388275639338
431515.2488831074477-0.248883107447689
441715.11268322614771.88731677385229
451314.0853966498101-1.08539664981007
461613.62161765496342.37838234503664
471414.0281642750027-0.0281642750027268
481114.3217528344224-3.32175283442243
491213.5436559631263-1.54365596312634
501215.0266304790701-3.02663047907007
511515.1942063280719-0.194206328071934
521615.35121196592020.648788034079823
531515.1113719669578-0.111371966957814
541213.0078972731827-1.00789727318273
551213.9167541087356-1.91675410873562
56812.6239617231306-4.62396172313061
571314.3862312588195-1.38623125881954
581114.8003556334316-3.80035563343157
591415.3904512549226-1.39045125492264
601513.74451363578221.25548636421785
611013.9796685196258-3.97966851962584
621114.9184285830303-3.91842858303025
631213.3881385221454-1.38813852214537
641513.66210128020751.33789871979248
651514.55942022191670.440579778083251
661413.23195521499930.768044785000675
671612.70636394877423.29363605122582
681515.6057619488741-0.605761948874102
691515.4100005604537-0.410000560453668
701314.0790226252874-1.07902262528743
711714.75711564391122.2428843560888
721313.3163197666959-0.316319766695935
731513.81515992579991.18484007420015
741314.3141936282855-1.31419362828546
751513.13798295276981.86201704723019
761614.21291616183881.78708383816118
771514.72024967891350.279750321086534
781613.85247585401732.14752414598272
791514.50407763268390.495922367316139
801414.8077247998208-0.807724799820837
811512.78675867629602.21324132370396
82713.2415770178752-6.24157701787518
831715.48468344062411.51531655937586
841316.2435482236231-3.24354822362315
851514.54193873954820.458061260451782
861414.0916607159115-0.0916607159114877
871312.48249890681910.517501093180875
881614.97073209470921.02926790529078
891214.5054558148220-2.50545581482197
901415.4631880430515-1.46318804305149
911714.38946587879452.61053412120552
921514.84326634725040.156733652749603
931712.91461703690474.08538296309534
941213.0957942989674-1.09579429896735
951614.13343236834411.86656763165585
961112.7267172565135-1.72671725651346
971514.20228800329440.797711996705624
98913.9461349596996-4.94613495969958
991614.8482084250651.15179157493501
1001012.6384430932132-2.63844309321322
1011011.9097875817659-1.9097875817659
1021514.69113592057650.308864079423518
1031114.1189463288907-3.11894632889067
1041315.0133882751135-2.01338827511348
1051412.54612314809311.45387685190692
1061815.20496414969192.79503585030809
1071614.50662783805801.49337216194197
1081413.07268468325980.927315316740201
1091414.1847437244906-0.184743724490588
1101414.5128154083329-0.512815408332917
1111414.0170569178191-0.0170569178190783
1121213.6018834798003-1.60188347980030
1131414.6330315207020-0.633031520702012
1141515.0048416954307-0.0048416954307306
1151513.99094871813341.00905128186662
1161312.15820211809120.841797881908786
1171714.20474189333062.79525810666936
1181714.59296389757922.40703610242076
1191915.59963717503453.40036282496553
1201514.53463649610720.465363503892837
1211313.8401108452435-0.840110845243483
122911.9320485170236-2.93204851702361
1231515.1418406191236-0.141840619123571
1241514.59146309938640.408536900613567
1251615.2662935966630.733706403337001
1261113.3044149073808-2.30441490738084
1271413.66260500799720.337394992002850
1281113.5778324867961-2.57783248679606
1291512.45378096124422.54621903875583
1301312.80358392168580.196416078314241
1311612.90742475188483.09257524811517
1321415.6099354605564-1.60993546055643
1331513.98998699450721.01001300549285
1341614.51811675155971.48188324844031
1351614.9873469983761.01265300162401
1361112.4350752898802-1.43507528988019
1371313.4421651686227-0.442165168622658
1381614.20997741351991.79002258648013
1391214.0979678174859-2.09796781748592
140913.4928538066929-4.49285380669292
1411313.0329331774603-0.0329331774602981
1421316.2435482236231-3.24354822362315
1431414.7118651812982-0.711865181298224
1441915.59963717503453.40036282496553
1451315.3188635876083-2.31886358760825


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2497096611911540.4994193223823070.750290338808846
120.2105053697390850.4210107394781710.789494630260915
130.2320845650031270.4641691300062530.767915434996874
140.3979140591442430.7958281182884860.602085940855757
150.3405525336689060.6811050673378120.659447466331094
160.2411307777969680.4822615555939360.758869222203032
170.5685053132763290.8629893734473420.431494686723671
180.4771434188196310.9542868376392610.522856581180369
190.5316197417909810.9367605164180370.468380258209019
200.880272593369570.2394548132608590.119727406630430
210.8588239759314020.2823520481371960.141176024068598
220.8565929125361190.2868141749277630.143407087463881
230.8900575383457280.2198849233085450.109942461654272
240.9269901301326660.1460197397346680.0730098698673339
250.9042259722009970.1915480555980060.0957740277990032
260.886954838147330.2260903237053390.113045161852670
270.9123359150993840.1753281698012320.0876640849006158
280.894054031345210.2118919373095820.105945968654791
290.892513269675930.2149734606481420.107486730324071
300.8840138655915070.2319722688169850.115986134408493
310.8639508344792020.2720983310415960.136049165520798
320.8319344192581560.3361311614836880.168065580741844
330.8195058700368780.3609882599262450.180494129963122
340.8878804741593930.2242390516812150.112119525840607
350.8628699310129430.2742601379741150.137130068987058
360.8296483841415020.3407032317169960.170351615858498
370.7894328476575950.4211343046848100.210567152342405
380.761592806043710.4768143879125810.238407193956290
390.7627963302421390.4744073395157220.237203669757861
400.7196986879833260.5606026240333480.280301312016674
410.6993855338425480.6012289323149050.300614466157452
420.7333436643598330.5333126712803340.266656335640167
430.6890939278443030.6218121443113940.310906072155697
440.6644264719708890.6711470560582220.335573528029111
450.6254526657907360.7490946684185280.374547334209264
460.6147103857535590.7705792284928820.385289614246441
470.5851889966375910.8296220067248180.414811003362409
480.7114668017701240.5770663964597520.288533198229876
490.7024817296600410.5950365406799180.297518270339959
500.7472796836437380.5054406327125230.252720316356262
510.7036336855545690.5927326288908630.296366314445431
520.6593469740424810.6813060519150380.340653025957519
530.618954285730320.762091428539360.38104571426968
540.5854777700427720.8290444599144560.414522229957228
550.5665666486648320.8668667026703370.433433351335168
560.7575765373067740.4848469253864510.242423462693226
570.73118488474120.53763023051760.2688151152588
580.8045270977538530.3909458044922940.195472902246147
590.7908321645848610.4183356708302780.209167835415139
600.7651374312144660.4697251375710680.234862568785534
610.8476961189635440.3046077620729120.152303881036456
620.9008366959400280.1983266081199440.099163304059972
630.8865337017423720.2269325965152570.113466298257628
640.8708934980866720.2582130038266570.129106501913328
650.84457514317190.3108497136561980.155424856828099
660.8163176327890960.3673647344218080.183682367210904
670.8528690979301140.2942618041397720.147130902069886
680.825122749338790.3497545013224210.174877250661210
690.7933451446937760.4133097106124490.206654855306224
700.7687608746399120.4624782507201770.231239125360088
710.76852068284930.4629586343013990.231479317150700
720.730247367631710.539505264736580.26975263236829
730.7006434173953280.5987131652093440.299356582604672
740.683634453040180.632731093919640.31636554695982
750.6699730079417820.6600539841164350.330026992058217
760.6513469602014570.6973060795970870.348653039798543
770.6043218702850230.7913562594299540.395678129714977
780.5993232632244190.8013534735511620.400676736775581
790.5537720098596340.8924559802807310.446227990140366
800.5118626739953570.9762746520092860.488137326004643
810.5156831305950520.9686337388098950.484316869404948
820.7967464231861670.4065071536276660.203253576813833
830.7800976597317660.4398046805364670.219902340268234
840.8211514267674220.3576971464651560.178848573232578
850.788076436374560.4238471272508790.211923563625440
860.7498813850448360.5002372299103270.250118614955164
870.7116297426250020.5767405147499960.288370257374998
880.6843006241517710.6313987516964580.315699375848229
890.6899707672688420.6200584654623170.310029232731158
900.6694441381482680.6611117237034640.330555861851732
910.6994322042886880.6011355914226230.300567795711311
920.6525442151702680.6949115696594630.347455784829732
930.8239344216918190.3521311566163630.176065578308181
940.7941130454958330.4117739090083340.205886954504167
950.7956070166502180.4087859666995640.204392983349782
960.777417712911420.4451645741771590.222582287088580
970.7525588763752060.4948822472495880.247441123624794
980.8995403489469360.2009193021061280.100459651053064
990.879589356371920.2408212872561590.120410643628079
1000.8791532132695720.2416935734608550.120846786730428
1010.863336637303990.273326725392020.13666336269601
1020.8321781795597150.335643640880570.167821820440285
1030.8626847774549580.2746304450900830.137315222545042
1040.8866339560063660.2267320879872680.113366043993634
1050.8917159298620910.2165681402758180.108284070137909
1060.9085860510245460.1828278979509080.091413948975454
1070.8849745832118560.2300508335762890.115025416788144
1080.8989646176273920.2020707647452160.101035382372608
1090.8734008598070190.2531982803859620.126599140192981
1100.902661080841910.1946778383161790.0973389191580897
1110.8829562505870480.2340874988259040.117043749412952
1120.8512056553754820.2975886892490370.148794344624518
1130.810401890037170.379196219925660.18959810996283
1140.7659761699762120.4680476600475770.234023830023788
1150.7244214854028170.5511570291943670.275578514597183
1160.6655754381788590.6688491236422820.334424561821141
1170.7132527411515180.5734945176969640.286747258848482
1180.690028965807620.6199420683847590.309971034192379
1190.7037738182983430.5924523634033150.296226181701657
1200.8022129433252530.3955741133494950.197787056674748
1210.749843005172930.500313989654140.25015699482707
1220.8556847425784970.2886305148430050.144315257421503
1230.821635814449320.3567283711013590.178364185550680
1240.782687972155570.4346240556888590.217312027844430
1250.711952054584440.5760958908311210.288047945415560
1260.6649056992476860.6701886015046290.335094300752314
1270.5768304950714150.846339009857170.423169504928585
1280.5328287288021370.9343425423957250.467171271197863
1290.4376338282128670.8752676564257340.562366171787133
1300.3452989663830080.6905979327660170.654701033616992
1310.4245580443337150.849116088667430.575441955666285
1320.569608386365710.8607832272685790.430391613634290
1330.4337544574270580.8675089148541170.566245542572942
1340.6469732828913420.7060534342173150.353026717108658


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


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/1b4wq1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/1b4wq1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/2b4wq1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/2b4wq1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/3ldvb1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/3ldvb1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/4ldvb1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/4ldvb1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/5ldvb1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/5ldvb1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/6wncd1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/6wncd1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/7kbns1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/7kbns1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/8kbns1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/8kbns1292713375.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/9kbns1292713375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292713281vhw0cz1y7ptnz94/9kbns1292713375.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by