Home » date » 2010 » Dec » 24 »

*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, 24 Dec 2010 18:43:14 +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/24/t129321610683d2ts7nk3a8qyg.htm/, Retrieved Fri, 24 Dec 2010 19:41:49 +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/24/t129321610683d2ts7nk3a8qyg.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 «
2 3 4 4 4 2 2 4 4 2 3 3 4 3 5 4 4 2 5 4 2 4 4 3 4 4 4 2 4 2 2 2 3 2 2 1 5 2 5 4 2 4 4 2 3 4 2 2 3 4 3 1 1 2 2 1 3 3 2 3 5 2 3 4 4 3 4 2 2 4 1 1 3 2 2 4 4 5 4 2 4 4 2 2 4 3 5 4 2 3 3 4 1 1 2 4 3 3 2 1 4 2 2 4 4 4 2 2 2 2 2 1 5 2 3 2 4 1 2 2 2 2 4 4 4 4 2 2 3 4 1 2 4 2 3 4 2 4 1 4 4 2 3 2 4 4 2 4 2 4 2 3 2 4 1 4 3 4 5 3 4 4 2 2 5 2 2 2 2 4 5 2 4 4 4 4 3 4 1 4 4 4 4 4 3 4 5 1 3 2 2 2 3 4 5 2 4 4 2 4 4 4 4 2 2 3 3 4 2 2 4 4 2 2 5 4 2 2 4 3 3 2 4 2 4 2 5 2 4 2 4 4 5 4 3 4 3 4 3 4 2 2 3 2 2 4 2 1 1 3 3 2 3 2 2 1 2 4 3 4 3 4 2 4 1 1 4 2 2 4 2 4 3 2 4 2 4 4 4 4 2 4 4 4 3 3 2 4 2 4 2 2 1 2 3 4 4 4 4 2 2 2 1 1
 
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 time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Talk[t] = + 2.45451506198987 + 0.107073554497237Driver[t] + 0.00408452725909042M1[t] + 0.902963220784294M2[t] + 0.455762701774012M3[t] + 0.0304762330688719M4[t] + 0.684908072788722M5[t] + 0.163430441120555M6[t] + 1.05686793887865M7[t] + 1.00251923175277M8[t] + 0.51987770481297M9[t] + 0.883285710527861M10[t] + 0.422283179117521M11[t] -0.00330628375724843t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.454515061989870.4290835.720400
Driver0.1070735544972370.0867891.23370.2194030.109702
M10.004084527259090420.4451750.00920.9926930.496346
M20.9029632207842940.4455812.02650.0446420.022321
M30.4557627017740120.4457361.02250.3083360.154168
M40.03047623306887190.4448210.06850.9454760.472738
M50.6849080727887220.446151.53520.1270360.063518
M60.1634304411205550.4465010.3660.7149070.357454
M71.056867938878650.4449762.37510.0189190.00946
M81.002519231752770.4461342.24710.0262190.01311
M90.519877704812970.4557591.14070.2559770.127988
M100.8832857105278610.4541581.94490.0538220.026911
M110.4222831791175210.4536690.93080.3535730.176786
t-0.003306283757248430.00206-1.60470.1108360.055418


