Home » date » 2010 » Nov » 21 »

Workshop 7 mini-tutorial Concern over mistakes - Linear trend

*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: Sun, 21 Nov 2010 12:21:55 +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/21/t1290342179exxqtjcy3k25adp.htm/, Retrieved Sun, 21 Nov 2010 13:23:02 +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/21/t1290342179exxqtjcy3k25adp.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 «
9 24 14 11 12 24 26 9 25 11 7 8 25 23 9 17 6 17 8 30 25 9 18 12 10 8 19 23 9 18 8 12 9 22 19 9 16 10 12 7 22 29 10 20 10 11 4 25 25 10 16 11 11 11 23 21 10 18 16 12 7 17 22 10 17 11 13 7 21 25 10 23 13 14 12 19 24 10 30 12 16 10 19 18 10 23 8 11 10 15 22 10 18 12 10 8 16 15 10 15 11 11 8 23 22 10 12 4 15 4 27 28 10 21 9 9 9 22 20 10 15 8 11 8 14 12 10 20 8 17 7 22 24 10 31 14 17 11 23 20 10 27 15 11 9 23 21 10 34 16 18 11 21 20 10 21 9 14 13 19 21 10 31 14 10 8 18 23 10 19 11 11 8 20 28 10 16 8 15 9 23 24 10 20 9 15 6 25 24 10 21 9 13 9 19 24 10 22 9 16 9 24 23 10 17 9 13 6 22 23 10 24 10 9 6 25 29 10 25 16 18 16 26 24 10 26 11 18 5 29 18 10 25 8 12 7 32 25 10 17 9 17 9 25 21 10 32 16 9 6 29 26 10 33 11 9 6 28 22 10 13 16 12 5 17 22 10 32 12 18 12 28 22 10 25 12 12 7 29 23 10 29 14 18 10 26 30 10 22 9 14 9 25 23 10 18 10 15 8 14 17 10 17 9 16 5 25 23 10 20 10 10 8 26 23 10 15 12 11 8 20 25 10 20 14 14 10 18 24 10 33 14 9 6 32 24 10 29 10 12 8 25 23 10 23 14 17 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
Concernovermistakes[t] = -18.3591714482501 + 1.58838471475259Month[t] + 0.798757118515112Doubtsaboutactions[t] + 0.233450466257556Parentalexpectations[t] + 0.207082749570131Parentalcritism[t] + 0.571862761699043Personalstandards[t] -0.0999815995143377Organization[t] + 0.00354783249216936t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-18.359171448250119.993412-0.91830.3599470.179973
Month1.588384714752592.0021750.79330.4288310.214415
Doubtsaboutactions0.7987571185151120.1311486.090500
Parentalexpectations0.2334504662575560.1343331.73790.0842760.042138
Parentalcritism0.2070827495701310.1700091.21810.2250970.112548
Personalstandards0.5718627616990430.0962475.941600
Organization-0.09998159951433770.105485-0.94780.3447320.172366
t0.003547832492169360.0084380.42050.6747410.33737


