Home » date » 2010 » Nov » 23 »

w7 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: Tue, 23 Nov 2010 21:23:49 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi.htm/, Retrieved Tue, 23 Nov 2010 22:23:03 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi.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 «
24 14 11 12 24 26 1 25 11 7 8 25 23 1 17 6 17 8 30 25 1 18 12 10 8 19 23 2 18 8 12 9 22 19 2 16 10 12 7 22 29 3 20 10 11 4 25 25 4 16 11 11 11 23 21 5 18 16 12 7 17 22 5 17 11 13 7 21 25 6 23 13 14 12 19 24 6 30 12 16 10 19 18 7 23 8 11 10 15 22 7 18 12 10 8 16 15 7 15 11 11 8 23 22 8 12 4 15 4 27 28 9 21 9 9 9 22 20 9 15 8 11 8 14 12 10 20 8 17 7 22 24 10 31 14 17 11 23 20 11 27 15 11 9 23 21 12 34 16 18 11 21 20 13 21 9 14 13 19 21 13 31 14 10 8 18 23 13 19 11 11 8 20 28 13 16 8 15 9 23 24 13 20 9 15 6 25 24 13 21 9 13 9 19 24 13 22 9 16 9 24 23 13 17 9 13 6 22 23 13 24 10 9 6 25 29 13 25 16 18 16 26 24 13 26 11 18 5 29 18 13 25 8 12 7 32 25 13 17 9 17 9 25 21 13 32 16 9 6 29 26 13 33 11 9 6 28 22 13 13 16 12 5 17 22 13 32 12 18 12 28 22 13 25 12 12 7 29 23 13 29 14 18 10 26 30 13 22 9 14 9 25 23 13 18 10 15 8 14 17 13 17 9 16 5 25 23 13 20 10 10 8 26 23 14 15 12 11 8 20 25 14 20 14 14 10 18 24 14 33 14 9 6 32 24 14 29 10 12 8 25 23 14 23 14 17 7 25 21 14 26 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
ConcernoverMistakes[t] = -3.51982791979792 + 0.80219509259368Doubtsaboutactions[t] + 0.237772147402074ParentalExpectations[t] + 0.199799804513788ParentalCriticism[t] + 0.570049530182517PersonalStandards[t] -0.101186974696885Organization[t] + 0.0862460960673614Date[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-3.519827919797923.401621-1.03480.3024290.151215
Doubtsaboutactions0.802195092593680.1305356.145500
ParentalExpectations0.2377721474020740.1333751.78270.0766250.038313
ParentalCriticism0.1997998045137880.1685791.18520.2377890.118894
PersonalStandards0.5700495301825170.0958715.94600
Organization-0.1011869746968850.103962-0.97330.3319490.165974
Date0.08624609606736140.0836431.03110.3041230.152061


Multiple Linear Regression - Regression Statistics
Multiple R0.641321426439313
R-squared0.411293172010155
Adjusted R-squared0.388054744589504
F-TEST (value)17.6988384181558
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value1.77635683940025e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.47678556971189
Sum Squared Residuals3046.32457365145


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.86056813043100.139431869569033
22520.57730549925934.42269450074065
31721.5919252118305-4.59192521183048
41818.7587659490315-0.758765949031489
51818.3402261673098-0.340226167309837
61618.6193930925681-2.61939309256809
72019.98336411702710.0166358829728929
81621.5350527757072-5.53505277570717
91821.4631170122305-3.46311701223051
101719.7527969893710-2.75279698937095
112321.55504625886121.44495374113882
123021.52216379629288.47783620370725
132314.43957666939018.56042333060994
141818.2893436363958-0.289343636395836
151521.093204675671-6.093204675671
161217.3890507676845-5.38905076768451
172118.93164051547192.0683594845281
181514.74053556535090.259464434649100
192019.31352119034710.686478809652938
203125.98693448900175.01306551099829
212724.94795620952582.05204379047416
223426.86148995336087.13851004663916
232119.45334928956241.54665071043756
243120.741813660777310.2581863392227
251919.2071647172790-0.207164717278953
261620.0663643229551-4.06636432295509
272021.4092590623724-1.40925906237244
282118.11281700001462.88718299998545
292221.77756806783020.222431932169756
301719.3247531517176-2.32475315171763
312420.27888639706923.72111360293076
322530.3059887280548-5.30598872805481
332626.4144858541636-0.414485854163608
342523.98270706866711.01729293133295
351722.7877636948086-5.7877636948086
363227.67581599745204.32418400254796
373323.49953890308879.50046109691133
381321.7534861717418-8.75348617174182
393227.64048214938374.35951785061625
402525.683712797888-0.68371279788799
412926.89567786760342.10432213239659
422221.87207330320860.127926696791388
431817.04881775486420.951182245135789
441721.5484183799576-4.54841837995761
452022.1796756279301-2.17967562793008
461520.3991668300307-5.39916683003065
472022.0775609807837-2.07756098078366
483328.07019444827344.92980555172664
492922.08517039255176.91482960744828
502326.4853856448168-3.48538564481679
512623.19345066318222.8065493368178
521818.9015902045311-0.901590204531086
532018.72898786815471.27101213184529
541111.6583714407624-0.658371440762435
552828.8854522053579-0.885452205357942
562623.31458429196892.68541570803107
572222.3367181200141-0.336718120014052
581720.1741084337227-3.17410843372266
591215.5606877917405-3.56068779174054
601420.8579280898601-6.85792808986007
611720.7965977209629-3.7965977209629
622121.3383525221142-0.338352522114174
631922.9755667604299-3.97556676042985
641823.1554764764262-5.1554764764262
651017.9139477465805-7.91394774658054
662924.37288408368214.62711591631793
673118.517918590785212.4820814092148
681922.9494665531863-3.94946655318628
69920.0801867320795-11.0801867320795
702022.5334654844169-2.53346548441691
712817.618165822702210.3818341772978
721918.17590702857530.824092971424678
733023.11887577901986.88112422098022
742927.06832518917631.93167481082375
752621.48056427981034.51943572018973
762319.60978888316763.39021111683237
771322.8220434233118-9.82204342331182
782122.7260613039473-1.7260613039473
791921.6392875665233-2.63928756652331
802822.99921719035155.0007828096485
812325.6990668127033-2.69906681270327
821813.94715290135894.05284709864114
832120.78071471087770.219285289122339
842021.9027736234381-1.90277362343807
852320.17715596809622.82284403190378
862120.94595793283250.0540420671674767
872121.975599675296-0.975599675295992
881523.0921517003760-8.09215170037595
892827.33947231769410.660527682305897
901917.78608658417371.21391341582635
912621.36665012977574.63334987022435
921013.4607608633575-3.46076086335755
931617.2729916761398-1.27299167613976
942221.25103784747560.748962152524445
951919.018595030268-0.0185950302680159
963128.96984301261462.03015698738542
973125.349851265515.65014873449002
982924.89850188966614.10149811033386
991917.64018711782991.35981288217015
1002219.08232811173322.91767188826684
1012322.60534571708370.394654282916301
1021516.4060466583112-1.40604665831122
1032021.5500254970352-1.55002549703520
1041819.7596694968344-1.75966949683442
1052322.34339310972750.656606890272511
1062521.05086314236743.9491368576326
1072116.76719562921964.23280437078044
1082419.65453005713714.34546994286288
1092525.4438763617897-0.44387636178969
1101719.7412141857369-2.74121418573691
1111314.7601678538999-1.76016785389988
1122818.48451871332289.51548128667724
1132120.44535895687710.554641043122917
1142528.3572189470004-3.35721894700041
115921.1498833511096-12.1498833511096
1161618.0827522300676-2.08275223006756
1171921.3209179157288-2.32091791572878
1181719.673934066056-2.67393406605600
1192524.74071582867150.259284171328542
1202015.65333744653014.34666255346995
1212921.91552641922877.08447358077128
1221419.1804626463191-5.18046264631912
1232227.1186267543289-5.11862675432893
1241515.9469104978874-0.946910497887429
1251925.678546178147-6.678546178147
1262022.2272585817625-2.22725858176251
1271517.8259316095974-2.82593160959743
1282022.2072133638070-2.20721336380696
1291820.6079859273857-2.60798592738574
1303325.85508467664997.14491532335009
1312224.0916528697276-2.09165286972755
1321616.7861339580460-0.78613395804597
1331719.4333742348957-2.43337423489572
1341615.40914831616220.590851683837825
1352117.38595510124593.61404489875412
1362627.8959994437931-1.89599944379313
1371821.4066502846375-3.40665028463755
1381823.2900346362305-5.29003463623053
1391718.730425396788-1.730425396788
1402225.0213323802660-3.02133238026604
1413024.98224831747775.01775168252226
1423027.61509220473662.38490779526337
1432430.0112772165830-6.01127721658304
1442122.3577310898782-1.35773108987824
1452125.6723342155531-4.67233421555315
1462927.73111175768911.26888824231090
1473123.50761422060657.49238577939346
1482019.29999663173960.700003368260428
1491614.37513237903971.62486762096026
1502219.24046786471102.75953213528904
1512020.7430797570986-0.743079757098599
1522827.60942351317950.390576486820503
1533826.931821760135811.0681782398642
1542219.56915610270942.43084389729058
1552026.0395296572432-6.03952965724324
1561718.4207011830354-1.42070118303538
1572824.90241868704913.09758131295087
1582224.5994327781874-2.59943277818742
1593126.59427786720804.40572213279196


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.1048758609616370.2097517219232730.895124139038363
110.349409671690860.698819343381720.65059032830914
120.7494107713918360.5011784572163280.250589228608164
130.7436983164925610.5126033670148780.256301683507439
140.7223518726252480.5552962547495040.277648127374752
150.7086242555470020.5827514889059970.291375744452998
160.6291041215314890.7417917569370220.370895878468511
170.5630648410825660.8738703178348680.436935158917434
180.5291676208832080.9416647582335840.470832379116792
190.4706042391956740.9412084783913490.529395760804326
200.4982570927948990.9965141855897970.501742907205101
210.4303065396440200.8606130792880410.56969346035598
220.4144544985495010.8289089970990010.585545501450499
230.3735707292399940.7471414584799880.626429270760006
240.5348184443628890.9303631112742220.465181555637111
250.4859802383995430.9719604767990850.514019761600457
260.4943758304786940.9887516609573880.505624169521306
270.4266534817181090.8533069634362180.573346518281891
280.3698486683886820.7396973367773630.630151331611319
290.3076212847909430.6152425695818870.692378715209057
300.2637988691503150.527597738300630.736201130849685
310.2635620757582990.5271241515165990.7364379242417
320.3647377020503250.729475404100650.635262297949675
330.3132653140063660.6265306280127320.686734685993634
340.2862256791887570.5724513583775130.713774320811243
350.3129716647911150.6259433295822290.687028335208886
360.2834097023970350.5668194047940710.716590297602965
370.4071637162447520.8143274324895030.592836283755248
380.6788605735055250.6422788529889510.321139426494475
390.6700522718206650.659895456358670.329947728179335
400.6283062084793150.743387583041370.371693791520685
410.5979463096533460.8041073806933090.402053690346654
420.5451874151302070.9096251697395850.454812584869793
430.492347039892260.984694079784520.50765296010774
440.4758569248682570.9517138497365130.524143075131743
450.4658832706319370.9317665412638730.534116729368063
460.5193118106003840.961376378799230.480688189399615
470.4851170838783770.9702341677567540.514882916121623
480.4696390106785570.9392780213571140.530360989321443
490.5190768824552180.9618462350895630.480923117544782
500.4941312128310060.9882624256620120.505868787168994
510.4619361669223200.9238723338446410.53806383307768
520.415933503681670.831867007363340.58406649631833
530.3715799135297040.7431598270594080.628420086470296
540.3353614704640770.6707229409281540.664638529535923
550.2995203451300290.5990406902600580.700479654869971
560.2713277813461320.5426555626922640.728672218653868
570.233348978802750.46669795760550.76665102119725
580.2129634185890050.4259268371780110.787036581410995
590.2024088143647880.4048176287295760.797591185635212
600.2674667724100460.5349335448200930.732533227589954
610.2633230599696050.526646119939210.736676940030395
620.2257780137545290.4515560275090570.774221986245471
630.2154184926585940.4308369853171890.784581507341406
640.2594215455797770.5188430911595550.740578454420223
650.343387436871070.686774873742140.65661256312893
660.3413577551060340.6827155102120680.658642244893966
670.6558265301523350.688346939695330.344173469847665
680.652575937447010.694848125105980.34742406255299
690.8439417666362640.3121164667274720.156058233363736
700.827561403504720.3448771929905610.172438596495281
710.9250237396411740.1499525207176510.0749762603588256
720.9073265199819290.1853469600361420.0926734800180708
730.93008456823940.1398308635212000.0699154317606001
740.9167000533366460.1665998933267080.0832999466633541
750.9186805877026930.1626388245946130.0813194122973067
760.9116635569074440.1766728861851130.0883364430925563
770.9650655235275980.06986895294480460.0349344764724023
780.9568096882002340.08638062359953170.0431903117997659
790.9490956865921990.1018086268156020.0509043134078010
800.951188638314220.09762272337155990.0488113616857799
810.9429277707923970.1141444584152060.0570722292076029
820.9413494072356240.1173011855287530.0586505927643763
830.9262677980242470.1474644039515060.073732201975753
840.9122271579811990.1755456840376030.0877728420188013
850.9011005636872480.1977988726255040.0988994363127519
860.882359458315410.2352810833691800.117640541684590
870.8591125221682170.2817749556635670.140887477831783
880.9124396216154380.1751207567691250.0875603783845623
890.8949061919235140.2101876161529710.105093808076486
900.8725306842898750.2549386314202500.127469315710125
910.8718413760307710.2563172479384580.128158623969229
920.8624833176264550.275033364747090.137516682373545
930.839491096501250.3210178069974990.160508903498749
940.8096927610676820.3806144778646360.190307238932318
950.7752189552353170.4495620895293650.224781044764683
960.7429085640697560.5141828718604890.257091435930244
970.7623192648092980.4753614703814050.237680735190702
980.7633188149520380.4733623700959250.236681185047962
990.7264185102960560.5471629794078880.273581489703944
1000.7016522334897890.5966955330204220.298347766510211
1010.6605856458297660.6788287083404680.339414354170234
1020.6209118342062960.7581763315874070.379088165793704
1030.5802720963936370.8394558072127250.419727903606363
1040.5375536181327430.9248927637345130.462446381867257
1050.4943399698787990.9886799397575980.505660030121201
1060.4752007652037590.9504015304075180.524799234796241
1070.4732703759130970.9465407518261940.526729624086903
1080.4953968296014170.9907936592028340.504603170398583
1090.4505338818898660.9010677637797320.549466118110134
1100.4166742772590480.8333485545180950.583325722740952
1110.3733414161357890.7466828322715780.626658583864211
1120.6740007325384920.6519985349230160.325999267461508
1130.6918987959458810.6162024081082370.308101204054119
1140.6662495684112890.6675008631774220.333750431588711
1150.8382797214882510.3234405570234970.161720278511749
1160.8090878120228280.3818243759543440.190912187977172
1170.787147917977430.4257041640451410.212852082022570
1180.7552936973779460.4894126052441080.244706302622054
1190.7203689273278970.5592621453442070.279631072672103
1200.7533706610051520.4932586779896960.246629338994848
1210.8128792441760.3742415116480010.187120755824000
1220.795188620172210.4096227596555790.204811379827789
1230.7784721819534620.4430556360930770.221527818046538
1240.732505095004670.534989809990660.26749490499533
1250.7360545151279710.5278909697440580.263945484872029
1260.7019748568579410.5960502862841180.298025143142059
1270.695455398824990.609089202350020.30454460117501
1280.658745215959970.6825095680800610.341254784040031
1290.6252264899421380.7495470201157230.374773510057861
1300.7013014938245720.5973970123508550.298698506175428
1310.6454435796065050.709112840786990.354556420393495
1320.580195352007140.839609295985720.41980464799286
1330.5776986339438080.8446027321123850.422301366056192
1340.5149284302297530.9701431395404940.485071569770247
1350.4894829725732360.9789659451464720.510517027426764
1360.4502680634866990.9005361269733990.549731936513301
1370.4397529642263140.8795059284526270.560247035773686
1380.4801921101796670.9603842203593340.519807889820333
1390.4075583788353990.8151167576707980.592441621164601
1400.3334088985031800.6668177970063590.66659110149682
1410.4342477901219720.8684955802439440.565752209878028
1420.3784657868545920.7569315737091850.621534213145408
1430.3042791930412910.6085583860825820.695720806958709
1440.2284412875014210.4568825750028410.771558712498579
1450.2804385956586070.5608771913172140.719561404341393
1460.1942023049245820.3884046098491650.805797695075418
1470.2409472446658440.4818944893316870.759052755334156
1480.1491469663898500.2982939327796990.85085303361015
1490.07972754567026170.1594550913405230.920272454329738


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level30.0214285714285714OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/10a6ue1290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/10a6ue1290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/1m5fk1290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/1m5fk1290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/2m5fk1290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/2m5fk1290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/3m5fk1290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/3m5fk1290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/4eee51290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/4eee51290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/5eee51290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/5eee51290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/6eee51290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/6eee51290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/775e81290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/775e81290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/8hedt1290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/8hedt1290547414.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/9hedt1290547414.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547372h0pogn2g3jq1gxi/9hedt1290547414.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