Home » date » 2010 » Nov » 22 »

WS7 first regression model

*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: Mon, 22 Nov 2010 19:28:14 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2.htm/, Retrieved Mon, 22 Nov 2010 20:27:34 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2.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 «
41 25 15 9 3 38 25 15 9 4 37 19 14 9 4 36 18 10 14 2 42 18 10 8 4 44 23 9 14 4 40 23 18 15 3 43 25 14 9 4 40 23 11 11 4 45 24 11 14 4 47 32 9 14 4 45 30 17 6 5 45 32 21 10 4 40 24 16 9 4 49 17 14 14 4 48 30 24 8 5 44 25 7 11 4 29 25 9 10 4 42 26 18 16 4 44 23 11 11 5 35 19 13 9 3 32 25 13 11 5 32 25 13 11 5 41 35 18 7 4 29 19 14 13 2 38 20 12 10 4 41 21 12 9 4 38 21 9 9 4 24 23 11 15 3 34 24 8 13 2 38 23 5 16 2 37 19 10 12 3 46 17 11 6 5 48 27 15 4 5 42 27 16 12 4 46 25 12 10 4 43 18 14 14 5 38 22 13 9 4 39 26 10 10 4 34 26 18 14 4 39 23 17 14 4 35 16 12 10 2 41 27 13 9 3 40 25 13 14 3 43 14 11 8 4 37 19 13 9 2 41 20 12 8 4 46 26 12 10 4 26 16 12 9 3 41 18 12 9 3 37 22 9 9 3 39 25 17 9 4 44 29 18 11 5 39 21 7 15 2 36 22 17 8 4 38 22 12 10 2 38 32 12 8 0 38 23 9 14 4 32 31 9 11 4 33 18 13 10 3 46 23 10 12 4 42 24 12 9 4 42 19 10 13 2 43 26 11 14 4 41 14 13 15 2 49 20 6 8 4 45 22 7 7 3 39 24 13 10 4 45 25 11 10 5 31 21 18 13 3 30 21 18 13 3 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 time12 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
StudyForCareer[t] = + 32.7983458450465 + 0.174337617831962PersonalStandards[t] + 0.0374239004797307ParentalExpectations[t] -0.228380669837428Doubts[t] + 1.37570543194539LeaderPreference[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.79834584504653.2881899.974600
PersonalStandards0.1743376178319620.1050631.65940.0993150.049657
ParentalExpectations0.03742390047973070.1314690.28470.7763320.388166
Doubts-0.2283806698374280.156687-1.45760.1472330.073616
LeaderPreference1.375705431945390.4912872.80020.005840.00292


Multiple Linear Regression - Regression Statistics
Multiple R0.365715483024238
R-squared0.133747814523651
Adjusted R-squared0.108639055524337
F-TEST (value)5.32673934730518
F-TEST (DF numerator)4
F-TEST (DF denominator)138
p-value0.000509654484215694
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.01878586322461
Sum Squared Residuals3475.97319264464


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14139.78983506534081.2101649346592
23841.1655404972862-3.16554049728619
33740.0820908898147-3.08209088981469
43635.86474345698590.135256543014120
54239.98643833990122.01356166009877
64439.45041850955674.54958149044325
74038.18314751209151.8168524879085
84341.12811659680651.87188340319354
94040.2104083200285-0.210408320028492
104539.69960392834825.30039607165183
114741.01945707004445.98054292995559
124544.17292382886310.827076171136855
134542.38206655515092.61793344484911
144041.028626779934-1.02862677993396
154938.591512304963610.4084876950364
164843.97812979254644.0218702074536
174440.40938795377353.59061204622651
182940.7126164245704-11.7126164245704
194239.85348512769542.14651487230465
204441.58611375197392.41388624802611
213538.6689615573896-3.66896155738957
223242.0096367885973-10.0096367885973
233242.0096367885973-10.0096367885973
244143.4779497167199-2.47794971671986
252936.4171573465742-7.41715734657419
263839.9532000368498-1.95320003684976
274140.35591832451920.644081675480845
283840.24364662308-2.24364662307996
292437.9211802087334-13.9211802087334
303437.0643020328556-3.06430203285562
313836.09255070407221.90744929592782
323737.8715478464381-0.871547846438091
334641.68199139416934.31800860583074
344844.03182451408273.96817548591735
354240.86649762391761.13350237608243
364640.82488812600965.17511187399043
374340.1415553547412.85844464525902
383840.5676798428308-2.56767984283085
393940.9243779428821-1.92437794288208
403440.3102464673702-6.31024646737021
413939.7498097133946-0.749809713394591
423536.5044387016311-1.50443870163113
434140.06366250004530.936337499954736
444038.57308391519421.4269160848058
454339.32651176905313.67348823094688
463737.2932561254442-0.293256125444175
474140.40996137652460.590038623475379
484640.99922574384155.00077425615846
492638.1085248034139-12.1085248034140
504138.45720003907792.54279996092212
513739.0422788089665-2.04227880896653
523941.2403882982457-2.24038829824566
534442.89410676232381.10589323767623
543936.04710393920512.95289606079485
553640.9457561145872-4.9457561145872
563837.55046440862290.449535591377098
573836.99919106272661.00080893727341
583839.4504185095567-1.45041850955675
593241.5302614617247-9.53026146172473
603338.2662432697202-5.26624326972018
614639.94460374971136.05539625028867
624240.87893117801501.12106882198496
634236.26746174465535.73253825534473
644340.04827916401212.95172083598791
654135.05128401725985.9487159827402
664940.18541797364628.81458202635376
674539.42419234768195.57580765231807
683940.6879744086573-1.68797440865734
694542.16316965747522.83683034252476
703138.2912336161024-7.29123361610243
713038.2912336161024-8.29123361610243
724541.00724860822883.99275139177116
734842.37074557835875.62925442164133
742838.1679892683402-10.1679892683402
753537.5670835601486-2.56708356014864
763840.5884845917848-2.58848459178484
773940.3847459378605-1.38474593786045
784040.2023854556412-0.202385455641188
793838.8321014366166-0.832101436616619
804238.35476044026973.64523955973032
813635.30849230043850.691507699561477
824943.66177110671365.33822889328639
834140.55908355569240.440916444307584
841835.9728295609968-17.9728295609968
853638.0833093647498-2.08330936474978
864238.72277951711313.27722048288688
874142.5786698297113-1.57866982971132
884339.9365808853243.06341911467597
894639.66954049951436.3304595004857
903740.7212127117088-3.72121271170881
913839.0882989965847-1.08829899658469
924340.61347493816712.38652506183290
934142.8070504995487-1.80705049954875
943534.59394925483380.406050745166188
954239.4299620910722.57003790892803
963639.6873954665326-3.68739546653261
973541.083905647432-6.083905647432
983336.2680351674064-3.2680351674064
993638.1249188626578-2.12491886265777
1004839.36393566953298.63606433046715
1014139.95320003684981.04679996315024
1024738.28739634914348.71260365085661
1034139.03844154200751.96155845799251
1043142.1467755982314-11.1467755982314
1053641.115683042709-5.11568304270899
1064641.24038829824574.75961170175434
1073938.05990316432930.94009683567069
1084440.69657069579583.30342930420422
1094337.01444457827845.98555542172159
1103241.0654772576626-9.06547725766257
1114040.4694258414509-0.469425841450911
1124039.10910374553870.890896254461311
1134637.10353517157908.89646482842096
1144539.20859356241125.79140643758881
1153940.6837888112291-1.68378881122908
1164441.64694385287412.35305614712591
1173539.7414385185381-4.74143851853807
1183837.71382938013190.286170619868135
1193836.45039564962571.54960435037434
1203637.3399387058038-1.33993870580377
1214238.05448175140853.94551824859152
1223939.7704912241613-0.770491224161283
1234142.8899211648955-1.88992116489551
1244139.35952497982271.64047502017732
1254738.71057105529768.28942894470244
1263938.61050781567390.38949218432607
1274039.47179668126190.528203318738132
1284440.21098174277963.78901825722038
1294239.50084938688512.49915061311492
1303538.4988095369859-3.49880953698587
1314642.55345439104723.44654560895285
1324337.62654802507495.37345197492507
1334040.0396828768737-0.0396828768736622
1344439.96540849866534.03459150133467
1353740.4595937388199-3.45959373881991
1364640.66716965970335.33283034029665
1373937.16855086990751.83144913009249
1384038.2410278310561.75897216894399
1393738.942788992094-1.94278899209403
1402939.5006242946032-10.5006242946032
1413337.8703120309455-4.87031203094553
1423539.9490144394215-4.94901443942151
1434235.68679366447686.31320633552321


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.205696099324540.411392198649080.79430390067546
90.1216408292927500.2432816585854990.87835917070725
100.06679300027262210.1335860005452440.933206999727378
110.03154475893917500.06308951787835010.968455241060825
120.01401022914484380.02802045828968750.985989770855156
130.006662162942558260.01332432588511650.993337837057442
140.002741394467160000.005482788934319990.99725860553284
150.02821075664522220.05642151329044450.971789243354778
160.01649776951554770.03299553903109530.983502230484452
170.009291355920843420.01858271184168680.990708644079157
180.2550297707475570.5100595414951130.744970229252443
190.2788281706114870.5576563412229750.721171829388513
200.2177539518037600.4355079036075210.78224604819624
210.1701237900537720.3402475801075450.829876209946228
220.525614649293790.948770701412420.47438535070621
230.7293093369766030.5413813260467930.270690663023397
240.6738969071618580.6522061856762840.326103092838142
250.7615379610079740.4769240779840520.238462038992026
260.7086955617155630.5826088765688740.291304438284437
270.6608894200976740.6782211598046510.339110579902326
280.6017996773752230.7964006452495530.398200322624777
290.8959049889911190.2081900220177620.104095011008881
300.8691555307864720.2616889384270560.130844469213528
310.8506746397163140.2986507205673720.149325360283686
320.8138255659297540.3723488681404920.186174434070246
330.8140625555005320.3718748889989370.185937444499468
340.8056573620133990.3886852759732020.194342637986601
350.7644676267678770.4710647464642460.235532373232123
360.7688943894861240.4622112210277520.231105610513876
370.7287185617398820.5425628765202370.271281438260118
380.6893633553759150.6212732892481690.310636644624085
390.642596516314620.7148069673707610.357403483685380
400.6796628911423910.6406742177152180.320337108857609
410.6303712669558970.7392574660882070.369628733044103
420.5806346086295850.838730782740830.419365391370415
430.5367297614368590.9265404771262810.463270238563141
440.4914733201818550.982946640363710.508526679818145
450.4661385075716250.932277015143250.533861492428375
460.4165305486755270.8330610973510550.583469451324473
470.3658288025282820.7316576050565630.634171197471718
480.3675904803340070.7351809606680140.632409519665993
490.5798747538621390.8402504922757220.420125246137861
500.551994074130550.89601185173890.44800592586945
510.5056393854314250.988721229137150.494360614568575
520.4624370738607940.9248741477215880.537562926139206
530.4134513186073950.826902637214790.586548681392605
540.3920438902611530.7840877805223070.607956109738847
550.382872936750740.765745873501480.61712706324926
560.3425764965344450.6851529930688910.657423503465555
570.3112990652813020.6225981305626030.688700934718699
580.2719659309468860.5439318618937730.728034069053114
590.3977115140005320.7954230280010640.602288485999468
600.3958412100410140.7916824200820280.604158789958986
610.418432613076240.836865226152480.58156738692376
620.3732792293012570.7465584586025140.626720770698743
630.3914085433664940.7828170867329890.608591456633505
640.3585894423886060.7171788847772120.641410557611394
650.3771842344583260.7543684689166510.622815765541674
660.4763210019237660.9526420038475320.523678998076234
670.4831649455217440.9663298910434890.516835054478256
680.4400451157521540.8800902315043080.559954884247846
690.4057403650926230.8114807301852460.594259634907377
700.4556074197284730.9112148394569460.544392580271527
710.5397274991382640.9205450017234720.460272500861736
720.5218900813342460.9562198373315080.478109918665754
730.5411388641648470.9177222716703050.458861135835152
740.6793120058312010.6413759883375980.320687994168799
750.6454871159824750.709025768035050.354512884017525
760.6128425039735910.7743149920528170.387157496026409
770.5680151991868620.8639696016262760.431984800813138
780.5196476413607370.9607047172785250.480352358639263
790.4724662257394990.9449324514789990.5275337742605
800.4576771512539600.9153543025079210.54232284874604
810.4134506015226140.8269012030452290.586549398477386
820.4586617912118510.9173235824237020.541338208788149
830.4140416586245790.8280833172491580.585958341375421
840.9306356918462330.1387286163075330.0693643081537666
850.9173353450623220.1653293098753560.082664654937678
860.9054017642852740.1891964714294520.094598235714726
870.8831290434623440.2337419130753120.116870956537656
880.8685697343831220.2628605312337560.131430265616878
890.8840778036224320.2318443927551370.115922196377568
900.867762922556540.2644741548869200.132237077443460
910.84075166174680.31849667650640.1592483382532
920.8139041809606280.3721916380787430.186095819039372
930.7790552154581740.4418895690836520.220944784541826
940.7434055203376710.5131889593246570.256594479662329
950.7073988799890820.5852022400218350.292601120010918
960.6833414830233220.6333170339533560.316658516976678
970.7004708763825040.5990582472349920.299529123617496
980.7490658657124290.5018682685751420.250934134287571
990.738912135224590.5221757295508190.261087864775410
1000.8157812679168860.3684374641662290.184218732083114
1010.7790928815644180.4418142368711640.220907118435582
1020.7986353492947150.402729301410570.201364650705285
1030.7593898360357270.4812203279285470.240610163964273
1040.8580744064108610.2838511871782780.141925593589139
1050.8663544373016290.2672911253967430.133645562698371
1060.861324322406180.2773513551876410.138675677593821
1070.8266645252826210.3466709494347570.173335474717379
1080.804120912941430.3917581741171410.195879087058571
1090.8090994239496120.3818011521007760.190900576050388
1100.8778133622222920.2443732755554160.122186637777708
1110.8433610916977460.3132778166045080.156638908302254
1120.8027831623499050.3944336753001900.197216837650095
1130.870271318158810.259457363682380.12972868184119
1140.8743971803945180.2512056392109640.125602819605482
1150.839566743564220.3208665128715590.160433256435779
1160.814078572420340.3718428551593190.185921427579660
1170.8176895899768940.3646208200462120.182310410023106
1180.7675010881115670.4649978237768660.232498911888433
1190.7099168425892170.5801663148215660.290083157410783
1200.6588584735975840.6822830528048320.341141526402416
1210.6105284339040820.7789431321918360.389471566095918
1220.5383841770998910.9232316458002190.461615822900109
1230.4647759582333550.929551916466710.535224041766645
1240.3879608761931850.775921752386370.612039123806815
1250.5088571542753790.9822856914492430.491142845724621
1260.4260674265078240.8521348530156480.573932573492176
1270.3421229221620540.6842458443241090.657877077837945
1280.3325150113319520.6650300226639040.667484988668048
1290.2631592567190350.5263185134380690.736840743280965
1300.1979528834150360.3959057668300710.802047116584964
1310.3278043158898240.6556086317796480.672195684110176
1320.2495975745294970.4991951490589940.750402425470503
1330.2233688002094150.4467376004188310.776631199790584
1340.1944841178297100.3889682356594200.80551588217029
1350.1195110601507970.2390221203015950.880488939849203


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.0078125OK
5% type I error level50.0390625OK
10% type I error level70.0546875OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/10nlwr1290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/10nlwr1290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/1z2zx1290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/1z2zx1290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/2styi1290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/2styi1290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/3styi1290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/3styi1290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/4styi1290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/4styi1290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/5k2x31290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/5k2x31290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/6k2x31290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/6k2x31290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/7vue61290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/7vue61290454078.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/8vue61290454078.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454053e7ii8prudsyfhy2/8vue61290454078.ps (open in new window)


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