Multiple Linear Regression - Regression Statistics
Multiple R0.37294609650926
R-squared0.139088790901494
Adjusted R-squared0.0579884596096057
F-TEST (value)1.7150212420329
F-TEST (DF numerator)13
F-TEST (DF denominator)138
p-value0.0640730433665606
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.11110924197453
Sum Squared Residuals170.369797168967


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
122.77651396898342-0.776513968983421
243.779159933248620.220840066751383
343.114506021486610.885493978513386
422.9000603780187-0.900060378018698
543.337038824986830.662961175013173
632.919328464058650.080671535941352
743.80945967805950.190540321940502
853.858878241673611.14112175832639
943.158783321982080.841216678017919
1053.73303215293421.2669678470658
1123.26872333776661-1.26872333776661
1242.73606032039461.2639396796054
1342.843912118393681.15608788160632
1443.525337419167160.474662580832837
1543.074830616399630.925169383600367
1622.64623786393724-0.646237863937244
1733.29736341989985-0.297363419899845
1822.66550594997719-0.665505949977194
1953.662710718475281.33728928152472
2053.819202836586631.18079716341337
2123.33325502588957-1.33325502588957
2243.479209638852740.520790361147258
2333.22904793267963-0.229047932679628
2422.58931136081039-0.589311360810385
2532.80423671330670.1957632866933
2633.37858845958294-0.378588459582945
2713.03515521131265-2.03515521131265
2822.49948890435303-0.499488904353026
2933.3647615693101-0.364761569310101
3022.83997765388469-0.839977653884686
3153.62303531338831.3769646866117
3233.77952743149965-0.779527431499645
3343.186506066305360.813493933694645
3443.439534233765760.560465766234239
3523.18937252759265-1.18937252759265
3612.44256240122617-1.44256240122617
3732.550414199225250.449585800774754
3823.66013371798767-1.66013371798767
3943.316700469717380.68329953028262
4042.566887053763281.43311294623672
4143.432159718720360.567840281279644
4222.69322869430047-0.693228694300468
4343.690433462798550.309566537201445
4453.739852026412661.26014797358734
4523.14683066121837-1.14683066121837
4633.61400593767325-0.614005937673253
4712.82847645901396-1.82847645901396
4822.7241076596309-0.724107659630896
4932.61781234863550.382187651364499
5023.29923764940898-1.29923764940898
5142.955804401138691.04419559886131
5222.74135875767077-0.741358757670774
5343.392484313633380.607515686366625
5422.65355328921349-0.653553289213487
5523.54368450321434-1.54368450321434
5623.37895595783397-1.37895595783397
5753.000081701634161.99991829836584
5833.3601834235918-0.360183423591799
5942.788801053926971.21119894607303
6022.47028514554944-0.470285145549441
6122.47106338905128-0.471063389051283
6243.580782907813710.419217092186288
6343.130276105046180.869723894953818
6422.48753624358932-0.487536243589319
6533.35280890854639-0.352808908546394
6612.61387788412651-1.61387788412651
6743.504009098127360.495990901872644
6833.6605012162387-0.660501216238702
6923.17455340554165-1.17455340554165
7013.53465512749929-2.53465512749929
7142.856199203337231.14380079666277
7232.430609740462460.56939025953754
7342.645535092958781.35446490704122
7423.54110750272673-1.54110750272673
7523.0906006999592-1.0906006999592
7622.55493439299957-0.554934392999575
7723.31313350345941-1.31313350345941
7812.788349588034-1.788349588034
7933.67848080203485-0.678480802034848
8053.513752256654481.48624774334552
8143.134878000454670.865121999545333
8223.28083261341784-1.28083261341784
8352.816523798250252.18347620174975
8422.39093433537548-0.390934335375479
8522.60585968787179-0.605859687871794
8653.287284988645281.71271501135472
8743.050925294872220.94907470512778
8842.622332542409831.37766745759017
8933.27345809837243-0.273458098372432
9012.74867418294702-1.74867418294702
9143.638805396947870.361194603052133
9243.581150406064740.418849593935261
9333.09520259536769-0.0952025953676858
9453.134083653833621.86591634616638
9532.776848393163270.223151606836733
9622.3512589302885-0.351258930288498
9732.566184282784810.433815717215187
9853.247609583558291.75239041644171
9943.011249889785240.988750110214762
10022.58265713732285-0.582657137322849
10143.233782693285450.76621730671455
10242.494851668865561.50514833113444
10323.49205643736365-1.49205643736365
10433.54147500097776-0.541475000977758
10522.84138008128623-0.841380081286232
10643.415628912238350.584371087761652
10722.73717298807629-0.737172988076286
10852.525730634195992.47426936580401
10922.31236176870336-0.312361768703359
11043.315007732968550.68499226703145
11132.757427375703780.242572624296217
11242.32883462324141.67116537675861
11342.9799601792041.020039820796
11452.455176263778582.54482373622142
11543.345307477779430.654692522220569
11643.501799595890780.498200404109223
11753.015851785193721.98414821480628
11833.37595350715137-0.375953507151366
11932.911644691983780.0883553080162218
12032.486055229109010.513944770890991
12122.27268636361638-0.272686363616378
12233.16825877338433-0.168258773384332
12322.93189907961128-0.931899079611275
12422.18208566365718-0.182085663657177
12513.04735832861425-2.04735832861425
12632.41550085869160.5844991413084
12733.30563207269245-0.30563207269245
12823.14090352731209-1.14090352731209
12922.97617638010674-0.976176380106743
13033.33627810206439-0.336278102064385
13132.87196928689680.128030713103203
13222.44637982402203-0.446379824022028
13312.12593740403216-1.12593740403216
13443.128583368297350.871416631702649
13522.89222367452429-0.892223674524294
13622.46363092206191-0.463630922061906
13732.900609369030030.0993906309699663
13842.375825453604621.62417454639538
13943.480103776599940.519896223400058
14043.422448785716810.577551214283185
14122.93650097501976-0.936500975019761
14243.29660269697740.703397303022596
14332.725220327312580.274779672687421
14422.40670441893505-0.406704418935047
14522.40748266243689-0.407482662436889
14623.08890796321037-1.08890796321037
14712.63840116044284-1.63840116044284
14832.423955516974920.576044483025076
14943.075081072937530.924918927062474
15042.336150048517641.66384995148236
15123.22628126251849-1.22628126251849
15213.06155271713812-2.06155271713812


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.3165368686508610.6330737373017230.683463131349138
180.1943110931978770.3886221863957550.805688906802123
190.153439458268520.306878916537040.84656054173148
200.09211330293211150.1842266058642230.907886697067888
210.2459072226827940.4918144453655880.754092777317206
220.1949936178443720.3899872356887430.805006382155628
230.1676914300307680.3353828600615360.832308569969232
240.2053063334866910.4106126669733810.79469366651331
250.1437159729630480.2874319459260970.856284027036952
260.1024804230876120.2049608461752240.897519576912388
270.2614867101610520.5229734203221040.738513289838948
280.2151688198286840.4303376396573670.784831180171316
290.1599134194013690.3198268388027380.840086580598631
300.1173814692030350.234762938406070.882618530796965
310.1148255854762650.2296511709525290.885174414523735
320.1199772702427190.2399545404854380.880022729757281
330.1410104131496940.2820208262993890.858989586850305
340.1061938757354180.2123877514708360.893806124264582
350.0810366725715980.1620733451431960.918963327428402
360.08916843764767270.1783368752953450.910831562352327
370.07510986543014770.1502197308602950.924890134569852
380.07006494098553570.1401298819710710.929935059014464
390.08799757134511350.1759951426902270.912002428654887
400.1972359144643550.3944718289287110.802764085535645
410.174049230894110.3480984617882210.82595076910589
420.1391472413740660.2782944827481320.860852758625934
430.1120880558125460.2241761116250930.887911944187454
440.111231774596610.2224635491932190.88876822540339
450.1033056324602820.2066112649205640.896694367539718
460.09423508434726740.1884701686945350.905764915652733
470.09371153707980090.1874230741596020.906288462920199
480.07358638103865640.1471727620773130.926413618961344
490.05964333887908350.1192866777581670.940356661120917
500.05260803882577680.1052160776515540.947391961174223
510.0590520343325140.1181040686650280.940947965667486
520.04609497361878890.09218994723757770.953905026381211
530.03973647045977340.07947294091954680.960263529540227
540.03092221224887830.06184442449775650.969077787751122
550.05007284745847260.1001456949169450.949927152541527
560.05712272648506040.1142454529701210.94287727351494
570.1460640043404110.2921280086808210.85393599565959
580.1188597545659460.2377195091318920.881140245434054
590.2090430799294410.4180861598588810.79095692007056
600.1776528971824190.3553057943648390.822347102817581
610.148328890822450.2966577816449010.85167110917755
620.1397828306707430.2795656613414860.860217169329257
630.128966914906740.257933829813480.87103308509326
640.1066928203813610.2133856407627220.893307179618639
650.08616067872525740.1723213574505150.913839321274743
660.099912189636040.199824379272080.90008781036396
670.08294129606089480.165882592121790.917058703939105
680.07010840281424710.1402168056284940.929891597185753
690.07016946177645480.140338923552910.929830538223545
700.1651671045100320.3303342090200640.834832895489968
710.2029558796216060.4059117592432120.797044120378394
720.1913191402964550.3826382805929090.808680859703545
730.2181131567598610.4362263135197210.78188684324014
740.2548458532896740.5096917065793490.745154146710326
750.2495680126826050.4991360253652090.750431987317395
760.2297900322678320.4595800645356640.770209967732168
770.2467297187787460.4934594375574920.753270281221254
780.3901102855153430.7802205710306870.609889714484657
790.368014079976030.736028159952060.63198592002397
800.409337684046240.818675368092480.59066231595376
810.39721860108430.79443720216860.6027813989157
820.4486891758752230.8973783517504470.551310824124777
830.6053554230713650.789289153857270.394644576928635
840.5805289844498330.8389420311003340.419471015550167
850.5503294009405660.8993411981188670.449670599059434
860.6111973003330570.7776053993338860.388802699666943
870.5965519288802980.8068961422394040.403448071119702
880.6166930747207020.7666138505585960.383306925279298
890.5843827915062640.8312344169874720.415617208493736
900.889063328572540.221873342854920.11093667142746
910.8636381273299350.272723745340130.136361872670065
920.832943197277580.3341136054448390.167056802722419
930.8036059807987870.3927880384024260.196394019201213
940.871961669657190.256076660685620.12803833034281
950.8417951062431040.3164097875137920.158204893756896
960.8227918149540970.3544163700918060.177208185045903
970.7860698889776950.427860222044610.213930111022305
980.8143140010709470.3713719978581060.185685998929053
990.8084534829329420.3830930341341160.191546517067058
1000.8402673784292630.3194652431414740.159732621570737
1010.8103434044316520.3793131911366950.189656595568348
1020.8243571253506820.3512857492986370.175642874649318
1030.9069749524171280.1860500951657440.093025047582872
1040.9145674249734270.1708651500531450.0854325750265727
1050.9079636776441160.1840726447117680.0920363223558838
1060.8843364216347710.2313271567304570.115663578365229
1070.8824289842785360.2351420314429270.117571015721464
1080.9415628732935540.1168742534128920.058437126706446
1090.9241921797268780.1516156405462430.0758078202731217
1100.9012867781302560.1974264437394880.0987132218697442
1110.896173419435160.2076531611296810.103826580564841
1120.9161638035769350.1676723928461310.0838361964230654
1130.9189304438433560.1621391123132880.081069556156644
1140.9323694797127350.1352610405745290.0676305202872646
1150.9231072794506280.1537854410987440.076892720549372
1160.8969801997743870.2060396004512270.103019800225613
1170.983069900780790.03386019843842090.0169300992192105
1180.9760117278204920.04797654435901620.0239882721795081
1190.9639479478355970.07210410432880520.0360520521644026
1200.957998747588990.0840025048220210.0420012524110105
1210.9473882286086160.1052235427827680.0526117713913838
1220.9220643129771040.1558713740457920.0779356870228959
1230.8926982049264310.2146035901471380.107301795073569
1240.8918495273971420.2163009452057160.108150472602858
1250.9852092579441970.0295814841116060.014790742055803
1260.9892402633192420.02151947336151690.0107597366807584
1270.9803852281199050.03922954376019020.0196147718800951
1280.9661568341274460.0676863317451080.033843165872554
1290.9413523840415160.1172952319169680.0586476159584841
1300.941458607786730.1170827844265420.058541392213271
1310.9269670623125950.146065875374810.0730329376874052
1320.8762021326581590.2475957346836820.123797867341841
1330.81239134513430.3752173097313990.187608654865699
1340.9229959339661040.1540081320677910.0770040660338956
1350.8720453464701060.2559093070597890.127954653529894


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level50.0420168067226891OK
10% type I error level110.092436974789916OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/104sp11293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/104sp11293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/1f9sp1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/1f9sp1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/2f9sp1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/2f9sp1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/3pirs1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/3pirs1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/4pirs1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/4pirs1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/5pirs1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/5pirs1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/6ia9v1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/6ia9v1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/7t1qy1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/7t1qy1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/8t1qy1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/8t1qy1293216184.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/9t1qy1293216184.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129321610683d2ts7nk3a8qyg/9t1qy1293216184.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly 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