Home » date » 2010 » Dec » 14 »

WS 10 - MR: Personal Standards

*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, 14 Dec 2010 15:59:53 +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/14/t1292342521csutnnt9hhdcueo.htm/, Retrieved Tue, 14 Dec 2010 17:02:13 +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/14/t1292342521csutnnt9hhdcueo.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 «
0 25 11 7 8 25 23 0 17 6 17 8 30 25 0 18 8 12 9 22 19 0 16 10 12 7 22 29 0 20 10 11 4 25 25 0 16 11 11 11 23 21 0 18 16 12 7 17 22 0 17 11 13 7 21 25 0 30 12 16 10 19 18 0 23 8 11 10 15 22 0 18 12 10 8 16 15 0 21 9 9 9 22 20 0 31 14 17 11 23 20 0 27 15 11 9 23 21 0 21 9 14 13 19 21 0 16 8 15 9 23 24 0 20 9 15 6 25 24 0 17 9 13 6 22 23 0 25 16 18 16 26 24 0 26 11 18 5 29 18 0 25 8 12 7 32 25 0 17 9 17 9 25 21 0 32 12 18 12 28 22 0 22 9 14 9 25 23 0 17 9 16 5 25 23 0 20 14 14 10 18 24 0 29 10 12 8 25 23 0 23 14 17 7 25 21 0 20 10 12 8 20 28 0 11 6 6 4 15 16 0 26 13 12 8 24 29 0 22 10 12 8 26 27 0 14 15 13 8 14 16 0 19 12 14 7 24 28 0 20 11 11 8 25 25 0 28 8 12 7 20 22 0 19 9 9 7 21 23 0 30 9 15 9 27 26 0 29 15 18 11 23 23 0 26 9 15 6 25 25 0 23 10 12 8 20 21 0 21 12 14 9 22 24 0 28 11 13 6 25 22 0 23 14 13 10 25 27 0 18 6 11 8 17 26 0 20 8 16 10 25 24 0 21 10 11 5 26 24 0 28 12 16 14 27 22 0 10 5 8 6 19 24 0 22 10 15 6 22 20 0 31 10 21 12 32 26 0 29 13 18 12 21 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 7.38188475102131 -0.694832870949954Gender[t] + 0.321027523643909CM[t] -0.338195452736301D[t] + 0.173368519441836PE[t] + 0.0172607039353986PC[t] + 0.421685657869128O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.381884751021312.246613.28580.0012630.000631
Gender-0.6948328709499540.599422-1.15920.2482040.124102
CM0.3210275236439090.0558215.75100
D-0.3381954527363010.109073-3.10060.0023020.001151
PE0.1733685194418360.1016651.70530.0901830.045092
PC0.01726070393539860.1285850.13420.8933940.446697
O0.4216856578691280.0738245.71200


