Home » date » 2010 » Nov » 23 »

workshop 7 multiple regressions

*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 13:53:50 +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/t12905203865djx88g8che4o6h.htm/, Retrieved Tue, 23 Nov 2010 14:53:09 +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/t12905203865djx88g8che4o6h.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 «
26 24 14 11 12 24 23 25 11 7 8 25 25 17 6 17 8 30 23 18 12 10 8 19 19 18 8 12 9 22 29 16 10 12 7 22 25 20 10 11 4 25 21 16 11 11 11 23 22 18 16 12 7 17 25 17 11 13 7 21 24 23 13 14 12 19 18 30 12 16 10 19 22 23 8 11 10 15 15 18 12 10 8 16 22 15 11 11 8 23 28 12 4 15 4 27 20 21 9 9 9 22 12 15 8 11 8 14 24 20 8 17 7 22 20 31 14 17 11 23 21 27 15 11 9 23 20 34 16 18 11 21 21 21 9 14 13 19 23 31 14 10 8 18 28 19 11 11 8 20 24 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 23 22 9 16 9 24 23 17 9 13 6 22 29 24 10 9 6 25 24 25 16 18 16 26 18 26 11 18 5 29 25 25 8 12 7 32 21 17 9 17 9 25 26 32 16 9 6 29 22 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 23 25 12 12 7 29 30 29 14 18 10 26 23 22 9 14 9 25 17 18 10 15 8 14 23 17 9 16 5 25 23 20 10 10 8 26 25 15 12 11 8 20 24 20 14 14 10 18 24 33 14 9 6 32 23 29 10 12 8 25 21 23 14 17 7 25 24 26 16 5 4 23 24 18 9 12 8 21 28 20 10 12 8 20 16 11 6 6 4 15 20 28 8 24 20 30 29 26 13 12 8 24 27 22 10 12 8 26 22 17 8 14 6 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 time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 16.134380517971 -0.0706755178434466CM[t] + 0.21817366617141D[t] -0.14895346558074PE[t] -0.255161534021278PC[t] + 0.422756959732833PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.1343805179712.0016118.060700
CM-0.07067551784344660.062922-1.12320.2631030.131551
D0.218173666171410.1126221.93720.054560.02728
PE-0.148953465580740.104267-1.42860.1551640.077582
PC-0.2551615340212780.130412-1.95660.0522180.026109
PS0.4227569597328330.0756165.590800


