Home » date » 2010 » Dec » 03 »

*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, 03 Dec 2010 12:53:42 +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/03/t12913807470pk78m9vw7qva75.htm/, Retrieved Fri, 03 Dec 2010 13:52:38 +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/03/t12913807470pk78m9vw7qva75.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 «
4 4 5 4 4 4 4 4 4 4 4 3 4 4 5 5 4 4 5 5 4 3 3 2 3 4 4 3 2 3 2 3 2 4 3 5 4 3 3 4 5 4 4 3 3 3 3 4 4 2 3 4 4 2 4 2 4 4 3 4 4 5 3 4 3 2 3 2 2 3 4 3 2 4 4 4 4 2 3 2 4 2 3 2 5 4 2 5 5 5 4 3 4 2 3 3 4 4 4 3 4 4 4 4 4 4 3 3 4 4 5 4 3 2 3 3 3 3 3 4 4 4 4 4 4 4 2 3 2 2 2 4 2 4 2 4 4 3 4 4 3 3 2 4 4 4 3 3 2 4 4 2 3 4 4 4 2 4 4 4 4 4 4 3 4 4 4 4 4 4 4 4 4 4 4 4 3 3 4 3 4 3 5 4 4 4 4 4 4 3 4 3 2 4 4 4 1 4 4 4 4 4 4 4 2 4 4 4 3 4 4 2 4 4 4 4 4 3 4 3 2 4 4 4 3 2 4 4 4 3 4 4 5 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 3 2 3 3 5 4 4 4 2 4 4 4 4 4 3 3 3 3 4 4 4 4 3 4 3 4 4 3 3 4 4 3 3 3 4 4 4 4 3 4 4 2 3 2 3 2 3 2 2 2 4 2 2 5 2 4 3 4 4 4 5 4 4 4 4 4 2 4 4 5 4 4 4 4 5 5 4 3 2 4 4 4 4 4 3 3 4 3 4 3 4 4 2 4 4 4 4 5 4 2 4 4 4 4 3 3 4 3 3 4 3 2 2 4 2 1 4 4 4 4 4 4 4 4 4 4 4 3 4 4 4 3 2 3 4 4 2 4 3 2 2 5 2 2 4 2 4 4 4 4 4 4 4 4 3 4 4 4 4 4 4 3 4 4 3 4 4 3 4 4 4 3 4 4 2 3 2 3 1 4 3 4 4 4 4 4 4 4 5 3 4 4 2 4 4 4 4 3 4 4 4 4 5 4 4 5 5 5 5 4 4 2 4 3 4 4 3 3 2 3 3 4 3 3 3 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 0.798651349529265 + 0.00472531567739815x1[t] + 0.207076583341754x2[t] + 0.157771782945949x3[t] + 0.149637329469757x4[t] + 0.173326753875179x5[t] + 0.0319795163326446x6[t] -0.0387105943596768M1[t] + 0.0768735256343226M2[t] + 0.112509114385824M3[t] -0.132101853134254M4[t] -0.157713147188171M5[t] + 0.217054121005734M6[t] + 0.16140957424235M7[t] -0.554040474802723M8[t] -0.206280916205303M9[t] + 0.107726425781439M10[t] + 0.377411731782024M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.7986513495292650.4468951.78710.076180.03809
x10.004725315677398150.0638960.0740.9411580.470579
x20.2070765833417540.0720532.87390.0047160.002358
x30.1577717829459490.0661022.38680.0183930.009197
x40.1496373294697570.0832081.79840.0743710.037186
x50.1733267538751790.0732062.36770.019330.009665
x60.03197951633264460.0638650.50070.6173790.308689
M1-0.03871059435967680.259658-0.14910.8817120.440856
M20.07687352563432260.2539470.30270.7625770.381288
M30.1125091143858240.2546160.44190.659290.329645
M4-0.1321018531342540.261175-0.50580.6138290.306914
M5-0.1577131471881710.253138-0.6230.5343220.267161
M60.2170541210057340.2553420.85010.3968120.198406
M70.161409574242350.2559430.63060.5293450.264673
M8-0.5540404748027230.254923-2.17340.0315110.015755
M9-0.2062809162053030.258109-0.79920.4255880.212794
M100.1077264257814390.2600120.41430.6793080.339654
M110.3774117317820240.2588721.45790.1472050.073602


