Home » date » 2010 » Dec » 03 »

p_Stress_MR3

*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 20:44: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/t12914090169zh33c58d15m363.htm/, Retrieved Fri, 03 Dec 2010 21:43:36 +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/t12914090169zh33c58d15m363.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 «
10 53 7 6 15 11 12 2 4 25 6 86 4 6 15 12 11 4 3 24 13 66 6 5 14 15 14 7 5 21 12 67 5 4 10 10 12 3 3 23 8 76 4 4 10 12 21 7 6 17 6 78 3 6 12 11 12 2 5 19 10 53 5 7 18 5 22 7 6 18 10 80 6 5 12 16 11 2 6 27 9 74 5 4 14 11 10 1 5 23 9 76 6 6 18 15 13 2 5 23 7 79 7 1 9 12 10 6 3 29 5 54 6 4 11 9 8 1 5 21 14 67 7 6 11 11 15 1 7 26 6 87 6 6 17 15 10 1 5 25 10 58 4 5 8 12 14 2 5 25 10 75 6 3 16 16 14 2 3 23 7 88 4 7 21 14 11 2 5 26 10 64 5 2 24 11 10 1 6 20 8 57 3 5 21 10 13 7 5 29 6 66 3 5 14 7 7 1 2 24 10 54 4 3 7 11 12 2 5 23 12 56 5 5 18 10 14 4 4 24 7 86 3 5 18 11 11 2 6 30 15 80 7 6 13 16 9 1 3 22 8 76 7 4 11 14 11 1 5 22 10 69 4 4 13 12 15 5 4 13 13 67 4 4 13 12 13 2 5 24 8 80 5 2 18 11 9 1 2 17 11 54 6 3 14 6 15 3 2 24 7 71 5 6 12 14 10 1 5 21 9 84 4 6 9 9 11 2 2 23 10 74 6 5 12 15 13 5 2 24 8 71 5 3 8 12 8 2 2 24 15 63 5 3 5 12 20 6 5 24 9 71 6 4 10 9 12 4 5 23 7 76 2 4 11 13 10 1 1 26 11 69 6 5 11 15 10 3 5 24 9 74 7 3 12 11 9 6 2 21 8 75 5 5 12 10 14 7 6 23 8 54 5 4 1 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
PStress[t] = + 5.77337275478613 -0.0342048600664453BelInSprt[t] + 0.162129769967189KunnenRekRel[t] -0.144754395838316ExtraCurAct[t] -0.0528074645624752Verwouders[t] + 0.0619866259734261Populariteit[t] + 0.405039685698546Depressie[t] -0.188350390479734Slaapgebrek[t] + 0.202001749841396ToekZorgen[t] + 0.0432050643236558`MateGeorgZijn `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.773372754786132.0973362.75270.0067430.003371
BelInSprt-0.03420486006644530.017296-1.97760.0500540.025027
KunnenRekRel0.1621297699671890.1105281.46690.1447920.072396
ExtraCurAct-0.1447543958383160.123818-1.16910.2444750.122237
Verwouders-0.05280746456247520.048681-1.08480.2800040.140002
Populariteit0.06198662597342610.0579321.070.2865760.143288
Depressie0.4050396856985460.0636266.365900
Slaapgebrek-0.1883503904797340.093402-2.01650.0457710.022886
ToekZorgen0.2020017498413960.1162361.73790.0845670.042284
`MateGeorgZijn `0.04320506432365580.046140.93640.3507840.175392


