Home » date » 2010 » Nov » 23 »

Hypothesis Testing Connected Paper

*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: Tue, 23 Nov 2010 10:02:46 +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/23/t1290506632smmjfw6ziqtzlrs.htm/, Retrieved Tue, 23 Nov 2010 11:04:04 +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/23/t1290506632smmjfw6ziqtzlrs.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 12 41 18 11 39 11 14 30 12 12 31 16 21 34 18 12 35 14 22 39 14 11 34 15 10 36 15 13 37 17 10 38 19 8 36 10 15 38 16 14 39 18 10 33 14 14 32 14 14 36 17 11 38 14 10 39 16 13 32 18 7 32 11 14 31 14 12 39 12 14 37 17 11 39 9 9 41 16 11 36 14 15 33 15 14 33 11 13 34 16 9 31 13 15 27 17 10 37 15 11 34 14 13 34 16 8 32 9 20 29 15 12 36 17 10 29 13 10 35 15 9 37 16 14 34 16 8 38 12 14 35 12 11 38 11 13 37 15 9 38 15 11 33 17 15 36 13 11 38 16 10 32 14 14 32 11 18 32 12 14 34 12 11 32 15 12 37 16 13 39 15 9 29 12 10 37 12 15 35 8 20 30 13 12 38 11 12 34 14 14 31 15 13 34 10 11 35 11 17 36 12 12 30 15 13 39 15 14 35 14 13 38 16 15 31 15 13 34 15 10 38 13 11 34 12 19 39 17 13 37 13 17 34 15 13 28 13 9 37 15 11 33 16 10 37 15 9 35 16 12 37 15 12 32 14 13 33 15 13 38 14 12 33 13 15 29 7 22 33 17 13 31 13 15 36 15 13 35 14 15 32 13 10 29 16 11 39 12 16 37 14 11 35 17 11 37 15 10 32 17 10 38 12 16 37 16 12 36 11 11 32 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 time51 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Conn[t] = + 33.2324706807633 + 0.158472808251304Happ[t] -0.0645138156938048Depr[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)33.23247068076332.82220611.775400
Happ0.1584728082513040.1349131.17460.2418980.120949
Depr-0.06451381569380480.099608-0.64770.5181270.259064


