Home » date » 2010 » Dec » 01 »

workshop 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: Wed, 01 Dec 2010 15:08:04 +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/01/t1291215996kmgq96jtsum0gc3.htm/, Retrieved Wed, 01 Dec 2010 16:06:48 +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/01/t1291215996kmgq96jtsum0gc3.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 «
5 6 5 7 3 2 6 2 3 3 6 6 6 5 3 6 4 4 5 2 6 2 6 3 3 5 7 3 4 4 5 6 5 4 4 6 5 3 5 2 6 6 5 5 3 5 7 4 5 3 5 7 1 6 1 5 4 6 5 1 6 1 6 2 3 5 6 6 5 3 5 4 4 4 3 6 5 6 6 3 6 5 5 5 3 4 6 3 6 2 5 4 5 5 3 5 6 4 2 2 5 3 5 3 3 6 3 6 5 2 5 5 3 6 2 7 5 4 5 3 6 5 5 4 2 6 5 4 5 4 6 5 5 5 1 6 2 6 5 1 4 6 7 5 2 5 7 2 6 2 6 2 4 6 4 4 3 6 6 3 5 6 5 6 3 5 5 5 4 3 5 7 5 4 3 7 5 6 3 3 7 6 6 5 4 6 5 1 6 4 7 3 4 4 3 6 7 2 6 1 5 5 3 3 3 6 5 4 2 3 4 6 5 5 3 6 2 4 5 3 5 3 3 6 0 6 6 4 4 3 6 7 6 3 1 5 5 4 3 4 6 4 5 4 4 5 6 4 5 3 5 7 5 4 1 5 2 6 3 2 6 2 6 4 3 6 2 4 4 1 5 5 4 4 2 7 2 6 3 3 6 5 4 6 3 5 6 2 5 4 5 2 6 5 3 6 4 5 6 4 5 6 6 6 2 5 4 6 4 2 6 3 5 5 4 6 3 5 4 3 3 3 5 6 2 5 6 5 5 3 5 6 3 5 3 6 5 4 5 2 5 3 1 5 3 5 3 5 2 3 4 2 2 5 3 5 3 6 5 3 5 3 5 5 2 2 5 2 2 3 6 3 6 6 2 6 5 5 4 3 6 2 6 4 3 6 5 3 6 3 5 6 4 6 3 5 6 4 4 3 6 5 4 2 3 5 2 4 4 2 5 6 5 5 3 6 7 2 7 3 3 5 3 7 3 6 5 5 5 4 3 2 6 5 2 5 5 5 5 3 5 6 6 4 4 6 5 3 6 3 5 5 4 5 4 6 4 4 4 2 6 5 3 6 1 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
populariteit[t] = + 2.81665757771633 + 0.0945988532463486handgebruik[t] + 0.0180421171015053ontmoeting[t] -0.0443126088855232extravert[t] -0.0925306581000226blozen[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.816657577716330.5001115.632100
handgebruik0.09459885324634860.0642951.47130.1432870.071644
ontmoeting0.01804211710150530.044550.4050.6860620.343031
extravert-0.04431260888552320.051094-0.86730.3871710.193586
blozen-0.09253065810002260.057212-1.61730.1078970.053949


Multiple Linear Regression - Regression Statistics
Multiple R0.175438421515774
R-squared0.0307786397439464
Adjusted R-squared0.0051039017239185
F-TEST (value)1.19879080051127
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0.313738613320306
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.846709917689102
Sum Squared Residuals108.254570391676


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.528626895429380.471373104570618
232.747890794746940.252109205253055
332.76397445599020.236025544009799
422.81651543955824-0.816515439558236
532.876867303784220.123132696215776
642.912886204601951.08711379539805
742.80621886972941.19378113027060
822.87887016554527-0.878870165545265
932.808287064875720.191712935124276
1032.776042937616400.223957062383596
1112.81645010617295-1.81645010617295
1212.63329136854084-1.63329136854084
1332.951355844782740.0486441552172578
1432.669375602743850.330624397256148
1532.814447244411910.185552755588089
1632.653401680788670.346598319211327
1732.790244947774220.209755052225781
1822.61518391805405-0.615183918054050
1932.677603977426370.322396022573635
2023.03559279481497-1.03559279481497
2132.844623176524900.155376823475095
2222.70984810468569-0.709848104685685
2322.69174065419889-0.691740654198894
2432.929156409906090.0708435900939094
2522.88277560587424-0.882775605874241
2642.834557556659741.16544244334026
2712.79024494777422-1.79024494777422
2812.69180598758418-1.69180598758418
2922.53046414061198-0.53046414061198
3022.77213749728743-0.772137497287428
3142.687900547255201.31209945274480
3232.428119740092970.571880259907035
3332.621157553529350.378842446470647
3432.788176752627890.211823247372107
3532.824260986830900.175739013169097
3633.02559250833509-0.0255925083350893
3742.858573309236551.14142669076345
3842.874964725216291.12503527478371
3932.985602833803100.0143971661968974
4012.86673635053378-1.86673635053378
4132.969332628498960.0306673715010384
4233.11214953095981-0.112149530959809
4332.619089358383030.380910641616973
4432.780431205355230.219568794644774
4502.65565641999588-2.65565641999588
4632.945130331861270.0548696681387303
4712.96707788929175-1.96707788929175
4842.925020019613441.07497998038656
4942.864733488772741.13526651122726
5032.75800082051490.241999179485101
5112.82426098683090-1.82426098683090
5222.78226845053788-0.782268450537876
5332.78433664568420.215663354315798
5412.87296186345525-1.87296186345525
5522.83248936151342-0.832489361513416
5632.971466157030570.0285338429694265
5732.742026898559720.257973101440281
5842.846626038285951.15337396171405
5932.597207134337830.402792865662169
6042.679672172572691.32032782742731
6122.57684494464383-0.57684494464383
6222.72582202664086-0.725822026640864
6342.754160713571211.24583928642879
6432.846691371671230.153308628328769
6522.37783349573214-0.37783349573214
6632.713688211629380.286311788370625
6732.802313429400420.197686570599578
6822.83455755665974-0.834557556659742
6932.836812295866950.163187704133048
7032.937153834624930.0628461653750727
7132.679858716633580.320141283366425
7232.615249251439340.384750748560663
7322.65956186032486-0.65956186032486
7432.822379335745460.177620664254539
7522.61731744658566-0.617317446585663
7632.882775605874240.117224394125759
7732.78433664568420.215663354315798
7832.786339507445240.213660492554757
7932.665470162414880.334529837585124
8032.850531478614920.149468521385079
8133.11214953095981-0.112149530959809
8222.7783630102089-0.7783630102089
8332.713688211629380.286311788370625
8432.774205692433750.225794307566246
8532.410012289606170.589987710393826
8642.790244947774221.20975505222578
8722.40800942784513-0.408009427845134
8832.695646094527870.30435390547213
8942.761906260843881.23809373915613
9032.786339507445240.213660492554757
9142.739958703413391.26004129658661
9222.90904609765826-0.909046097658259
9312.78633950744524-1.78633950744524
9432.909046097658260.0909539023417408
9522.79640512731041-0.796405127310405
9632.639386214691740.360613785308257
9732.780200255391550.21979974460845
9842.91934266748711.08065733251290
9932.772202830672710.227797169327286
10032.754160713571210.245839286428792
10132.603115436427850.396884563572152
10212.60104724128152-1.60104724128152
10342.872961863455251.12703813654475
10432.923182774430790.0768172255692117
10532.736118596469700.263881403530297
10622.80231342940042-0.802313429400422
10732.691805987584180.30819401241582
10832.76629452858270.233705471417303
10942.977264719832511.02273528016749
11032.647493378698660.352506621301343
11142.844623176524911.15537682347509
11232.651333485642350.348666514357653
11332.444093662048140.555906337951856
11442.446161857194471.55383814280553
11522.89691228264677-0.89691228264677
11622.68973779243785-0.689737792437854
11732.645173306106160.354826693893839
11822.78020025539155-0.78020025539155
11933.06783692207429-0.0678369220742863
12022.65749366517853-0.657493665178533
12102.37783349573214-2.37783349573214
12232.790244947774220.209755052225781
12342.832489361513421.16751063848658
12432.911114292804590.0888857071954147
12532.709848104685690.290151895314315
12642.691805987584181.30819401241582
12732.850531478614920.149468521385079
12822.83048649975238-0.830486499752376
12932.425986211561350.574013788438646
13022.7580008205149-0.758000820514898
13122.67779052148725-0.677790521487249
13222.83455755665974-0.834557556659742
13342.75800082051491.24199917948510
13432.784271312298920.215728687701083
13532.792499686981430.207500313018571
13622.35540311089181-0.355403110891812
13732.973238068827940.0267619311720623
13832.814447244411910.185552755588089
13932.560871022688650.439128977311349
14042.939222029771251.06077797022875
14133.09636215306551-0.0963621530655147
14232.695646094527870.30435390547213
14332.880707410727920.119292589272085
14432.736118596469700.263881403530297
14532.661630055471190.338369944528814
14632.921179912669750.078820087330252
14732.852599673761250.147400326238753
14832.719661847104680.280338152895322
14943.01577876591610.984221234083903
15022.89490942088573-0.89490942088573
15132.860828048443760.13917195155624
15212.7157564067757-1.7157564067757
15332.786404840830530.213595159169472
15442.438054693187561.56194530681244
15532.876867303784220.123132696215775
15622.68583235210888-0.685832352108878


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.3244078713357140.6488157426714270.675592128664286
90.1995399672703510.3990799345407020.80046003272965
100.1260150190854250.252030038170850.873984980914575
110.1231769597650870.2463539195301750.876823040234913
120.4913903879239190.9827807758478380.508609612076081
130.3886594419575470.7773188839150940.611340558042453
140.3040167076799780.6080334153599570.695983292320022
150.2697132178604140.5394264357208280.730286782139586
160.2409247432610680.4818494865221350.759075256738932
170.1813553687708870.3627107375417740.818644631229113
180.1321794887098110.2643589774196210.867820511290189
190.1273509140436850.254701828087370.872649085956315
200.3570813812603290.7141627625206580.642918618739671
210.2906544772826890.5813089545653770.709345522717311
220.2545109211902630.5090218423805270.745489078809737
230.2023167661120940.4046335322241880.797683233887906
240.1771846045613750.354369209122750.822815395438625
250.1947458908782370.3894917817564740.805254109121763
260.3225715484035820.6451430968071650.677428451596418
270.5289653877053840.9420692245892310.471034612294616
280.6004177558561670.7991644882876660.399582244143833
290.6078880693954320.7842238612091360.392111930604568
300.5657792490677810.8684415018644380.434220750932219
310.7866421624594430.4267156750811140.213357837540557
320.7670512710367590.4658974579264830.232948728963241
330.7317356083805970.5365287832388060.268264391619403
340.6856207718330870.6287584563338250.314379228166913
350.6339514240876360.7320971518247290.366048575912364
360.5786607107285170.8426785785429670.421339289271483
370.6162491493068550.767501701386290.383750850693145
380.6971684253603710.6056631492792580.302831574639629
390.6476283557128380.7047432885743250.352371644287163
400.7874285962448150.425142807510370.212571403755185
410.7476202320851140.5047595358297720.252379767914886
420.7033150913086140.5933698173827730.296684908691386
430.6652069113556070.6695861772887870.334793088644393
440.6234862234571920.7530275530856170.376513776542808
450.8874972825238560.2250054349522880.112502717476144
460.8611159627414970.2777680745170050.138884037258503
470.952887283688290.09422543262342020.0471127163117101
480.9602174443733850.07956511125322980.0397825556266149
490.967688266854050.0646234662919010.0323117331459505
500.9590234803035650.08195303939287090.0409765196964354
510.984385697179150.03122860564169810.0156143028208491
520.983330047883550.03333990423289890.0166699521164494
530.9780282633547870.04394347329042590.0219717366452130
540.992059800530120.01588039893975940.00794019946987969
550.9917086429992630.01658271400147370.00829135700073685
560.9886041957460840.02279160850783090.0113958042539154
570.98527373291080.02945253417840000.0147262670892000
580.9892889938291360.02142201234172710.0107110061708636
590.9867044851800750.02659102963985100.0132955148199255
600.9914150626760950.01716987464780950.00858493732390475
610.9899165619392360.02016687612152830.0100834380607641
620.9889152521965360.02216949560692810.0110847478034641
630.9923515700732730.01529685985345430.00764842992672716
640.9896005185428230.02079896291435480.0103994814571774
650.9863576674555880.02728466508882380.0136423325444119
660.982274756909310.03545048618137940.0177252430906897
670.9770219490110530.04595610197789390.0229780509889470
680.9772669644149580.04546607117008490.0227330355850424
690.9708534968552680.05829300628946420.0291465031447321
700.9623777782314580.07524444353708360.0376222217685418
710.954093939861870.09181212027625950.0459060601381297
720.944481995177520.1110360096449600.0555180048224802
730.938666777468990.1226664450620190.0613332225310095
740.924563101449390.1508737971012200.0754368985506098
750.9161908183211030.1676183633577940.0838091816788969
760.8973006228248790.2053987543502430.102699377175121
770.8762621491995650.2474757016008700.123737850800435
780.8525079556294460.2949840887411090.147492044370554
790.8281928340364530.3436143319270940.171807165963547
800.7980137724422930.4039724551154150.201986227557707
810.7661768886776020.4676462226447950.233823111322397
820.7590453939479940.4819092121040120.240954606052006
830.7246653947062180.5506692105875640.275334605293782
840.6864612017733950.627077596453210.313538798226605
850.6648290838895860.6703418322208280.335170916110414
860.7009531057069510.5980937885860980.299046894293049
870.6662137359017090.6675725281965820.333786264098291
880.6268458911529390.7463082176941220.373154108847061
890.668938465093240.662123069813520.33106153490676
900.6268333729974040.7463332540051930.373166627002596
910.6752214078056850.649557184388630.324778592194315
920.6842082806428030.6315834387143940.315791719357197
930.8256860075066230.3486279849867540.174313992493377
940.7936682866488660.4126634267022690.206331713351134
950.7941966041915660.4116067916168670.205803395808434
960.7627612255978670.4744775488042660.237238774402133
970.7271419112686950.545716177462610.272858088731305
980.7415564096027820.5168871807944360.258443590397218
990.7020950285319440.5958099429361120.297904971468056
1000.6605815246436640.6788369507126710.339418475356336
1010.6224613303551540.7550773392896920.377538669644846
1020.7415168842508240.5169662314983520.258483115749176
1030.7678172055282680.4643655889434640.232182794471732
1040.7278062289427130.5443875421145740.272193771057287
1050.6880495342613120.6239009314773750.311950465738688
1060.698511845012020.602976309975960.30148815498798
1070.6592357558285650.681528488342870.340764244171435
1080.6167790403014210.7664419193971580.383220959698579
1090.6232660678013450.753467864397310.376733932198655
1100.5823626451715510.8352747096568980.417637354828449
1110.6295583451675680.7408833096648630.370441654832432
1120.5849675313052340.8300649373895320.415032468694766
1130.5631789093941690.8736421812116620.436821090605831
1140.7138676056537430.5722647886925140.286132394346257
1150.773147768507240.4537044629855200.226852231492760
1160.7423546416985310.5152907166029380.257645358301469
1170.7004806912054240.5990386175891520.299519308794576
1180.6668410252654250.666317949469150.333158974734575
1190.6203270802209140.7593458395581720.379672919779086
1200.5829991539267040.8340016921465920.417000846073296
1210.8789879738696050.2420240522607890.121012026130395
1220.8463269711484170.3073460577031650.153673028851583
1230.8733425586801780.2533148826396440.126657441319822
1240.8378589883708370.3242820232583260.162141011629163
1250.7991766980757470.4016466038485060.200823301924253
1260.8644109550554580.2711780898890850.135589044944542
1270.8254720796309420.3490558407381150.174527920369057
1280.818761776876410.3624764462471790.181238223123589
1290.7818114819078740.4363770361842520.218188518092126
1300.7899709289214210.4200581421571580.210029071078579
1310.8135162142664360.3729675714671280.186483785733564
1320.8304841477891130.3390317044217730.169515852210887
1330.8703048253789090.2593903492421820.129695174621091
1340.8254771516851610.3490456966296780.174522848314839
1350.7722435678819680.4555128642360650.227756432118032
1360.7727343346219440.4545313307561120.227265665378056
1370.7092511835325270.5814976329349460.290748816467473
1380.6335726149442840.7328547701114330.366427385055717
1390.5816936776740370.8366126446519250.418306322325963
1400.6158691690627210.7682616618745570.384130830937279
1410.5777664942054910.8444670115890170.422233505794509
1420.4888413606943620.9776827213887230.511158639305638
1430.3894505293272280.7789010586544550.610549470672773
1440.3000248677837490.6000497355674980.699975132216251
1450.2628209201419270.5256418402838540.737179079858073
1460.1780734196831990.3561468393663970.821926580316801
1470.1062991761139670.2125983522279350.893700823886033
1480.1661950246658940.3323900493317890.833804975334106


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level180.127659574468085NOK
10% type I error level250.177304964539007NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/10bfoz1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/10bfoz1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/1b4os1291216070.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/1b4os1291216070.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/2fn8q1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/2fn8q1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/3fn8q1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/3fn8q1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/4fn8q1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/4fn8q1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/5pf7t1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/5pf7t1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/6pf7t1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/6pf7t1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/70opw1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/70opw1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/80opw1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/80opw1291216071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/9bfoz1291216071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215996kmgq96jtsum0gc3/9bfoz1291216071.ps (open in new window)


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