Multiple Linear Regression - Regression Statistics
Multiple R0.623985664675957
R-squared0.389358109721096
Adjusted R-squared0.347723435383898
F-TEST (value)9.35177507496987
F-TEST (DF numerator)9
F-TEST (DF denominator)132
p-value6.5743854804623e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.92734869960743
Sum Squared Residuals490.336837303956


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.4885471581556-0.488547158155593
267.90843681121168-1.90843681121168
31310.22477148316432.7752285168357
4129.700216796838112.29978320316189
5812.59294701117-4.59294701117001
669.08610033421258-3.08610033421258
71012.6994040268589-2.69940402685891
81010.1013700284188-0.101370028418802
999.28216445334169-0.282164453341689
10910.1498610237591-1.14986102375906
1179.10916176310506-2.10916176310506
1259.26635106633395-4.26635106633395
131412.27358873689851.72641126310153
1468.88605648962205-2.88605648962205
151011.4196079429094-1.41960794290935
161010.7869668124546-0.786966812454587
1778.36951556910205-1.36951556910205
18109.458033756928450.541966243071551
1989.30724136094698-1.30724136094698
2067.06092365191068-1.06092365191068
211010.9402675133964-0.940267513396408
221210.37619194031331.62380805968670
2378.91258883384755-1.91258883384755
24158.622178385925376.37782161407463
25810.2442311661258-2.24423116612577
261010.0435975477385-0.0435975477384701
271310.54423652531512.45576347468492
2887.884938905205080.115061094794922
291111.0489101529417-0.0489101529417004
3079.30043492026231-2.30043492026231
3198.239225407593560.760774592406436
32109.552018570465390.447981429534612
3388.34713489565026-0.347134895650259
341513.49227608585711.50772391414294
3599.87919360976915-0.879193609769153
3678.3313692625469-1.33136926254689
37119.54343730874811.45656269125189
3897.817586301970621.18241369802938
3989.83889165034563-1.83889165034563
4088.07031522147137-0.0703152214713721
41129.006690910027572.99330908997243
421310.19386912242842.80613087757164
4399.2436464741124-0.243646474112408
44119.454429355218851.54557064478115
4588.40345679870989-0.403456798709888
461010.6138127734815-0.613812773481454
471312.55691506756290.443084932437137
481211.33742274615210.662577253847944
49129.667262285796052.33273771420395
5098.615434838702450.384565161297553
51810.0263023009330-2.02630230093305
5298.399737400795840.600262599204165
53128.364128930204323.63587106979568
541211.65557593948450.344424060515546
551614.34012939568281.65987060431725
56118.934668581776422.06533141822358
571310.23892284124852.76107715875153
581010.9074268945231-0.907426894523076
59910.5593292803811-1.55932928038106
60149.739596720063184.26040327993682
611311.61061329756831.38938670243169
621210.53320684116981.46679315883024
63910.9521337491224-1.95213374912245
64910.4424726882582-1.44247268825816
651011.0397300873270-1.03973008732702
66810.3875465176335-2.38754651763355
67910.3037781735247-1.30377817352473
6898.954050286901260.0459497130987453
69118.70710874532272.29289125467730
7079.86048859103846-2.86048859103846
711111.6516072530218-0.651607253021812
7299.1024947350616-0.102494735061600
73118.977626648795362.02237335120464
7499.53450545254268-0.534505452542676
75810.2034978250591-2.20349782505915
7698.153082237451370.846917762548632
7789.06360266535608-1.06360266535608
78910.0392733091713-1.03927330917134
791010.2405298607058-0.240529860705809
8099.80865647825014-0.808656478250142
811713.77751902000293.22248097999715
8279.29252641671997-2.29252641671997
831111.0592868587740-0.059286858773962
84910.0754655383367-1.07546553833666
85109.799088796357220.200911203642778
86118.648809897103512.35119010289649
8788.31194325951977-0.311943259519767
881212.2222556983569-0.22225569835692
891010.0956129682348-0.095612968234843
9078.92833116250647-1.92833116250647
9198.742464249371540.257535750628456
9278.19120228467682-1.19120228467682
931210.57421835207021.42578164792983
9489.2329686710533-1.23296867105330
951310.36087799174702.63912200825305
96910.8694697382500-1.86946973825004
971512.39195287218442.60804712781557
9889.1812368254096-1.18123682540959
991411.72105694985022.27894305014981
1001413.54964664384150.450353356158483
101910.2459753700833-1.24597537008334
1021311.87174700477491.12825299522511
103118.91629031021052.0837096897895
1041011.8054836546751-1.80548365467515
105610.0875608331275-4.08756083312749
10688.3071254679926-0.3071254679926
1071011.3708417970852-1.37084179708517
108107.755406658825372.24459334117463
109108.89163168242681.10836831757320
1101212.0646908202124-0.0646908202123775
111109.586350030769560.413649969230443
11298.939016903952830.0609830960471657
11397.551805740949841.44819425905016
114119.377960608309121.62203939169088
11578.08456321677665-1.08456321677665
11678.82160573601362-1.82160573601362
11758.42600672452766-3.42600672452766
11898.940349487483230.0596505125167735
119119.845739764883881.15426023511611
1201512.26611098610462.73388901389538
12198.078425302885050.921574697114953
12299.32014194927413-0.320141949274125
12389.53513582770015-1.53513582770015
1241315.2727635081820-2.27276350818202
1251010.1807928233401-0.180792823340132
1261311.52752530365141.47247469634861
12797.410219493035441.58978050696456
128119.585065639636631.41493436036337
129810.5899908351982-2.58999083519818
130109.112969085886480.887030914113524
13198.877112400605140.122887599394861
13287.93465816406290.0653418359371003
13387.935387112324310.0646128876756898
1341310.74928784457012.25071215542986
1351110.82786362509080.172136374909205
136810.2442311661258-2.24423116612577
1371210.15446633223191.84553366776814
1381512.11027246227652.88972753772349
1391111.0592868587740-0.059286858773962
1401010.5101020130621-0.510102013062077
14158.42600672452766-3.42600672452766
142117.351043950610073.64895604938993


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.9878015631842360.02439687363152860.0121984368157643
140.9751570572498540.04968588550029110.0248429427501455
150.9803656075422010.03926878491559780.0196343924577989
160.9631677989864130.07366440202717310.0368322010135866
170.9412574091664780.1174851816670450.0587425908335223
180.947292237115370.1054155257692610.0527077628846306
190.932568954712330.1348620905753400.0674310452876698
200.9080686641426560.1838626717146890.0919313358573445
210.8676619218887470.2646761562225060.132338078111253
220.85181449436150.2963710112770010.148185505638501
230.8104631117573510.3790737764852980.189536888242649
240.9810919920712390.03781601585752230.0189080079287611
250.9808375152110830.03832496957783460.0191624847889173
260.9737553730690170.05248925386196670.0262446269309834
270.9854724110370380.0290551779259240.014527588962962
280.9783270072373910.04334598552521720.0216729927626086
290.967958071138260.06408385772347860.0320419288617393
300.9705918920634050.05881621587318960.0294081079365948
310.9671851170399180.0656297659201640.032814882960082
320.9573814827899970.08523703442000530.0426185172100027
330.941941720112880.1161165597742410.0580582798871203
340.9436076346210570.1127847307578850.0563923653789426
350.9300084911491780.1399830177016440.0699915088508219
360.9227211736579160.1545576526841670.0772788263420836
370.9098147269708690.1803705460582620.090185273029131
380.8898369775672450.220326044865510.110163022432755
390.8728342807294730.2543314385410550.127165719270527
400.8583765927192290.2832468145615420.141623407280771
410.879119331954540.2417613360909210.120880668045461
420.8892664068477660.2214671863044680.110733593152234
430.8617585433198660.2764829133602680.138241456680134
440.8406278824451690.3187442351096630.159372117554831
450.8092205607032240.3815588785935510.190779439296776
460.7704697879310180.4590604241379650.229530212068983
470.7689369247941030.4621261504117950.231063075205897
480.7293530930873110.5412938138253770.270646906912689
490.7669740195624220.4660519608751560.233025980437578
500.7278777021307750.544244595738450.272122297869225
510.7195050154974810.5609899690050380.280494984502519
520.6861487916191960.6277024167616080.313851208380804
530.790353916741490.419292166517020.20964608325851
540.7528884662483170.4942230675033660.247111533751683
550.7797372754396720.4405254491206570.220262724560328
560.821097260397630.3578054792047420.178902739602371
570.8548299316296060.2903401367407890.145170068370394
580.8327770077850710.3344459844298580.167222992214929
590.8248477669299160.3503044661401670.175152233070084
600.9493547522320410.1012904955359180.0506452477679588
610.9432436458006660.1135127083986690.0567563541993345
620.9366273526774790.1267452946450420.0633726473225212
630.939782596199280.120434807601440.06021740380072
640.9333507721581430.1332984556837140.066649227841857
650.9316440558157970.1367118883684070.0683559441842033
660.9363418001591630.1273163996816750.0636581998408373
670.926445856617450.1471082867650990.0735541433825493
680.9072276510761190.1855446978477630.0927723489238813
690.919961654872110.1600766902557790.0800383451278895
700.939952203105250.12009559378950.06004779689475
710.9261724307614270.1476551384771450.0738275692385726
720.9085111113910240.1829777772179520.0914888886089761
730.9111840997264090.1776318005471830.0888159002735913
740.8904200185227190.2191599629545630.109579981477281
750.8932878607841960.2134242784316080.106712139215804
760.882199241323580.2356015173528390.117800758676420
770.8680495677925040.2639008644149930.131950432207496
780.8511854117472690.2976291765054620.148814588252731
790.8192424695229260.3615150609541470.180757530477074
800.7908410928048820.4183178143902350.209158907195118
810.8559899432896410.2880201134207170.144010056710359
820.8679308867244330.2641382265511340.132069113275567
830.8399461914800670.3201076170398650.160053808519933
840.8327449668270670.3345100663458660.167255033172933
850.7994205893463970.4011588213072060.200579410653603
860.8788920937940630.2422158124118740.121107906205937
870.8596786579948850.280642684010230.140321342005115
880.8279445076846840.3441109846306330.172055492315316
890.7932709384306680.4134581231386650.206729061569332
900.8144673135643910.3710653728712170.185532686435609
910.7799283983232730.4401432033534530.220071601676727
920.7827251310546160.4345497378907670.217274868945384
930.784897631841840.4302047363163210.215102368158161
940.750847578848660.4983048423026810.249152421151341
950.7795908475637790.4408183048724430.220409152436221
960.7572590481748450.4854819036503110.242740951825155
970.7686632378336430.4626735243327130.231336762166357
980.7315253405732430.5369493188535130.268474659426757
990.713351077978910.5732978440421790.286648922021089
1000.7140733500664450.571853299867110.285926649933555
1010.7191668119465410.5616663761069180.280833188053459
1020.7320122990328710.5359754019342570.267987700967129
1030.7547727400652030.4904545198695940.245227259934797
1040.7343964923397230.5312070153205530.265603507660277
1050.8471471718226920.3057056563546170.152852828177308
1060.8094266482787780.3811467034424450.190573351721222
1070.833477014089620.3330459718207590.166522985910379
1080.8205247288408070.3589505423183860.179475271159193
1090.7911349849163750.4177300301672510.208865015083625
1100.8140361070722630.3719277858554730.185963892927737
1110.7936911745731950.4126176508536090.206308825426805
1120.7392693201546530.5214613596906940.260730679845347
1130.6879226201109090.6241547597781820.312077379889091
1140.6383139604452310.7233720791095370.361686039554769
1150.5731752249766480.8536495500467050.426824775023352
1160.5128648960317080.9742702079365840.487135103968292
1170.6101242361812940.7797515276374120.389875763818706
1180.5308184505688730.9383630988622540.469181549431127
1190.4515766994145310.9031533988290620.548423300585469
1200.4435698354785060.8871396709570130.556430164521494
1210.3693939554258120.7387879108516230.630606044574188
1220.2928699248579370.5857398497158730.707130075142063
1230.2403059418271110.4806118836542230.759694058172889
1240.3186795325936430.6373590651872860.681320467406357
1250.4554186128419840.9108372256839670.544581387158016
1260.3937085509311950.7874171018623910.606291449068804
1270.2892728383413460.5785456766826930.710727161658654
1280.2235767896019500.4471535792039010.77642321039805
1290.1620474036217540.3240948072435080.837952596378246


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level70.0598290598290598NOK
10% type I error level130.111111111111111NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/10g31y1291409073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/10g31y1291409073.ps (open in new window)


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/75ckv1291409073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/75ckv1291409073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/85ckv1291409073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/85ckv1291409073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/9g31y1291409073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914090169zh33c58d15m363/9g31y1291409073.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by