Multiple Linear Regression - Regression Statistics
Multiple R0.631888676545997
R-squared0.399283299547052
Adjusted R-squared0.323072971877648
F-TEST (value)5.23922822217902
F-TEST (DF numerator)17
F-TEST (DF denominator)134
p-value1.00962128657400e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.624867951380325
Sum Squared Residuals52.3216341927407


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
143.865086465082120.134913534917875
243.623956672264570.376043327735434
354.136918989508160.863081010491836
432.955988841326250.0440111586737519
522.63110288833281-0.63110288833281
653.722252984693211.27774701530679
743.338919038907490.66108096109251
822.77472099401507-0.774720994015071
943.424710214095480.575289785904525
1042.549888953552061.45011104644794
1143.655253725521120.344746274478885
1222.74128154825911-0.741281548259107
1353.72459258134771.27540741865230
1433.05203172263511-0.0520317226351052
1543.804504274808420.195495725191577
1643.526143477821770.473856522178231
1732.809764731591750.190235268408255
1843.913774597105730.086225402894269
1922.76047431048474-0.760474310484738
2042.983592040472721.01640795952728
2133.03958156120114-0.0395815612011431
2233.32239485771194-0.322394857711944
2343.659979041198510.340020958801487
2443.489643892758240.510356107241757
2543.658009881740320.34199011825968
2643.380175256912760.619824743087236
2753.809229590485821.19077040951418
2833.04199847373209-0.0419984737320906
2913.53900732891183-2.53900732891183
3043.730997211875760.269002788124245
3143.848679418987550.15132058101245
3232.620059852063620.379940147936378
3333.30766217466472-0.307662174664718
3443.958809547028590.0411904529714089
3544.07413220788202-0.0741322078820209
3643.728699992432640.271300007567358
3733.43334821356758-0.433348213567577
3843.764143370379520.235856629620477
3933.43965590852072-0.439655908520720
4043.370142008009750.62985799199025
4133.05827146262094-0.0582714626209402
4243.692043781494490.307956218505508
4332.765809399868490.234190600131508
4422.21596709044127-0.215967090441266
4533.64007688936445-0.640076889364452
4643.520882852322180.479117147677818
4744.39709629122696-0.397096291226957
4833.6872698447452-0.6872698447452
4933.32218602924179-0.322186029241793
5043.796122886712170.203877113287833
5143.767799442798380.23220055720162
5232.962484470137570.0375155298624292
5322.65153881339047-0.651538813390471
5443.913774597105730.0862254028942692
5543.616118948124480.383881051875521
5632.589850648864910.410149351135093
5722.41881463524633-0.418814635246328
5843.804446901881440.195553098118565
5934.07413220788202-1.07413220788202
6033.5069691768214-0.506969176821403
6143.436279066129080.563720933870918
6232.910424684324740.0895753156752582
6343.841209106818470.158790893181534
6433.24907505707384-0.249075057073844
6543.566261529567070.433738470432928
6644.60158704673837-0.601587046738371
6743.658928119708960.341071880291044
6832.563074733446950.43692526655305
6932.462077942086130.537922057913871
7033.77246738554879-0.77246738554879
7143.140899518232720.859100481767279
7232.523446844499070.476553155500927
7322.54022949372711-0.540229493727114
7443.945760216181920.0542397838180752
7543.989530258409620.0104697415903816
7643.892308021988080.107691978011922
7732.344999275448950.655000724551051
7854.244873133926860.75512686607314
7933.50115633676301-0.501156336763007
8022.41343740397719-0.413437403977192
8133.11003622267776-0.110036222677761
8233.43959853559373-0.439598535593732
8343.726609125657480.273390874342522
8443.158545355937110.841454644062886
8533.40950315071112-0.409503150711124
8622.49804183077516-0.498041830775164
8743.611343837731040.388656162268964
8843.007063954855980.992936045144022
8932.642957756509860.357042243490141
9043.714572666472340.28542733352766
9133.33550990110869-0.335509901108695
9222.56262059819162-0.562620598191625
9333.28040797400947-0.280407974009472
9433.23429226538591-0.234292265385908
9533.20826768869680-0.208267688696803
9643.311591823205670.688408176794335
9743.659780194874250.34021980512575
9843.079417411759420.920582588240582
9933.22917018738017-0.229170187380173
10043.650296919770210.349703080229789
10142.996106893071541.00389310692845
10232.837424356779970.162575643220034
10343.998316748457310.00168325154269271
10433.16179974847633-0.161799748476328
10543.330897463814820.669102536185184
10644.15466518588162-0.154665185881618
10733.91163510925867-0.911635109258673
10833.51394309087002-0.513943090870021
10933.45880795110693-0.458807951106929
11033.54241255476828-0.542412554768284
11133.10544673070509-0.105446730705092
11222.48826838263998-0.488268382639978
11343.473018182344780.526981817655222
11423.02335107904091-1.02335107904091
11533.33550990110869-0.335509901108695
11632.806856148798750.193143851201253
11732.947539124054410.0524608759455865
11843.820001872810670.179998127189335
11943.522941680114520.477058319885483
12032.991322941636370.00867705836363157
12143.621305049730280.378694950269723
12233.09188589167611-0.0918858916761129
12333.64673249186247-0.646732491862474
12433.3494075861478-0.349407586147797
12543.619960310038900.380039689961104
12623.21946651866176-1.21946651866176
12743.674898529857050.325101470142954
12832.943478070663880.0565219293361169
12932.895279321115140.104720678884860
13043.791431494276810.208568505723186
13143.554921196447160.445078803552838
13243.660015644089950.339984355910046
13333.28495552714287-0.284955527142873
13422.25662186492651-0.256621864926505
13543.809229590485820.190770409514178
13623.50065959030045-1.50065959030045
13733.16943364694672-0.169433646946724
13843.873660627296890.126339372703106
13933.4427921942493-0.4427921942493
14032.529324903980380.470675096019625
14133.14291647767015-0.142916477670151
14233.63112014800626-0.631120148006256
14344.07413220788202-0.0741322078820209
14433.6872698447452-0.6872698447452
14533.58591639559884-0.585916395598839
14623.05900563668372-1.05900563668372
14723.80922959048582-1.80922959048582
14833.00616321619623-0.00616321619623199
14943.497577181224380.502422818775616
15033.51222139880798-0.512221398807985
15143.722887152374250.277112847625754
15233.83521776660731-0.835217766607312


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.1205967127056170.2411934254112330.879403287294383
220.8198561758400860.3602876483198280.180143824159914
230.7274016744045580.5451966511908830.272598325595442
240.7358481251689340.5283037496621310.264151874831066
250.6388817119802940.7222365760394130.361118288019706
260.6437611449041370.7124777101917250.356238855095863
270.738669966091840.5226600678163210.261330033908161
280.6725748828636750.654850234272650.327425117136325
290.993309495220150.01338100955970040.00669050477985021
300.990482069953730.01903586009253840.0095179300462692
310.9845733063348670.03085338733026710.0154266936651335
320.9831387523935990.03372249521280170.0168612476064009
330.976759979814450.04648004037110170.0232400201855508
340.9664552766053550.06708944678929010.0335447233946450
350.9552934059051520.08941318818969690.0447065940948484
360.9385724723505920.1228550552988160.061427527649408
370.9701521011798670.05969579764026610.0298478988201331
380.9593943307856640.08121133842867210.0406056692143361
390.9769812057859990.04603758842800230.0230187942140011
400.9841663887257780.03166722254844450.0158336112742222
410.986146952170770.02770609565845990.0138530478292299
420.9822593376107730.03548132477845470.0177406623892274
430.9771704653859940.04565906922801180.0228295346140059
440.9754958785508320.04900824289833650.0245041214491682
450.9739045185491580.05219096290168470.0260954814508423
460.9671466017474630.06570679650507470.0328533982525373
470.9570831659694150.08583366806116910.0429168340305845
480.9521828613451680.09563427730966310.0478171386548316
490.9415245017584320.1169509964831360.058475498241568
500.9260496135646870.1479007728706270.0739503864353135
510.9084200961916360.1831598076167280.0915799038083639
520.8832306567033870.2335386865932270.116769343296613
530.8834112971588470.2331774056823060.116588702841153
540.869248691243710.2615026175125790.130751308756290
550.8564835776786230.2870328446427530.143516422321377
560.8491557430597360.3016885138805290.150844256940264
570.832711231260860.3345775374782810.167288768739141
580.8074119858767580.3851760282464830.192588014123242
590.8593696372457660.2812607255084670.140630362754234
600.8474952777751980.3050094444496040.152504722224802
610.8467625838731870.3064748322536260.153237416126813
620.8151137332763740.3697725334472510.184886266723626
630.792230409316620.415539181366760.20776959068338
640.7572861989258340.4854276021483310.242713801074166
650.7839372705010970.4321254589978060.216062729498903
660.8057879071246550.3884241857506910.194212092875345
670.7829820948703470.4340358102593050.217017905129653
680.7653232965504870.4693534068990250.234676703449512
690.7714016496677090.4571967006645820.228598350332291
700.7967988554448650.406402289110270.203201144555135
710.844497066902310.3110058661953810.155502933097691
720.8253853598823240.3492292802353520.174614640117676
730.8318556355458130.3362887289083740.168144364454187
740.8016905067698230.3966189864603540.198309493230177
750.7878995298167190.4242009403665630.212100470183281
760.7509451905536620.4981096188926750.249054809446338
770.7416453126360070.5167093747279860.258354687363993
780.8014056041141540.3971887917716930.198594395885846
790.7876282221809020.4247435556381970.212371777819098
800.7698527136271210.4602945727457590.230147286372879
810.7295914127163950.5408171745672090.270408587283605
820.7100597454626530.5798805090746940.289940254537347
830.6747880466381090.6504239067237820.325211953361891
840.7029476394591160.5941047210817690.297052360540884
850.666547172517190.666905654965620.33345282748281
860.6622174121516910.6755651756966180.337782587848309
870.6480437463589690.7039125072820620.351956253641031
880.7358802628329590.5282394743340820.264119737167041
890.7039999935927510.5920000128144970.296000006407249
900.7036591388269890.5926817223460220.296340861173011
910.6779496203459820.6441007593080360.322050379654018
920.683394594993250.63321081001350.31660540500675
930.6438977119885070.7122045760229870.356102288011494
940.6068822294522620.7862355410954760.393117770547738
950.5732040195392170.8535919609215670.426795980460783
960.6025738012779010.7948523974441970.397426198722099
970.5866971201912130.8266057596175750.413302879808787
980.7105693576952750.5788612846094490.289430642304725
990.6701434630273110.6597130739453780.329856536972689
1000.7244263892798810.5511472214402380.275573610720119
1010.764697602015380.4706047959692410.235302397984620
1020.7793142727466870.4413714545066250.220685727253313
1030.7322338450759270.5355323098481470.267766154924073
1040.6805328178910120.6389343642179770.319467182108988
1050.6987335995630340.6025328008739320.301266400436966
1060.6424872113122520.7150255773754970.357512788687748
1070.7487846586430630.5024306827138740.251215341356937
1080.7159393373966930.5681213252066130.284060662603307
1090.7007941094083530.5984117811832940.299205890591647
1100.6514883879100830.6970232241798330.348511612089916
1110.618939016882780.7621219662344390.381060983117219
1120.5881153047620310.8237693904759380.411884695237969
1130.5586508875387260.8826982249225480.441349112461274
1140.6228252550489060.7543494899021880.377174744951094
1150.5741593359927380.8516813280145250.425840664007262
1160.506872506666370.986254986667260.49312749333363
1170.4335589841550950.867117968310190.566441015844905
1180.3679582985201070.7359165970402150.632041701479893
1190.3087008026347040.6174016052694080.691299197365296
1200.2606608534148360.5213217068296720.739339146585164
1210.3086269941523070.6172539883046140.691373005847693
1220.2436504670658810.4873009341317620.756349532934119
1230.1963595374225710.3927190748451420.803640462577429
1240.1450481588309500.2900963176619000.85495184116905
1250.1008001680287160.2016003360574330.899199831971284
1260.1330440945422550.266088189084510.866955905457745
1270.09463268996782960.1892653799356590.90536731003217
1280.05716468013057990.1143293602611600.94283531986942
1290.03135331589949470.06270663179898930.968646684100505
1300.03143631006352110.06287262012704230.968563689936479
1310.01538127843536170.03076255687072340.984618721564638


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


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/1gsnv1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/1gsnv1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/2qj4g1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/2qj4g1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/3qj4g1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/3qj4g1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/4qj4g1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/4qj4g1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/51tmj1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/51tmj1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/61tmj1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/61tmj1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/7u2lm1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/7u2lm1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/84b2p1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/84b2p1291380810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/94b2p1291380810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913807470pk78m9vw7qva75/94b2p1291380810.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly 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