Multiple Linear Regression - Regression Statistics
Multiple R0.641530498673369
R-squared0.411561380728101
Adjusted R-squared0.384282769238676
F-TEST (value)15.087328799255
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value7.32747196252603e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.49056162493448
Sum Squared Residuals3044.93669980746


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.30057129330590.699428706694143
22520.0175224671844.98247753281596
31721.0211399791428-4.02113997914275
41818.0925500792619-0.0925500792619017
51817.69056780293330.309432197066654
61617.8776483781721-1.8776483781721
72020.7303968936034-0.73039689360339
81622.2384819662609-6.23848196626085
91822.109776689597-4.10977668959702
101720.3404956440243-3.34049564402434
112322.16667800377120.833321996228798
123022.02409374820917.97590625179086
132314.97798333049968.02201666950045
141818.8006776299538-0.800677629953756
151521.5420869454813-6.54208694548131
161217.7473672648275-5.74736726482754
172119.31995062782011.68004937217993
181515.0095102272645-0.00951022726446701
192019.58180100715210.418198992847862
203126.17801170877194.8219882912281
212725.06546676357921.93453323642076
223426.87234655364597.12765344635406
232119.52125106772991.47874893227007
243120.777542919189110.2224570808109
251919.2620873882198-0.262087388219846
261620.1257631629215-4.12576316292152
272021.4505453886165-1.45054538861649
282118.17726396710972.82273603289032
292221.84045860638410.159541393615926
301719.3786812679951-2.37868126799509
312420.36288304198333.63711695801675
322530.4026260368562-5.40262603685615
332626.4499559136845-0.44995591368447
342524.0864121807230.913587819277008
351722.8670220283224-5.86702202832237
363227.7605607608744.23943923912604
373323.59838663714899.40161336285112
381321.7984983327297-8.79849833272967
393227.74779011438714.25220988561288
402525.787102563668-0.787102563668003
412926.99465619774862.00534380225136
422221.99154225796620.00845774203379339
431817.12961414405750.870385855942537
441721.6372078571851-4.63720785718513
452022.2319210210565-2.23192102105651
461520.4352937876135-5.43529378761353
472022.1071288311651-2.10712883116511
483328.12117199787564.87882800212443
492922.14115052184136.85884947815874
502326.4998596091402-3.49985960914021
512623.23459751292042.76540248707957
521818.9656042544921-0.965604254492144
532018.7961200457431.20387995425697
541111.7160709940257-0.716070994025723
552829.0105804767345-1.01058047673453
562623.39050434604672.60949565395329
572222.3414695454203-0.341469545420308
581720.1564210484307-3.1564210484307
591215.5692778789805-3.56927787898049
601420.8167935559991-6.81679355599913
611720.8202241820746-3.82022418207459
622121.3347129501434-0.334712950143374
631922.9763818374361-3.9763818374361
641823.1920758880957-5.19207588809566
651017.9120405565538-7.91204055655376
662924.40992651883414.59007348116592
673118.558476918801112.4415230811989
681922.9869414093617-3.98694140936168
69920.0961723263517-11.0961723263517
702022.5809984574057-2.5809984574057
712817.655273641087710.3447263589123
721918.22910835550710.770891644492931
733023.17875625633616.82124374366391
742927.10185744957871.8981425504213
752621.52085974872634.47914025127372
762319.57759138966333.42240861033671
771322.7673890269749-9.7673890269749
782122.6999656986182-1.69996569861817
791921.6345836806373-2.63458368063734
802822.96915701424535.03084298575475
812325.6973992029916-2.6973992029916
821813.95490316162954.04509683837052
832120.76154655918290.238453440817123
842021.9157961866931-1.91579618669311
852320.07774788362762.92225211637242
862120.83860115001720.161398849982821
872121.8931506037604-0.89315060376045
881523.0305779438395-8.03057794383953
892827.30058354392170.699416456078303
901917.70459000988641.2954099901136
912621.27720519998124.72279480001875
921013.4207961925499-3.42079619254989
931617.1995105289364-1.19951052893641
942221.17134539706720.828654602932829
951918.99893128599510.00106871400488016
963128.9403783769222.05962162307796
973125.29055862881655.70944137118354
982924.85281161756134.14718838243874
991917.50962614549991.49037385450014
1002218.95242751136353.0475724886365
1012322.49639238497760.503607615022413
1021516.287535418075-1.28753541807505
1032021.4228525089516-1.4228525089516
1041819.6658145225114-1.66581452251145
1052322.25636924276470.743630757235343
1062520.90865743550984.09134256449023
1072116.67227715246434.32772284753566
1082419.56800771168244.4319922883176
1092525.3550235068465-0.35502350684648
1101719.619766860822-2.61976686082202
1111314.6659551691233-1.66595516912328
1122818.42626166372089.57373833627919
1132120.41967645109160.580323548908431
1142528.3159565386191-3.31595653861912
115921.1551764227403-12.1551764227403
1161618.006110633023-2.00611063302303
1171921.2544613841651-2.25446138416515
1181719.6108037739653-2.61080377396526
1192524.67639153408490.323608465915102
1202015.56713373874454.4328662612555
1212921.87161261143767.12838738856236
1221419.1167857657226-5.11678576572262
1232227.0867941796051-5.0867941796051
1241515.9355784175142-0.935578417514243
1251925.626332592574-6.62633259257396
1262022.092892026745-2.09289202674502
1271517.7095654037931-2.70956540379314
1282022.1149283807381-2.11492838073814
1291820.5115649579609-2.51156495796087
1303325.76200252418027.23799747581976
1312224.0135738555549-2.01357385555486
1321616.6900618439135-0.69006184391349
1331719.3420422957593-2.34204229575932
1341615.31348031769890.686519682301067
1352117.29949926087643.70050073912356
1362627.7996968946194-1.79969689461943
1371821.304233865906-3.30423386590599
1381823.2073200148495-5.20732001484945
1391718.6825913123659-1.6825913123659
1402224.9799528930422-2.97995289304224
1413024.92541980820975.07458019179029
1423027.57056272486672.42943727513332
1432429.9683835869881-5.9683835869881
1442122.2960469748642-1.29604697486422
1452125.6227704527493-4.62277045274929
1462927.67396094315831.32603905684171
1473123.4643424664747.53565753352599
1482019.26558935597010.734410644029934
1491614.32613397177091.67386602822906
1502219.22366478822332.77633521177669
1512020.7522347250232-0.752234725023152
1522827.56107748344220.438922516557777
1533826.89041511611.109584884
1542219.43627227284222.56372772715776
1552025.9470773992814-5.9470773992814
1561718.31008307594-1.31008307593998
1572824.81405007758513.18594992241494
1582224.4230458313632-2.4230458313632
1593126.33981277238524.66018722761482


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.4829193016149580.9658386032299160.517080698385042
120.554073239343650.89185352131270.44592676065635
130.7785712074528930.4428575850942150.221428792547107
140.8044013778971670.3911972442056670.195598622102833
150.7447735642805770.5104528714388470.255226435719423
160.664232544631890.6715349107362210.33576745536811
170.6235277677461310.7529444645077380.376472232253869
180.5814159093338990.8371681813322020.418584090666101
190.5415638152832810.9168723694334370.458436184716719
200.5621504795336010.8756990409327970.437849520466399
210.4853487611294030.9706975222588050.514651238870597
220.4559249064379640.9118498128759270.544075093562036
230.4180293134236030.8360586268472070.581970686576397
240.5251318710594430.9497362578811150.474868128940557
250.4965945694728410.9931891389456820.503405430527159
260.5284303120479990.9431393759040020.471569687952001
270.4624564691639470.9249129383278940.537543530836053
280.3994328697227670.7988657394455330.600567130277233
290.3374991199397940.6749982398795880.662500880060206
300.3034494262526350.6068988525052690.696550573747365
310.2920688108971480.5841376217942950.707931189102852
320.4278905143310560.8557810286621120.572109485668944
330.3677709725805480.7355419451610970.632229027419452
340.3389216242501930.6778432485003860.661078375749807
350.3899119760466970.7798239520933940.610088023953303
360.354184460665440.708368921330880.64581553933456
370.4654268922738750.930853784547750.534573107726125
380.7615144023517250.4769711952965510.238485597648275
390.7480429223637580.5039141552724850.251957077636242
400.7114107689347480.5771784621305050.288589231065252
410.6764471981337650.6471056037324710.323552801866236
420.628165076844510.743669846310980.37183492315549
430.5764227236989050.847154552602190.423577276301095
440.5640438355426730.8719123289146550.435956164457327
450.5471458311909280.9057083376181440.452854168809072
460.5791926855220730.8416146289558540.420807314477927
470.5354765355173420.9290469289653160.464523464482658
480.5259849118485090.9480301763029810.474015088151491
490.5862103539832980.8275792920334050.413789646016702
500.5573213315437010.8853573369125990.442678668456299
510.5264197363296410.9471605273407180.473580263670359
520.4766790272664280.9533580545328550.523320972733572
530.4330087212924440.8660174425848870.566991278707556
540.3882146891237590.7764293782475180.611785310876241
550.3473362447661950.694672489532390.652663755233805
560.3187228020099790.6374456040199590.68127719799002
570.2758557123679040.5517114247358090.724144287632095
580.2478299770059350.495659954011870.752170022994065
590.2295442247609730.4590884495219470.770455775239027
600.2646070039174290.5292140078348580.735392996082571
610.248127640276520.4962552805530410.75187235972348
620.21413018103550.4282603620710.7858698189645
630.1969075329268410.3938150658536820.803092467073159
640.2179466817221940.4358933634443890.782053318277806
650.2669794120658070.5339588241316140.733020587934193
660.275929127254050.55185825450810.72407087274595
670.637769420135870.724461159728260.36223057986413
680.621918172530880.7561636549382390.37808182746912
690.7951952892038080.4096094215923850.204804710796192
700.7678147506359360.4643704987281280.232185249364064
710.9127531564915340.1744936870169310.0872468435084657
720.8937271218045180.2125457563909640.106272878195482
730.9242926095928780.1514147808142450.0757073904071225
740.9124970207299570.1750059585400860.087502979270043
750.9163309680112960.1673380639774080.0836690319887039
760.9106624721733070.1786750556533860.089337527826693
770.9620940858164280.07581182836714470.0379059141835724
780.9526852434423340.09462951311533260.0473147565576663
790.943473929806760.113052140386480.0565260701932399
800.9479428525491880.1041142949016250.0520571474508123
810.9382652388085330.1234695223829350.0617347611914673
820.9375827240267030.1248345519465940.062417275973297
830.9220533362512840.1558933274974310.0779466637487156
840.9065742500025280.1868514999949430.0934257499974717
850.8967632782064960.2064734435870070.103236721793504
860.8780800500150440.2438398999699110.121919949984956
870.8533755756665240.2932488486669520.146624424333476
880.9053301920169020.1893396159661960.0946698079830978
890.8861555888715220.2276888222569560.113844411128478
900.8636477117300980.2727045765398030.136352288269902
910.8658274788426220.2683450423147570.134172521157378
920.8543847808816980.2912304382366030.145615219118302
930.8298317007731760.3403365984536480.170168299226824
940.799553747405970.4008925051880610.200446252594031
950.7636884466440350.4726231067119290.236311553355965
960.7310555749981380.5378888500037240.268944425001862
970.751741927331530.4965161453369410.24825807266847
980.7493465068530560.5013069862938890.250653493146944
990.7122346964319530.5755306071360940.287765303568047
1000.6897448649238670.6205102701522650.310255135076133
1010.6494349222362850.701130155527430.350565077763715
1020.6066348457904770.7867303084190460.393365154209523
1030.563244216748730.8735115665025390.43675578325127
1040.5186541566685340.9626916866629310.481345843331466
1050.4758806504744060.9517613009488130.524119349525594
1060.463612141119950.92722428223990.53638785888005
1070.470779049273710.941558098547420.52922095072629
1080.5095328074496360.9809343851007270.490467192550364
1090.4709717567628780.9419435135257560.529028243237122
1100.4286116910002730.8572233820005460.571388308999727
1110.3814515054168460.7629030108336930.618548494583154
1120.7112886403632380.5774227192735250.288711359636762
1130.7473975444481890.5052049111036220.252602455551811
1140.7200322666398490.5599354667203030.279967733360151
1150.8546521660591680.2906956678816640.145347833940832
1160.8227162001041920.3545675997916160.177283799895808
1170.7895983733747360.4208032532505280.210401626625264
1180.7524050165307830.4951899669384340.247594983469217
1190.7217768440500780.5564463118998430.278223155949921
1200.7738925738290680.4522148523418630.226107426170932
1210.860942680640340.278114638719320.13905731935966
1220.838493713445110.3230125731097790.161506286554889
1230.81442814843470.37114370313060.1855718515653
1240.7715492958540490.4569014082919030.228450704145951
1250.774698277617690.4506034447646210.225301722382311
1260.7259122102917470.5481755794165060.274087789708253
1270.6906768862708890.6186462274582220.309323113729111
1280.6397780036985880.7204439926028230.360221996301412
1290.5907368861560870.8185262276878260.409263113843913
1300.7185032158087570.5629935683824870.281496784191243
1310.6603237787138150.679352442572370.339676221286185
1320.5951269309861740.8097461380276510.404873069013826
1330.5537187639610460.8925624720779080.446281236038954
1340.4814457747577630.9628915495155260.518554225242237
1350.504899838699720.990200322600560.49510016130028
1360.4324005633879520.8648011267759040.567599436612048
1370.383851090629990.767702181259980.61614890937001
1380.396248754615260.7924975092305190.60375124538474
1390.3237631621555360.6475263243110710.676236837844465
1400.2544030009655450.508806001931090.745596999034455
1410.3440471799139950.6880943598279890.655952820086005
1420.2945759068292850.589151813658570.705424093170715
1430.2264455868972510.4528911737945030.773554413102749
1440.1596988583803380.3193977167606770.840301141619662
1450.2399300775530410.4798601551060830.760069922446959
1460.1693483072714130.3386966145428260.830651692728587
1470.1605212839060140.3210425678120290.839478716093986
1480.0873080906605050.174616181321010.912691909339495


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 level20.0144927536231884OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/10fgfq1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/10fgfq1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/1rxie1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/1rxie1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/2rxie1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/2rxie1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/3jozh1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/3jozh1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/4jozh1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/4jozh1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/5ufgk1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/5ufgk1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/6ufgk1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/6ufgk1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/75oyn1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/75oyn1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/85oyn1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/85oyn1290342102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/95oyn1290342102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290342179exxqtjcy3k25adp/95oyn1290342102.ps (open in new window)


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