Home » date » 2010 » Dec » 03 »

minitutorial ws 4

*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: Fri, 03 Dec 2010 15:46:44 +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/03/t1291391107q52a8oa3vfn4ufn.htm/, Retrieved Fri, 03 Dec 2010 16:45:17 +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/03/t1291391107q52a8oa3vfn4ufn.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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
ConcernoverMistakes[t] = -18.3591714482512 + 1.58838471475270month[t] + 0.79875711851511Doubtsaboutactions[t] + 0.233450466257558ParentalExpectations[t] + 0.207082749570129ParentalCriticism[t] + 0.571862761699044PersonalStandards[t] -0.0999815995143383Organization[t] + 0.00354783249216934t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-18.359171448251219.993412-0.91830.3599470.179973
month1.588384714752702.0021750.79330.4288310.214415
Doubtsaboutactions0.798757118515110.1311486.090500
ParentalExpectations0.2334504662575580.1343331.73790.0842760.042138
ParentalCriticism0.2070827495701290.1700091.21810.2250970.112548
PersonalStandards0.5718627616990440.0962475.941600
Organization-0.09998159951433830.105485-0.94780.3447320.172366
t0.003547832492169340.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.30057129330630.699428706693719
22520.01752246718394.98247753281608
31721.0211399791426-4.02113997914265
41818.0925500792618-0.0925500792618023
51817.69056780293320.309432197066762
61617.877648378172-1.87764837817201
72020.7303968936034-0.7303968936034
81622.2384819662608-6.23848196626085
91822.1097766895970-4.10977668959702
101720.3404956440243-3.34049564402435
112322.16667800377120.833321996228807
123022.02409374820917.97590625179086
132314.97798333049958.02201666950045
141818.8006776299538-0.800677629953757
151521.5420869454813-6.54208694548131
161217.7473672648276-5.74736726482756
172119.31995062782011.68004937217993
181515.0095102272645-0.00951022726447562
192019.58180100715220.41819899284785
203126.17801170877194.8219882912281
212725.06546676357921.93453323642076
223426.87234655364597.12765344635407
232119.52125106772991.47874893227008
243120.777542919189110.2224570808109
251919.2620873882198-0.262087388219842
261620.1257631629215-4.12576316292152
272021.4505453886165-1.45054538861650
282118.17726396710972.82273603289032
292221.84045860638410.15954139361592
301719.3786812679951-2.37868126799510
312420.36288304198333.63711695801675
322530.4026260368561-5.40262603685613
332626.4499559136845-0.449955913684488
342524.0864121807230.913587819277002
351722.8670220283224-5.86702202832238
363227.76056076087404.23943923912604
373323.59838663714899.40161336285112
381321.7984983327297-8.79849833272967
393227.74779011438714.25220988561288
402525.787102563668-0.787102563668005
412926.99465619774862.00534380225137
422221.99154225796620.00845774203379076
431817.12961414405750.87038585594253
441721.6372078571851-4.63720785718515
452022.2319210210565-2.23192102105651
461520.4352937876135-5.43529378761353
472022.1071288311651-2.1071288311651
483328.12117199787564.87882800212443
492922.14115052184136.85884947815874
502326.4998596091402-3.49985960914021
512623.23459751292042.76540248707958
521818.9656042544921-0.965604254492147
532018.79612004574301.20387995425697
541111.7160709940257-0.716070994025735
552829.0105804767345-1.01058047673453
562623.39050434604672.60949565395329
572222.3414695454203-0.341469545420307
581720.1564210484307-3.15642104843071
591215.5692778789805-3.56927787898050
601420.8167935559991-6.81679355599913
611720.8202241820746-3.82022418207459
622121.3347129501434-0.334712950143380
631922.9763818374361-3.97638183743611
641823.1920758880957-5.19207588809565
651017.9120405565538-7.91204055655377
662924.40992651883414.59007348116592
673118.558476918801112.4415230811989
681922.9869414093617-3.98694140936169
69920.0961723263517-11.0961723263517
702022.5809984574057-2.58099845740569
712817.655273641087810.3447263589122
721918.22910835550710.770891644492931
733023.17875625633616.82124374366391
742927.10185744957871.89814255042130
752621.52085974872634.47914025127371
762319.57759138966333.42240861033671
771322.7673890269749-9.7673890269749
782122.6999656986182-1.69996569861817
791921.6345836806373-2.63458368063733
802822.96915701424535.03084298575474
812325.6973992029916-2.69739920299159
821813.95490316162954.04509683837052
832120.76154655918290.238453440817124
842021.9157961866931-1.91579618669312
852320.07774788362762.92225211637243
862120.83860115001720.161398849982816
872121.8931506037605-0.893150603760456
881523.0305779438395-8.03057794383952
892827.30058354392170.699416456078311
901917.70459000988641.29540999011360
912621.27720519998124.72279480001875
921013.4207961925499-3.4207961925499
931617.1995105289364-1.19951052893642
942221.17134539706720.82865460293282
951918.99893128599510.00106871400488703
963128.94037837692202.05962162307796
973125.29055862881655.70944137118355
982924.85281161756134.14718838243874
991917.50962614549991.49037385450014
1002218.95242751136353.04757248863650
1012322.49639238497760.503607615022413
1021516.2875354180751-1.28753541807506
1032021.4228525089516-1.42285250895161
1041819.6658145225114-1.66581452251145
1052322.25636924276460.743630757235358
1062520.90865743550984.09134256449023
1072116.67227715246434.32772284753566
1082419.56800771168244.4319922883176
1092525.3550235068465-0.355023506846472
1101719.619766860822-2.61976686082202
1111314.6659551691233-1.66595516912329
1122818.42626166372089.57373833627919
1132120.41967645109160.580323548908437
1142528.3159565386191-3.31595653861913
115921.1551764227403-12.1551764227403
1161618.0061106330230-2.00611063302304
1171921.2544613841652-2.25446138416516
1181719.6108037739653-2.61080377396526
1192524.67639153408490.323608465915107
1202015.56713373874454.43286626125549
1212921.87161261143767.12838738856236
1221419.1167857657226-5.11678576572263
1232227.0867941796051-5.08679417960509
1241515.9355784175142-0.935578417514242
1251925.6263325925739-6.62633259257395
1262022.0928920267450-2.09289202674503
1271517.7095654037931-2.70956540379315
1282022.1149283807381-2.11492838073813
1291820.5115649579609-2.51156495796086
1303325.76200252418027.23799747581977
1312224.0135738555549-2.01357385555485
1321616.6900618439135-0.690061843913491
1331719.3420422957593-2.34204229575933
1341615.31348031769890.68651968230106
1352117.29949926087643.70050073912357
1362627.7996968946194-1.79969689461943
1371821.304233865906-3.30423386590599
1381823.2073200148495-5.20732001484945
1391718.6825913123659-1.68259131236590
1402224.9799528930422-2.97995289304222
1413024.92541980820975.0745801917903
1423027.57056272486672.42943727513332
1432429.9683835869881-5.96838358698809
1442122.2960469748642-1.29604697486422
1452125.6227704527493-4.62277045274928
1462927.67396094315831.32603905684171
1473123.4643424664747.53565753352598
1482019.26558935597010.734410644029932
1491614.32613397177091.67386602822906
1502219.22366478822332.77633521177669
1512020.7522347250232-0.752234725023154
1522827.56107748344220.438922516557781
1533826.89041511611.1095848840000
1542219.43627227284222.56372772715775
1552025.9470773992814-5.9470773992814
1561718.31008307594-1.31008307593998
1572824.81405007758513.18594992241494
1582224.4230458313632-2.42304583136319
1593126.33981277238524.66018722761484


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.4829193016149590.9658386032299180.517080698385041
120.5540732393436450.891853521312710.445926760656355
130.7785712074528930.4428575850942130.221428792547107
140.8044013778971670.3911972442056660.195598622102833
150.7447735642805760.5104528714388470.255226435719424
160.664232544631890.671534910736220.33576745536811
170.6235277677461310.7529444645077390.376472232253869
180.5814159093338980.8371681813322030.418584090666102
190.5415638152832810.9168723694334380.458436184716719
200.5621504795336010.8756990409327970.437849520466399
210.4853487611294020.9706975222588040.514651238870598
220.4559249064379630.9118498128759260.544075093562037
230.4180293134236040.8360586268472080.581970686576396
240.5251318710594430.9497362578811140.474868128940557
250.4965945694728410.9931891389456820.503405430527159
260.5284303120479990.9431393759040010.471569687952001
270.4624564691639470.9249129383278940.537543530836053
280.3994328697227680.7988657394455360.600567130277232
290.3374991199397940.6749982398795890.662500880060206
300.3034494262526350.6068988525052690.696550573747365
310.2920688108971490.5841376217942970.707931189102851
320.4278905143310570.8557810286621140.572109485668943
330.3677709725805480.7355419451610960.632229027419452
340.3389216242501930.6778432485003860.661078375749807
350.3899119760466970.7798239520933940.610088023953303
360.354184460665440.708368921330880.64581553933456
370.4654268922738750.930853784547750.534573107726125
380.7615144023517240.4769711952965510.238485597648276
390.7480429223637580.5039141552724830.251957077636242
400.7114107689347490.5771784621305030.288589231065251
410.6764471981337660.6471056037324690.323552801866234
420.628165076844510.743669846310980.37183492315549
430.5764227236989070.8471545526021860.423577276301093
440.5640438355426710.8719123289146590.435956164457329
450.5471458311909280.9057083376181430.452854168809072
460.5791926855220740.8416146289558520.420807314477926
470.5354765355173430.9290469289653130.464523464482657
480.5259849118485100.9480301763029790.474015088151489
490.58621035398330.82757929203340.4137896460167
500.55732133154370.88535733691260.4426786684563
510.5264197363296410.9471605273407180.473580263670359
520.4766790272664290.9533580545328570.523320972733571
530.4330087212924440.8660174425848890.566991278707556
540.3882146891237590.7764293782475180.611785310876241
550.3473362447661960.6946724895323920.652663755233804
560.3187228020099800.6374456040199590.68127719799002
570.2758557123679040.5517114247358090.724144287632096
580.2478299770059350.4956599540118690.752170022994066
590.2295442247609740.4590884495219470.770455775239026
600.2646070039174270.5292140078348550.735392996082573
610.248127640276520.496255280553040.75187235972348
620.2141301810354990.4282603620709980.785869818964501
630.1969075329268410.3938150658536820.803092467073159
640.2179466817221930.4358933634443860.782053318277807
650.2669794120658070.5339588241316140.733020587934193
660.2759291272540540.5518582545081080.724070872745946
670.637769420135870.724461159728260.36223057986413
680.6219181725308830.7561636549382340.378081827469117
690.7951952892038090.4096094215923830.204804710796191
700.7678147506359330.4643704987281340.232185249364067
710.9127531564915340.1744936870169320.0872468435084658
720.8937271218045160.2125457563909670.106272878195484
730.9242926095928780.1514147808142450.0757073904071223
740.9124970207299570.1750059585400860.0875029792700431
750.9163309680112960.1673380639774080.0836690319887039
760.9106624721733080.1786750556533840.089337527826692
770.9620940858164270.07581182836714570.0379059141835728
780.9526852434423330.09462951311533320.0473147565576666
790.943473929806760.1130521403864800.0565260701932398
800.9479428525491880.1041142949016250.0520571474508123
810.9382652388085330.1234695223829350.0617347611914673
820.9375827240267030.1248345519465940.0624172759732972
830.9220533362512840.1558933274974330.0779466637487164
840.9065742500025290.1868514999949420.0934257499974709
850.8967632782064960.2064734435870070.103236721793503
860.8780800500150440.2438398999699110.121919949984956
870.8533755756665240.2932488486669530.146624424333476
880.9053301920169020.1893396159661960.0946698079830979
890.8861555888715220.2276888222569560.113844411128478
900.8636477117300980.2727045765398040.136352288269902
910.8658274788426220.2683450423147560.134172521157378
920.8543847808816980.2912304382366030.145615219118302
930.8298317007731760.3403365984536480.170168299226824
940.799553747405970.4008925051880610.200446252594031
950.7636884466440350.472623106711930.236311553355965
960.7310555749981380.5378888500037230.268944425001862
970.751741927331530.496516145336940.24825807266847
980.7493465068530560.5013069862938890.250653493146944
990.7122346964319530.5755306071360930.287765303568047
1000.6897448649238680.6205102701522650.310255135076132
1010.6494349222362850.701130155527430.350565077763715
1020.6066348457904770.7867303084190460.393365154209523
1030.563244216748730.8735115665025390.436755783251269
1040.5186541566685340.9626916866629320.481345843331466
1050.4758806504744080.9517613009488160.524119349525592
1060.4636121411199460.9272242822398920.536387858880054
1070.4707790492737110.9415580985474220.529220950726289
1080.5095328074496350.980934385100730.490467192550365
1090.470971756762880.941943513525760.52902824323712
1100.4286116910002730.8572233820005460.571388308999727
1110.3814515054168480.7629030108336960.618548494583152
1120.7112886403632380.5774227192735250.288711359636762
1130.7473975444481890.5052049111036220.252602455551811
1140.7200322666398490.5599354667203020.279967733360151
1150.8546521660591680.2906956678816640.145347833940832
1160.8227162001041930.3545675997916150.177283799895807
1170.7895983733747360.4208032532505280.210401626625264
1180.7524050165307840.4951899669384320.247594983469216
1190.7217768440500780.5564463118998440.278223155949922
1200.7738925738290690.4522148523418620.226107426170931
1210.860942680640340.2781146387193210.139057319359660
1220.838493713445110.3230125731097790.161506286554890
1230.81442814843470.37114370313060.1855718515653
1240.771549295854050.4569014082919010.228450704145950
1250.774698277617690.4506034447646210.225301722382310
1260.7259122102917470.5481755794165060.274087789708253
1270.690676886270890.6186462274582210.309323113729111
1280.6397780036985880.7204439926028230.360221996301412
1290.5907368861560870.8185262276878270.409263113843913
1300.7185032158087570.5629935683824870.281496784191244
1310.6603237787138160.6793524425723690.339676221286184
1320.5951269309861740.8097461380276510.404873069013826
1330.5537187639610460.8925624720779090.446281236038954
1340.4814457747577620.9628915495155250.518554225242238
1350.5048998386997190.9902003226005620.495100161300281
1360.4324005633879520.8648011267759040.567599436612048
1370.3838510906299900.7677021812599790.61614890937001
1380.3962487546152590.7924975092305190.603751245384741
1390.3237631621555350.647526324311070.676236837844465
1400.2544030009655450.508806001931090.745596999034455
1410.3440471799139950.688094359827990.655952820086005
1420.2945759068292850.589151813658570.705424093170715
1430.2264455868972510.4528911737945030.773554413102749
1440.1596988583803390.3193977167606770.840301141619661
1450.2399300775530420.4798601551060830.760069922446958
1460.1693483072714130.3386966145428270.830651692728587
1470.1605212839060140.3210425678120280.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/Dec/03/t1291391107q52a8oa3vfn4ufn/1035me1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/1035me1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/1wm7l1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/1wm7l1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/2pwoo1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/2pwoo1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/3pwoo1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/3pwoo1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/4pwoo1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/4pwoo1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/5z5681291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/5z5681291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/6z5681291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/6z5681291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/7aenu1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/7aenu1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/8aenu1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/8aenu1291391192.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/935me1291391192.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291391107q52a8oa3vfn4ufn/935me1291391192.ps (open in new window)


 
Parameters (Session):
par1 = 0 ; par2 = 36 ;
 
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