Multiple Linear Regression - Regression Statistics
Multiple R0.151458819815009
R-squared0.0229397740997553
Adjusted R-squared0.0106497083651611
F-TEST (value)1.86652981319571
F-TEST (DF numerator)2
F-TEST (DF denominator)159
p-value0.158032381913384
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.35710886629123
Sum Squared Residuals1791.95861048086


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14134.67692420795646.32307579204359
23935.3753292566553.624670743345
33034.0724781518145-4.07247815181446
43134.3599785914534-3.35997859145337
53434.4132454832143-0.413245483214345
63535.3108154409612-0.310815440961197
73934.03178605101794.96821394898207
83434.7414380236498-0.741438023649784
93634.96442464759491.03557535240511
103734.77088320051352.22911679948652
113835.28137026409752.7186297359025
123635.72734351198770.272656488012279
133833.84949152786934.15050847213065
143934.8648421930714.13515780692902
153335.4398430723488-2.43984307234881
163234.5478965765684-2.54789657656837
173634.54789657656841.45210342343163
183835.21685644840372.7831435515963
193934.80595183934364.19404816065641
203234.9293560087648-2.92935600876478
213235.6333845194302-3.63338451943022
223134.0724781518145-3.07247815181446
233934.6769242079564.32307579204402
243734.23095096006582.76904903993424
253935.21685644840373.7831435515963
264134.07810161378096.92189838621913
273635.05838364015240.941616359847607
283334.4833827608746-1.48338276087456
293334.7063693848197-1.70636938481967
303434.1369919675083-0.136991967508261
313135.18741127154-4.18741127154
322734.3249099526233-7.32490995262326
333735.28137026409751.71862973590250
343434.8999108319011-0.899910831901089
353434.6124103922622-0.612410392262174
363235.2519250872338-3.25192508723381
372933.368449641149-4.36844964114902
383634.83539701620731.16460298379272
392935.2813702640975-6.2813702640975
403534.64747903109230.352520968907715
413735.02893846328871.9710615367113
423434.864842193071-0.864842193070979
433835.25192508723382.74807491276619
443534.23095096006580.769049039934239
453834.42449240714723.57550759285282
463734.13699196750832.86300803249174
473835.02893846328872.9710615367113
483334.8999108319011-1.89991083190109
493634.95880118562851.04119881437152
503834.58296521539853.41703478460152
513235.1228974558462-3.1228974558462
523234.5478965765684-2.54789657656837
533233.8144228890392-1.81442288903924
543434.2309509600658-0.230950960065761
553234.4244924071472-2.42449240714718
563734.83539701620732.16460298379272
573934.92935600876484.07064399123522
582935.0289384632887-6.0289384632887
593734.4890062228412.51099377715902
603534.16643714437200.833562855628044
613033.2099768328977-3.20997683289771
623834.51845139970473.48154860029532
633434.2015057832021-0.201505783202066
643134.5478965765684-3.54789657656837
653434.7708832005135-0.77088320051348
663534.10754679064460.892453209355433
673633.87893670473302.12106329526696
683034.3599785914534-4.35997859145337
693934.77088320051354.22911679948652
703534.70636938481970.293630615180326
713834.61241039226223.38758960773783
723134.8003283773772-3.80032837737717
733434.7708832005135-0.77088320051348
743834.96442464759493.03557535240511
753434.5829652153985-0.58296521539848
763933.90838188159675.09161811840326
773735.08782881701611.91217118298391
783434.1958823212357-0.195882321235650
792834.7708832005135-6.77088320051348
803734.71199284678612.28800715321391
813334.8999108319011-1.89991083190109
823735.12289745584621.87710254415380
833535.0289384632887-0.0289384632886986
843734.99386982445862.00613017554141
853234.8353970162073-2.83539701620728
863334.6124103922622-1.61241039226218
873834.77088320051353.22911679948652
883334.676924207956-1.67692420795598
892934.3249099526233-5.32490995262326
903332.92247639325880.0775236067412003
913135.0878288170161-4.08782881701609
923634.32490995262331.67509004737674
933534.77088320051350.229116799486521
943234.4833827608746-2.48338276087456
952934.6474790310923-5.64747903109228
963935.05838364015243.94161635984761
973734.10192332867822.89807667132185
983534.74143802364980.258561976350216
993735.21685644840371.7831435515963
1003234.9644246475949-2.96442464759489
1013835.28137026409752.7186297359025
1023734.10192332867822.89807667132185
1033634.99386982445861.00613017554141
1043234.2660195988959-2.26601959889587
1053334.5773417534321-1.57734175343207
1064033.43296345684286.56703654315718
1073835.05838364015242.94161635984761
1084134.57734175343216.42265824656794
1093633.84949152786932.15050847213065
1104333.26886718662519.7311328133749
1113034.7063693848197-4.70636938481967
1123134.0079643361207-3.00796433612065
1133234.5829652153985-2.58296521539848
1143234.4833827608746-2.48338276087456
1153735.31081544096121.68918455903880
1163735.12289745584621.87710254415380
1173334.5478965765684-1.54789657656837
1183434.6124103922622-0.612410392262174
1193334.8704656550374-1.87046565503739
1203834.48338276087463.51661723912544
1213334.1664371443720-1.16643714437196
1223134.5478965765684-3.54789657656837
1233834.89991083190113.10008916809891
1243735.09345227898251.90654772101750
1253334.8999108319011-1.89991083190109
1263134.5829652153985-3.58296521539848
1273935.41039789548513.58960210451489
1284435.28137026409758.7186297359025
1293335.5338020649063-2.53380206490631
1303534.77088320051350.229116799486521
1313234.5829652153985-2.58296521539848
1322833.368449641149-5.36844964114902
1334034.96442464759495.03557535240511
1342734.6418555691259-7.64185556912587
1353734.83539701620732.16460298379272
1363234.864842193071-2.86484219307098
1372833.4918538105702-5.49185381057021
1383434.5478965765684-0.54789657656837
1393033.9434505204268-3.94345052042685
1403534.89991083190110.100089168098911
1413134.5184513997047-3.51845139970468
1423234.9644246475949-2.96442464759489
1433034.864842193071-4.86484219307098
1443034.676924207956-4.67692420795598
1453134.8353970162073-3.83539701620728
1464035.05838364015244.94161635984761
1473234.9938698244586-2.99386982445859
1483634.13699196750831.86300803249174
1493234.4244924071472-2.42449240714718
1503533.43296345684281.56703654315718
1513834.99386982445863.00613017554141
1524234.19588232123577.80411767876435
1533435.18741127154-1.18741127154000
1543534.35997859145340.64002140854663
1553533.43296345684281.56703654315718
1563334.1313685055418-1.13136850554185
1573634.32490995262331.67509004737674
1583234.5478965765684-2.54789657656837
1593335.5338020649063-2.53380206490631
1603434.7119928467861-0.71199284678609
1613233.9728956972905-1.97289569729054
1623434.2603961369295-0.260396136929455


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.8244485871330940.3511028257338110.175551412866906
70.8751529606767480.2496940786465030.124847039323252
80.7959718577346830.4080562845306350.204028142265317
90.7017325166214660.5965349667570680.298267483378534
100.6110175372713020.7779649254573960.388982462728698
110.511749282205380.976501435589240.48825071779462
120.4544159086180310.9088318172360620.545584091381969
130.5309355915643180.9381288168713640.469064408435682
140.4912428752380560.9824857504761120.508757124761944
150.5105852721619810.9788294556760370.489414727838019
160.519550469643450.96089906071310.48044953035655
170.4401643027305980.8803286054611970.559835697269402
180.3869446972693700.7738893945387410.61305530273063
190.4075915548911820.8151831097823630.592408445108819
200.4462293424955990.8924586849911990.553770657504401
210.471045273675120.942090547350240.52895472632488
220.4794420740565060.9588841481130120.520557925943494
230.5047837543105840.9904324913788310.495216245689416
240.4638690753018780.9277381506037550.536130924698123
250.4535113665255770.9070227330511530.546488633474423
260.6016598881693380.7966802236613250.398340111830662
270.5402671402008540.9194657195982920.459732859799146
280.5155954219905750.9688091560188510.484404578009425
290.4900695970038240.9801391940076470.509930402996176
300.44174461243780.88348922487560.5582553875622
310.5005426680478020.9989146639043950.499457331952198
320.7457488476906760.5085023046186490.254251152309324
330.7060186485642510.5879627028714980.293981351435749
340.6632597357118360.6734805285763290.336740264288164
350.6157294597753720.7685410804492560.384270540224628
360.6175186248301690.7649627503396620.382481375169831
370.663545956570110.6729080868597810.336454043429891
380.6164823305853530.7670353388292930.383517669414647
390.7364605521306130.5270788957387730.263539447869387
400.6914256939334500.6171486121330990.308574306066550
410.6569916762535030.6860166474929940.343008323746497
420.6109268740156120.7781462519687750.389073125984388
430.588167406332270.823665187335460.41183259366773
440.538740213388510.922519573222980.46125978661149
450.5339729173713330.9320541652573350.466027082628667
460.510498863164930.979002273670140.48950113683507
470.4906083289641380.9812166579282760.509391671035862
480.4613677966959680.9227355933919360.538632203304032
490.4175714625273440.8351429250546880.582428537472656
500.4091039696084140.8182079392168280.590896030391586
510.4090939390261660.8181878780523320.590906060973834
520.3923687297639770.7847374595279540.607631270236023
530.3610986816384020.7221973632768050.638901318361598
540.317417921078170.634835842156340.68258207892183
550.3046258332378510.6092516664757020.695374166762149
560.2787590694295130.5575181388590260.721240930570487
570.2968719693391770.5937439386783540.703128030660823
580.4047738409418120.8095476818836240.595226159058188
590.3811591436880130.7623182873760270.618840856311987
600.3387901056182120.6775802112364240.661209894381788
610.3355288852670760.6710577705341530.664471114732924
620.3359764064668430.6719528129336860.664023593533157
630.2953146181449110.5906292362898210.70468538185509
640.3005495361632330.6010990723264660.699450463836767
650.2632663321507220.5265326643014440.736733667849278
660.2297366650946680.4594733301893360.770263334905332
670.2098481702208370.4196963404416740.790151829779163
680.2354991657575540.4709983315151080.764500834242446
690.255769724343360.511539448686720.74423027565664
700.2202444673654610.4404889347309220.779755532634539
710.2200037145428330.4400074290856650.779996285457167
720.2303364941310340.4606729882620690.769663505868965
730.1987404049787310.3974808099574610.80125959502127
740.1922473124268350.384494624853670.807752687573165
750.1640440508606260.3280881017212510.835955949139374
760.2036901591229710.4073803182459410.79630984087703
770.1816932762457390.3633865524914780.81830672375426
780.1532803834429360.3065607668858730.846719616557064
790.2510564087535070.5021128175070140.748943591246493
800.2340355814940250.4680711629880510.765964418505975
810.2110116415421030.4220232830842060.788988358457897
820.1892859198149170.3785718396298340.810714080185083
830.1606760789154810.3213521578309630.839323921084519
840.1432389954957090.2864779909914190.85676100450429
850.1357268942054140.2714537884108270.864273105794586
860.1174036553654320.2348073107308650.882596344634568
870.1154686566929410.2309373133858820.884531343307059
880.09944869056046370.1988973811209270.900551309439536
890.1312955041763310.2625910083526620.86870449582367
900.1086157808109330.2172315616218660.891384219189067
910.1196640564572010.2393281129144020.880335943542799
920.1034130889162940.2068261778325880.896586911083706
930.08436289800977810.1687257960195560.915637101990222
940.07655538972899350.1531107794579870.923444610271007
950.1066571328522560.2133142657045110.893342867147744
960.1139926903890640.2279853807781280.886007309610936
970.1081884366535440.2163768733070880.891811563346456
980.08857807466933780.1771561493386760.911421925330662
990.07583572758016140.1516714551603230.924164272419839
1000.07094623425074490.1418924685014900.929053765749255
1010.06565440558260570.1313088111652110.934345594417394
1020.06175739968534110.1235147993706820.93824260031466
1030.04992603999224040.09985207998448090.95007396000776
1040.0427638620633790.0855277241267580.957236137936621
1050.03500165625843710.07000331251687430.964998343741563
1060.06838489616832590.1367697923366520.931615103831674
1070.06477095661599520.1295419132319900.935229043384005
1080.1121912405220720.2243824810441440.887808759477928
1090.1020645887089850.2041291774179700.897935411291015
1100.4262088980893820.8524177961787630.573791101910618
1110.4588232237786690.9176464475573380.541176776221331
1120.4372506382950250.8745012765900510.562749361704975
1130.4154493064503230.8308986129006460.584550693549677
1140.385033268715350.77006653743070.61496673128465
1150.3524657237883190.7049314475766380.647534276211681
1160.3200985463290950.6401970926581910.679901453670905
1170.2815163066336230.5630326132672450.718483693366377
1180.2408793734371750.4817587468743490.759120626562825
1190.2174565407532080.4349130815064160.782543459246792
1200.2395189097830750.479037819566150.760481090216925
1210.2034178221798010.4068356443596020.7965821778202
1220.1958100863750890.3916201727501790.80418991362491
1230.1907775757627060.3815551515254110.809222424237294
1240.1635527147402710.3271054294805430.836447285259729
1250.1401600802646830.2803201605293660.859839919735317
1260.1436852552573200.2873705105146410.85631474474268
1270.1406499134679570.2812998269359140.859350086532043
1280.4147684722466890.8295369444933780.585231527753311
1290.37055965044390.74111930088780.6294403495561
1300.3245077682060850.649015536412170.675492231793915
1310.3005348836319310.6010697672638620.699465116368069
1320.3480235160605030.6960470321210060.651976483939497
1330.4461266559330150.892253311866030.553873344066985
1340.6130521956940290.7738956086119420.386947804305971
1350.6047707891396390.7904584217207220.395229210860361
1360.5582698039941820.8834603920116350.441730196005818
1370.6757255785794110.6485488428411780.324274421420589
1380.6129832891717360.7740334216565280.387016710828264
1390.652522561446010.694954877107980.34747743855399
1400.596363863701750.8072722725964990.403636136298250
1410.5816093795063430.8367812409873150.418390620493657
1420.5323470193442820.9353059613114370.467652980655718
1430.5855180541012180.8289638917975640.414481945898782
1440.6417318209094630.7165363581810740.358268179090537
1450.6631472606344870.6737054787310250.336852739365513
1460.798024853193310.4039502936133820.201975146806691
1470.7727505042397370.4544989915205250.227249495760263
1480.7199751425909340.5600497148181320.280024857409066
1490.6763198077928690.6473603844142620.323680192207131
1500.5830280518919240.8339438962161530.416971948108076
1510.605086987736660.789826024526680.39491301226334
1520.9947492196539080.01050156069218420.0052507803460921
1530.9854401483717760.0291197032564480.014559851628224
1540.9639030835150650.07219383296986920.0360969164849346
1550.9238326947473770.1523346105052460.0761673052526229
1560.8238902262358660.3522195475282680.176109773764134


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0132450331125828OK
10% type I error level60.0397350993377483OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/10awkz1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/10awkz1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/1e4mq1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/1e4mq1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/2e4mq1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/2e4mq1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/3e4mq1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/3e4mq1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/4pvlb1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/4pvlb1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/5pvlb1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/5pvlb1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/6pvlb1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/6pvlb1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/7z4kw1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/7z4kw1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/8awkz1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/8awkz1290506514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/9awkz1290506514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506632smmjfw6ziqtzlrs/9awkz1290506514.ps (open in new window)


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