Multiple Linear Regression - Regression Statistics
Multiple R0.610418712666873
R-squared0.372611004773883
Adjusted R-squared0.347845649699168
F-TEST (value)15.0456556608918
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value1.78523862359725e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.40545024919715
Sum Squared Residuals1762.75789276305


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12522.73785826058582.26214173941422
23024.43767184527255.56232815472746
32220.70261262295531.29738737704470
42223.5665018410154-1.56650184101536
52522.93871867286652.06128132713354
62319.75049542162583.24950457837419
71719.2275845668015-2.22758456680150
82122.0359597998883-1.03595979988830
91923.4912102195706-4.49121021957063
101523.4166993992758-8.4166993992758
111617.2990904377145-1.29909043771453
122221.22907984069440.770920159305645
132324.1698473768574-1.16984737685742
142321.89449496289281.10550503710720
151922.5866509115143-3.58665091151426
162322.68909142333860.310908576661364
172523.58322395337181.41677604662823
182221.85171868568720.148281314312751
192623.51370600011672.48629399988329
202922.80572909693806.19427090306203
213225.44539782780666.55460217219336
222521.75360355952253.24639644047747
232826.20126634508941.79873365491058
242523.68200693515481.31799306484518
252522.35456354007742.64543645992264
261821.7879209859900-3.78792098599003
272525.2270064051068-0.227006405106815
282521.95427002983373.04572997016631
292024.4461869816573-4.44618698165727
301516.7402392529852-1.74023925298516
312425.7794514231810-1.77945142318095
322624.66655637107601.33344362892404
331415.9421852011246-1.94218520112462
342423.77824488748900.221755112510964
352522.66956603587182.33043396412825
362025.143423425131-5.14342342513098
372121.8175603591431-0.817560359143123
382727.6886526173553-0.688652617355312
392324.6280223698825-1.62802236988252
402525.9310747531044-0.931074753104354
412022.4574699475051-2.45746994750511
422222.7680787111711-0.768078711171141
432524.28494488242850.715055117571483
442523.84269201108731.15730798891270
451724.1401739101346-7.14017391013457
462524.16383074129150.836169258708496
472622.85532124257663.14467875742336
482724.60494061950092.39505938049909
491920.5121508917850-1.51215089178504
502222.2003409164468-0.200340916446782
513228.76347791672013.23652208327987
522124.4783026635523-3.47830266355227
531821.4664396275648-3.46643962756478
542323.0120969137014-0.0120969137014117
552020.9722555839277-0.972255583927692
562122.5050358588236-1.50503585882360
571718.9914786053849-1.99147860538493
581820.4410654313943-2.44106543139431
591920.7944689039832-1.79446890398319
602222.3186308539794-0.318630853979425
611419.0629535968650-5.06295359686497
621826.7665723383136-8.76657233831357
633523.519361949982511.4806380500175
642919.51754577721279.4824542227873
652122.2733115687134-1.27331156871337
662520.44118465600004.55881534400004
672623.53123988155062.46876011844939
681717.1043377886926-0.104337788692593
692520.33880844786764.66119155213239
702021.1776507707811-1.17765077078114
712221.41491778280860.585082217191444
722423.09125169374090.908748306259118
732123.3247583614503-2.32475836145027
742625.82833748503370.171662514966333
752420.75834062876553.24165937123445
761620.5484727347340-4.54847273473405
771821.1408911291415-3.1408911291415
781919.3815389053367-0.381538905336737
792116.99308538423724.00691461576282
802218.67804563811453.32195436188548
812319.89723634259333.10276365740674
822925.00458433160533.9954156683947
832119.07472410417021.92527589582978
842322.14113890889290.85886109110711
852723.41162941924553.58837058075449
862525.404617574799-0.404617574799
872121.2202679480633-0.220267948063321
881017.1922481757164-7.19224817571643
892022.7724061182191-2.77240611821914
902622.77455157714503.22544842285503
912423.99196590068160.00803409931842777
922931.8512285834216-2.85122858342158
931918.99168258678820.00831741321177223
942422.20775794117961.79224205882037
951921.008347369949-2.00834736994899
962222.0981686897177-0.0981686897177283
971723.9264970299455-6.92649702994548
982422.73498537489931.26501462510074
991919.9777428297176-0.977742829717594
1001922.4288875465789-3.4288875465789
1012319.10453857309493.89546142690512
1022723.66336938055783.33663061944223
1031415.9022683526125-1.90226835261250
1042223.5905842779772-1.59058427797719
1052123.9350746908084-2.93507469080843
1061823.4747097316158-5.4747097316158
1072022.9187626148853-2.91876261488528
1081922.9144636789883-3.91446367898825
1092423.33391110308850.666088896911457
1102524.90252289695580.0974771030442204
1112924.17651339608194.82348660391814
1122824.50177555193083.49822444806924
1131716.89309266976120.106907330238805
1142922.55441183017326.44558816982677
1152627.2059238528174-1.20592385281736
1161418.9908623851846-4.99086238518461
1172621.2961887824784.70381121752199
1182020.0314000939660-0.0314000939659581
1193224.33056050946017.66943949053988
1202320.6789814528422.32101854715798
1212121.7607518846793-0.760751884679295
1223025.91003062290504.08996937709502
1232421.24676412904632.75323587095369
1242221.26183486681420.738165133185819
1252421.87867072283992.12132927716009
1262422.52448611444581.47551388555424
1272419.73175669990214.26824330009785
1281918.20749995367460.792500046325435
1293126.57389001637284.42610998362725
1302226.0989366253446-4.09893662534457
1312720.99009095415776.00990904584234
1321917.55914957205361.44085042794643
1332119.02516977221841.97483022778159
1342322.82888430057630.171115699423733
1351921.0392453011057-2.0392453011057
1361922.1947130232512-3.19471302325118
1372022.7236569239704-2.72365692397036
1382320.69501478108622.30498521891381
1391720.4612662780441-3.46126627804412
1401722.9847318490327-5.98473184903273
1411719.4487326039180-2.44873260391805
1422123.2079892703595-2.20798927035955
1432124.3524249235842-3.3524249235842
1441820.7994617307804-2.79946173078042
1451920.174481837742-1.17448183774199
1462023.6444934169919-3.64449341699193
1471518.4491687158757-3.4491687158757
1482420.90696383035153.0930361696485
1492018.10027820002081.89972179997916
1502222.8543335487661-0.854333548766058
1511316.3253568964252-3.32535689642517
1521918.07258030439030.927419695609718
1532122.1715729658346-1.17157296583456
1542322.05794504552560.94205495447439
1551621.9639533450056-5.96395334500559
1562623.55428851055262.44571148944741
1572121.7951805177071-0.795180517707085
1582119.77603703017781.22396296982216
1592423.10668133799500.893318662004957


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.969181162903490.06163767419301870.0308188370965094
110.949604983256040.1007900334879190.0503950167439597
120.9101991776036140.1796016447927710.0898008223963856
130.8976804753804230.2046390492391540.102319524619577
140.8831613133160110.2336773733679780.116838686683989
150.8466849154901340.3066301690197310.153315084509866
160.7816696379640870.4366607240718260.218330362035913
170.7078399803058130.5843200393883740.292160019694187
180.6336926822545750.7326146354908510.366307317745426
190.6431888632187170.7136222735625650.356811136781282
200.7263016717240440.5473966565519120.273698328275956
210.8296620750377920.3406758499244160.170337924962208
220.7962303099888270.4075393800223460.203769690011173
230.7448594327081050.5102811345837910.255140567291895
240.6846073429475420.6307853141049150.315392657052458
250.6282565052263880.7434869895472250.371743494773612
260.636069967151920.727860065696160.36393003284808
270.5745388500132410.8509222999735190.425461149986759
280.5270250278405940.9459499443188120.472974972159406
290.5774547169836290.845090566032740.42254528301637
300.5272268716656510.9455462566686980.472773128334349
310.4731479745560780.9462959491121570.526852025443922
320.4218965726532310.8437931453064610.57810342734677
330.3723533056660470.7447066113320940.627646694333953
340.3161835682404400.6323671364808790.68381643175956
350.3008662939179170.6017325878358340.699133706082083
360.4060968088397190.8121936176794380.593903191160281
370.3505822970542130.7011645941084260.649417702945787
380.3040311162728590.6080622325457170.695968883727141
390.2715427318780730.5430854637561460.728457268121927
400.2429399875480190.4858799750960390.75706001245198
410.2179217755184450.435843551036890.782078224481555
420.1803755050362330.3607510100724670.819624494963767
430.1469966126355920.2939932252711850.853003387364408
440.1257405071792120.2514810143584240.874259492820788
450.2403009480184330.4806018960368670.759699051981567
460.2011458361469230.4022916722938450.798854163853078
470.1946902730760820.3893805461521650.805309726923918
480.1909168586042390.3818337172084790.80908314139576
490.1601360285183490.3202720570366990.839863971481651
500.1348140522015270.2696281044030540.865185947798473
510.1216382313232470.2432764626464940.878361768676753
520.1311521210014330.2623042420028660.868847878998567
530.1311485023659310.2622970047318620.868851497634069
540.1056237723848760.2112475447697510.894376227615124
550.08964943082842560.1792988616568510.910350569171574
560.07392784012990390.1478556802598080.926072159870096
570.06127975455111440.1225595091022290.938720245448886
580.05133454887182860.1026690977436570.948665451128171
590.04135568933110870.08271137866221740.95864431066889
600.03145070190441570.06290140380883140.968549298095584
610.04305525121689140.08611050243378280.956944748783109
620.1567978204079460.3135956408158920.843202179592054
630.6164057813827180.7671884372345650.383594218617282
640.8790270351314050.2419459297371900.120972964868595
650.8593625426579010.2812749146841980.140637457342099
660.8708572070199450.2582855859601100.129142792980055
670.8730629373095240.2538741253809520.126937062690476
680.8467148231973370.3065703536053260.153285176802663
690.8708111007430390.2583777985139230.129188899256961
700.8488252010755860.3023495978488280.151174798924414
710.8203301444767680.3593397110464640.179669855523232
720.7911155623666370.4177688752667260.208884437633363
730.7738384966396950.4523230067206090.226161503360305
740.7414750291020520.5170499417958960.258524970897948
750.735921919120130.5281561617597420.264078080879871
760.7673265432780440.4653469134439120.232673456721956
770.7652845884890380.4694308230219240.234715411510962
780.7283470884933380.5433058230133240.271652911506662
790.7389124086241290.5221751827517430.261087591375871
800.732013407293530.535973185412940.26798659270647
810.7275781888090330.5448436223819340.272421811190967
820.7429198770112910.5141602459774180.257080122988709
830.7545327387689780.4909345224620450.245467261231022
840.7254558165563150.549088366887370.274544183443685
850.742602175218990.514795649562020.25739782478101
860.7084563492029840.5830873015940330.291543650797016
870.6673458111992870.6653083776014250.332654188800713
880.7765052197242460.4469895605515080.223494780275754
890.7622009064452630.4755981871094740.237799093554737
900.7569986622641930.4860026754716140.243001337735807
910.7246760916540130.5506478166919750.275323908345987
920.7055256399298230.5889487201403540.294474360070177
930.6706372554788540.6587254890422920.329362744521146
940.6787755615146470.6424488769707060.321224438485353
950.6405952209396510.7188095581206980.359404779060349
960.639961492626510.7200770147469810.360038507373491
970.6744372575195530.6511254849608940.325562742480447
980.6310662918846790.7378674162306420.368933708115321
990.5916542879979170.8166914240041670.408345712002083
1000.5869474523798460.8261050952403070.413052547620154
1010.6027352627426660.7945294745146680.397264737257334
1020.597510196051660.8049796078966790.402489803948340
1030.5646186559359610.8707626881280780.435381344064039
1040.5228893417871770.9542213164256460.477110658212823
1050.4982791281475440.9965582562950890.501720871852456
1060.5946050135193980.8107899729612040.405394986480602
1070.5821886153403520.8356227693192960.417811384659648
1080.5962305778513360.8075388442973270.403769422148664
1090.5518954703080020.8962090593839950.448104529691998
1100.5087556276037010.9824887447925980.491244372396299
1110.5489980163982150.902003967203570.451001983601785
1120.5430932307560070.9138135384879860.456906769243993
1130.4954774278020880.9909548556041770.504522572197912
1140.6375515024280440.7248969951439130.362448497571956
1150.5894148131462930.8211703737074140.410585186853707
1160.6208115553383780.7583768893232450.379188444661622
1170.6524583172979740.6950833654040530.347541682702026
1180.5998978595614270.8002042808771460.400102140438573
1190.842019951123590.3159600977528190.157980048876410
1200.8545646121055520.2908707757888950.145435387894448
1210.8227373444672180.3545253110655650.177262655532782
1220.8207274838762180.3585450322475630.179272516123782
1230.8189151826531660.3621696346936670.181084817346834
1240.7766023265806860.4467953468386280.223397673419314
1250.7407036223618630.5185927552762740.259296377638137
1260.718057388161850.5638852236763000.281942611838150
1270.7338147178264630.5323705643470750.266185282173537
1280.6790526193147160.6418947613705680.320947380685284
1290.8658295575614620.2683408848770770.134170442438538
1300.8379463555189490.3241072889621010.162053644481051
1310.950157916118860.09968416776227970.0498420838811398
1320.928354377465940.1432912450681210.0716456225340606
1330.9099916952696870.1800166094606270.0900083047303134
1340.87990918572130.24018162855740.1200908142787
1350.8435875773135240.3128248453729520.156412422686476
1360.7999074027027130.4001851945945740.200092597297287
1370.74553289504760.5089342099048010.254467104952400
1380.7101967467345970.5796065065308060.289803253265403
1390.6733724358741610.6532551282516780.326627564125839
1400.7423236808550410.5153526382899170.257676319144959
1410.6739177462732340.6521645074535330.326082253726766
1420.6064931842668090.7870136314663810.393506815733191
1430.5712416081699590.8575167836600820.428758391830041
1440.4992605529558080.9985211059116150.500739447044192
1450.3918653424978490.7837306849956980.608134657502151
1460.4621985329530140.9243970659060290.537801467046986
1470.3998275912084580.7996551824169160.600172408791542
1480.4213558838329980.8427117676659960.578644116167002
1490.4552341002658910.9104682005317820.544765899734109


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/1bzbt1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/1bzbt1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/2bzbt1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/2bzbt1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/3bzbt1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/3bzbt1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/438sw1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/438sw1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/538sw1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/538sw1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/638sw1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/638sw1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/7e09z1292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/7e09z1292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/87rq21292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/87rq21292342380.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/97rq21292342380.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342521csutnnt9hhdcueo/97rq21292342380.ps (open in new window)


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