Multiple Linear Regression - Regression Statistics
Multiple R0.47156352837492
R-squared0.222372161293404
Adjusted R-squared0.196959486825868
F-TEST (value)8.7504430742809
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value2.54750247341562e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.4993600467452
Sum Squared Residuals1873.56467272376


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12622.93833992007253.06166007992749
22324.2523603618557-1.25236036185575
32524.3511463166030.648853683396967
42321.98186049779211.01813950220793
51921.8243682471222-2.82436824712216
62922.91238968319446.08761031680556
72524.81239655866370.18760344133628
82122.6816276385943-1.68162763859431
92221.96629584587180.0337041541281645
102522.48817740620882.51182259379118
112420.23019657633823.76980342366183
121819.7297104221437-1.72971042214371
132218.40548387133463.59451612866544
141520.7135896185936-5.71358961859357
152223.5177877585016-1.51778775850159
162824.31845876152553.68154123847446
172022.2773757565055-2.27737575650546
181219.0584541223919-7.05845412239186
192421.44857295157412.55142704842587
202021.3822950759724-1.3822950759724
212123.2872146750446-2.28721467504459
222020.6121484697385-0.612148469738471
232119.24369141331811.75630858668185
242321.07666913843721.92333086156275
252821.96681480792936.0331851920707
262421.94161584579972.05838415420033
272423.48808596212680.511914037873207
282420.4132910149843.586708985016
292322.00953989906250.990460100937506
302322.72974856762010.270251432379885
312924.31727835040894.68272164959114
322422.08620525888731.91379474111273
331824.9997091636193-6.99970916361933
342526.0675322875889-1.06753228758893
352122.6367209824318-1.63672098243182
362626.7519440436211-0.751944043621079
372225.1676432351877-3.16764323518775
382222.8299965031316-0.829996503131624
392222.5849420248483-0.584942024848278
402325.6719560730761-2.67195607307607
413022.89812505929837.10187494070167
422322.73020378995680.269796210043192
431718.6869610388814-1.68696103888138
442323.8063205840977-0.806320584097671
452324.3634608478922-1.36346084789218
462522.46769054547452.5323094545255
472420.74796290434963.25203709565036
482427.5131920726333-3.51319207263331
492323.0067172964069-0.00671729640684957
502123.8138592742707-2.81385927427075
512425.7455923226503-1.74559232265028
522421.8749464875822.12505351241798
532821.52901215833376.4709878416663
541621.0929792851445-5.09297928514447
552019.90545028534740.0945497146525729
562923.45050788871865.54949211128141
572723.92420288104383.07579711895619
582223.2081353553336-1.20813535533363
592824.05082268602153.94917731397847
601620.3584383722737-4.3584383722737
612522.95873135060272.04126864939731
622423.51073408188340.489265918116595
632823.68431745031114.3156825496889
642424.3565643597678-0.356564359767843
652322.72744844467990.27255155532009
663026.97377771978133.02622228021869
672421.30970151475942.69029848524062
682124.1918592625548-3.19185926255483
692523.34643689259711.65356310740295
702524.009924088750.99007591124998
712220.78242221726461.21757778273541
722322.50629290050210.493707099497928
732622.86136010109423.13863989890584
742321.592866312251.40713368775004
752523.06403285506611.93596714493389
762121.3169856048034-0.316985604803363
772523.68056201011811.31943798988188
782422.1871294271161.81287057288401
792923.602212818885.39778718112005
802223.6569360828835-1.65693608288352
812723.64418853452993.35581146547012
822619.67835111571726.3216488842828
832221.32297354751950.677026452480496
842422.10031269428951.89968730571047
852723.1282217741433.87177822585703
862421.335857978362.66414202164002
872424.9093164665318-0.90931646653183
882924.47021568817734.5297843118227
892222.2324709996082-0.232470999608157
902120.58657833099990.413421669000071
912420.41147590559873.58852409440132
922421.82827897654382.1717210234562
932321.97396201548651.02603798451355
942022.2966377134128-2.29663771341281
952721.44290136727685.55709863272324
962623.4634376525382.53656234746198
972521.93031195363433.06968804636567
982120.05584352642020.944156473579805
992120.79116162456140.208838375438649
1001920.3931937376004-1.3931937376004
1012121.6280730192171-0.628073019217087
1022121.3154348573464-0.315434857346428
1031619.7578411650546-3.75784116505456
1042220.69958935662581.30041064337417
1052921.82831066702727.17168933297281
1061521.6944964222482-6.69449642224818
1071720.7295438538645-3.72954385386453
1081519.9461029274324-4.94610292743238
1092121.6814981544617-0.681498154461724
1102121.0102716459281-0.0102716459280732
1111919.3060132265193-0.306013226519288
1122418.06528676536965.93471323463043
1132022.3943929417572-2.39439294175716
1141725.2032625710465-8.20326257104646
1152325.0688900877806-2.0688900877806
1162422.41465499358061.5853450064194
1171422.096010482252-8.09601048225197
1181922.9163958428202-3.91639584282023
1192422.19182122250431.80817877749572
1201320.4043471047834-7.40434710478335
1212225.4130613862999-3.4130613862999
1221621.1581295863886-5.15812958638857
1231923.3107490527713-4.31074905277131
1242522.85008627673512.14991372326489
1252524.20964277450270.790357225497343
1262321.42517545633421.57482454366575
1272423.61010940192040.389890598079626
1282623.58716712901722.41283287098281
1292621.54005168857074.45994831142933
1302524.16842031503230.831579684967723
1311822.382424560105-4.38242456010498
1322119.90251272460471.09748727539525
1332623.70557399253572.29442600746429
1342321.99735951072631.00264048927367
1352319.76730880155893.23269119844108
1362222.5940710154958-0.594071015495776
1372022.4124503008445-2.41245030084455
1381322.1253524864942-9.12535248649423
1392421.47228680523282.52771319476722
1401521.6118883705203-6.61188837052032
1411423.1549213865043-9.15492138650432
1422224.1062334850528-2.10623348505278
1431017.6923817161542-7.69238171615418
1442424.4822138610477-0.482213861047675
1452221.87087658823550.129123411764547
1462425.8205497465243-1.82054974652427
1471921.6472637326236-2.64726373262357
1482022.1377104514971-2.13771045149714
1491317.1108094321865-4.11080943218647
1502020.1430837911-0.143083791099954
1512223.3048248497759-1.30482484977593
1522423.3678639892230.632136010777037
1532923.19441948471325.80558051528681
1541220.9591466336236-8.95914663362364
1552020.9707782686841-0.970778268684136
1562121.4614776884216-0.461477688421615
1572423.67628398478380.323716015216156
1582221.93051257584190.0694874241580689
1592017.70838604865042.29161395134965


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.7253213230516890.5493573538966230.274678676948311
100.5986464109906280.8027071780187430.401353589009372
110.4893260815124570.9786521630249140.510673918487543
120.4448558931257080.8897117862514170.555144106874292
130.4529542350626250.905908470125250.547045764937375
140.6934241689605640.6131516620788720.306575831039436
150.624897424606610.7502051507867790.37510257539339
160.5729424577337620.8541150845324760.427057542266238
170.5069267630769460.9861464738461080.493073236923054
180.6370262446452050.725947510709590.362973755354795
190.5620112594482650.875977481103470.437988740551735
200.5671281596137130.8657436807725740.432871840386287
210.5193104347340460.9613791305319080.480689565265954
220.4501751285470520.9003502570941040.549824871452948
230.3911539944686660.7823079889373320.608846005531334
240.3917981325239540.7835962650479080.608201867476046
250.5356100160442390.9287799679115210.464389983955761
260.4730091818059330.9460183636118660.526990818194067
270.4094422667417830.8188845334835660.590557733258217
280.4027316330340330.8054632660680660.597268366965967
290.3418059785318420.6836119570636840.658194021468158
300.2850955636159930.5701911272319870.714904436384007
310.3093019969060450.6186039938120890.690698003093955
320.2607093695950440.5214187391900870.739290630404956
330.4851696443745190.9703392887490380.514830355625481
340.4387744161561080.8775488323122150.561225583843892
350.4039992529929890.8079985059859780.596000747007011
360.3483307111290380.6966614222580750.651669288870962
370.3256998806582530.6513997613165060.674300119341747
380.2763769321200340.5527538642400690.723623067879966
390.2315472767686260.4630945535372520.768452723231374
400.2082515204833960.4165030409667930.791748479516604
410.3597762817531770.7195525635063530.640223718246823
420.3096548314381420.6193096628762850.690345168561858
430.2778920360950290.5557840721900580.72210796390497
440.2360066800676720.4720133601353450.763993319932328
450.2034017647918770.4068035295837540.796598235208123
460.182515928463140.365031856926280.81748407153686
470.1702110977033420.3404221954066840.829788902296658
480.1572886639464290.3145773278928580.84271133605357
490.1282078965977020.2564157931954050.871792103402298
500.1187592016217540.2375184032435080.881240798378246
510.0979440290611660.1958880581223320.902055970938834
520.082903652089510.165807304179020.91709634791049
530.1389319756170410.2778639512340810.86106802438296
540.1704714021562140.3409428043124290.829528597843786
550.162698873296430.3253977465928610.83730112670357
560.2180702478481340.4361404956962690.781929752151866
570.2089855486336580.4179710972673170.791014451366342
580.1792270568938270.3584541137876530.820772943106174
590.1896994798377920.3793989596755840.810300520162208
600.2180149631526910.4360299263053820.781985036847309
610.191967614888960.383935229777920.80803238511104
620.1611003174793180.3222006349586360.838899682520682
630.175850700063380.351701400126760.82414929993662
640.1482046373359970.2964092746719940.851795362664003
650.1222079712085630.2444159424171250.877792028791437
660.1184502503507650.236900500701530.881549749649235
670.1082576603192060.2165153206384110.891742339680794
680.1085019288495910.2170038576991810.89149807115041
690.09211217258322560.1842243451664510.907887827416774
700.0751372364149120.1502744728298240.924862763585088
710.06109322106867050.1221864421373410.93890677893133
720.04826785448029330.09653570896058660.951732145519707
730.04535881619747570.09071763239495150.954641183802524
740.03638188762707370.07276377525414730.963618112372926
750.03030369776676640.06060739553353280.969696302233234
760.02328125942289890.04656251884579780.976718740577101
770.01828192098089190.03656384196178380.981718079019108
780.01463971263164890.02927942526329780.985360287368351
790.02194933684826360.04389867369652720.978050663151736
800.01752216151261680.03504432302523350.982477838487383
810.01714476519056140.03428953038112290.982855234809439
820.03084101231130630.06168202462261270.969158987688694
830.02381464956867620.04762929913735240.976185350431324
840.01990621709143680.03981243418287360.980093782908563
850.02189410335593110.04378820671186220.978105896644069
860.01947244916664390.03894489833328790.980527550833356
870.01484039730079640.02968079460159280.985159602699204
880.01943350331768890.03886700663537780.980566496682311
890.01533147971946560.03066295943893120.984668520280534
900.01150008661395750.02300017322791490.988499913386042
910.01162048896555180.02324097793110370.988379511034448
920.01018872277322660.02037744554645320.989811277226773
930.007838045464034960.01567609092806990.992161954535965
940.006501946671915660.01300389334383130.993498053328084
950.01198228179901930.02396456359803850.98801771820098
960.01089621894148890.02179243788297780.989103781058511
970.01040965815261170.02081931630522350.989590341847388
980.007997340608936060.01599468121787210.992002659391064
990.005925453757017720.01185090751403540.994074546242982
1000.004556769167675270.009113538335350550.995443230832325
1010.003383169856387410.006766339712774810.996616830143613
1020.002419194710520930.004838389421041860.99758080528948
1030.002601225399170810.005202450798341620.997398774600829
1040.002048888400231970.004097776800463940.997951111599768
1050.008725193417262190.01745038683452440.991274806582738
1060.01960001469256310.03920002938512610.980399985307437
1070.01953572455027240.03907144910054470.980464275449728
1080.02469949423416480.04939898846832970.975300505765835
1090.01917553290921250.0383510658184250.980824467090788
1100.01410168239392250.0282033647878450.985898317606077
1110.01028275208783180.02056550417566370.989717247912168
1120.02519172254264490.05038344508528980.974808277457355
1130.02298616611819290.04597233223638580.977013833881807
1140.06364683233832090.1272936646766420.936353167661679
1150.05462994370801080.1092598874160220.94537005629199
1160.04462449768458850.0892489953691770.955375502315411
1170.1293870327738970.2587740655477930.870612967226103
1180.1248358165085560.2496716330171110.875164183491444
1190.1114840173132070.2229680346264130.888515982686793
1200.192312214663350.38462442932670.80768778533665
1210.1843714475124840.3687428950249670.815628552487516
1220.2193672087559920.4387344175119840.780632791244008
1230.2131188919553990.4262377839107980.7868811080446
1240.2128450293108440.4256900586216880.787154970689156
1250.1948864589243870.3897729178487740.805113541075613
1260.1606852247092380.3213704494184760.839314775290762
1270.1274968038756060.2549936077512110.872503196124394
1280.1320290717841190.2640581435682380.867970928215881
1290.1873664260081740.3747328520163470.812633573991826
1300.1634486246872260.3268972493744520.836551375312774
1310.1448021004267180.2896042008534350.855197899573282
1320.1271100958706160.2542201917412320.872889904129384
1330.1178731028370160.2357462056740320.882126897162984
1340.0979158935363090.1958317870726180.902084106463691
1350.132789383519080.2655787670381590.86721061648092
1360.1009094895401080.2018189790802150.899090510459892
1370.07555835546564380.1511167109312880.924441644534356
1380.185211619749340.3704232394986810.81478838025066
1390.2584735023210930.5169470046421850.741526497678908
1400.2391685034379860.4783370068759720.760831496562014
1410.4833561337163070.9667122674326140.516643866283693
1420.4353646171717640.8707292343435270.564635382828236
1430.7471173137231120.5057653725537770.252882686276888
1440.6969707961532350.6060584076935310.303029203846765
1450.5979879813347140.8040240373305710.402012018665286
1460.5351808653361350.929638269327730.464819134663865
1470.558078277329840.883843445340320.44192172267016
1480.4307892752804910.8615785505609830.569210724719509
1490.3379112269752260.6758224539504530.662088773024774
1500.2418616446089070.4837232892178130.758138355391093


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0352112676056338NOK
5% type I error level360.253521126760563NOK
10% type I error level430.302816901408451NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905203865djx88g8che4o6h/10g7zw1290520417.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905203865djx88g8che4o6h/10g7zw1290520417.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905203865djx88g8che4o6h/197kk1290520417.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905203865djx88g8che4o6h/197kk1290520417.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905203865djx88g8che4o6h/297kk1290520417.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905203865djx88g8che4o6h/297kk1290520417.ps (open in new window)


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


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


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


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


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


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


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