Home » date » 2010 » Dec » 21 »

PAPER BAEYENS (Multiple Linear Regression2)

*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, 21 Dec 2010 12:37:56 +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/21/t1292935255bwz6pye1fjz9ows.htm/, Retrieved Tue, 21 Dec 2010 13:40:55 +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/21/t1292935255bwz6pye1fjz9ows.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 «
13 14 5 12 18 3 15 11 0 12 12 7 10 16 4 12 18 1 15 14 6 9 14 3 12 15 12 11 15 0 11 17 5 11 19 6 15 10 6 7 16 6 11 18 2 11 14 1 10 14 5 14 17 7 10 14 3 6 16 3 11 18 3 15 11 7 11 14 8 12 12 6 14 17 3 15 9 5 9 16 5 13 14 10 13 15 2 16 11 6 13 16 4 12 13 6 14 17 8 11 15 4 9 14 5 16 16 10 12 9 6 10 15 7 13 17 4 16 13 10 14 15 4 15 16 3 5 16 3 8 12 3 11 12 3 16 11 7 17 15 15 9 15 0 9 17 0 13 13 4 10 16 5 6 14 5 12 11 2 8 12 3 14 12 0 12 15 9 11 16 2 16 15 7 8 12 7 15 12 0 7 8 0 16 13 10 14 11 2 16 14 1 9 15 8 14 10 6 11 11 11 13 12 3 15 15 8 5 15 6 15 14 9 13 16 9 11 15 8 11 15 8 12 13 7 12 12 6 12 17 5 12 13 4 14 15 6 6 13 3 7 15 2 14 16 12 14 15 8 10 16 5 13 15 9 12 14 6 9 15 5 12 14 2 16 13 4 10 7 7 14 17 5 10 13 6 16 15 7 15 14 8 12 13 6 10 16 0 8 12 1 8 14 5 11 17 5 13 15 5 16 17 7 16 12 7 14 16 1 11 11 3 4 15 4 14 9 8 9 16 6 14 15 6 8 10 2 8 10 2 11 15 3 12 11 3 11 13 0 14 14 2 15 18 8 16 16 8 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 time33 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
HS[t] = + 15.3521568601490 -0.0793757965371474IEP[t] + 0.00940023589763553WP[t] -0.00515599648553805t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)15.35215686014900.84111118.252200
IEP-0.07937579653714740.06701-1.18450.2380480.119024
WP0.009400235897635530.0630340.14910.8816490.440824
t-0.005155996485538050.004168-1.23710.2179450.108973


Multiple Linear Regression - Regression Statistics
Multiple R0.144154143804449
R-squared0.0207804171759936
Adjusted R-squared0.00145371488341473
F-TEST (value)1.07521794775991
F-TEST (DF numerator)3
F-TEST (DF denominator)152
p-value0.361465610277966
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.33699119495458
Sum Squared Residuals830.152232484875


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11414.3621166881687-0.362116688168747
21814.41753601642513.58246398357491
31114.1460519226352-3.1460519226352
41214.4448249670446-2.44482496704455
51614.57021985594041.42978014405960
61814.37811155868773.62188844131234
71414.1818293520789-0.181829352078861
81414.6247274271233-0.624727427123301
91514.46604616410500.53395383589496
101514.42746313338500.572536866614977
111714.46930831638772.53069168361234
121914.47355255579984.52644744420024
131014.1508933731656-4.15089337316563
141614.78074374897731.21925625102273
151814.42048362275263.57951637724740
161414.4059273903694-0.405927390369430
171414.5177481340116-0.517748134011582
181714.21388942317272.78611057682727
191414.4886356692452-0.488635669245235
201614.80098285890831.19901714109171
211814.3989478797373.60105212026299
221114.1138896406934-3.11388964069343
231414.4356370662541-0.435637066254113
241214.3323048014362-2.33230480143616
251714.14019650418342.85980349581658
26914.074465182956-5.074465182956
271614.54556396569331.45443603430665
281414.2699059625474-0.269905962547399
291514.18954807888080.810451921119223
301113.9838656363743-2.98386563637434
311614.19803655770501.80196344229503
321314.2910568295519-1.29105682955185
331714.14594971178732.85405028821271
341514.34132016132270.658679838677348
351414.5043159938090-0.504315993809045
361613.99053060105172.00946939894835
37914.2652768471242-5.26527684712416
381514.42827267961060.571727320389446
391714.15678858582072.84321141417933
401313.9699066151095-0.9699066151095
411514.06710079631240.932899203687556
421613.97316876739212.02683123260788
431614.76177073627811.23822926372194
441214.5184873501811-2.51848735018108
451214.2752039640841-2.2752039640841
461113.9107699285034-2.91076992850336
471513.90144002266181.09855997733824
481514.39028686000890.609713139991128
491714.38513086352332.61486913647667
501314.1000726244797-1.10007262447975
511614.34244425350331.65755574649671
521414.6547914431663-0.65479144316634
531114.145179959765-3.14517995976501
541214.4669273853257-2.4669273853257
551213.9573159019244-1.95731590192437
561514.19551362159180.804486378408154
571614.203931770361.79606822963999
581513.84889797067691.15110202932309
591214.4787483464885-2.47874834648855
601213.8521601229595-1.85216012295953
61814.4820104987712-6.48201049877117
621313.8564746924277-0.856474692427663
631113.9348684018353-2.93486840183534
641413.76156057637790.238439423622133
651514.37783680693580.62216319306419
661013.9570013559693-3.95700135596926
671114.2369739285833-3.23697392858335
681213.9978644518424-1.99786445184243
691513.88095804177081.11904195822923
701514.65075953886140.349240461138562
711413.88004628469730.119953715302668
721614.03364188128611.96635811871391
731514.17783724197720.82216275802279
741514.17268124549170.827318754508328
751314.0787492165714-1.07874921657135
761214.0641929841882-2.06419298418818
771714.0496367518052.95036324819500
781314.0350805194218-1.03508051942183
791513.88997340165731.11002659834273
801314.491623069776-1.49162306977600
811514.39769104085570.602308959144317
821613.93090682758652.06909317241353
831513.88814988751041.11185011248961
841614.17229636948051.82770363051947
851513.96661392697411.03338607302591
861414.0126330193328-0.0126330193327973
871514.23620417656110.763795823438934
881413.96472008277120.0352799172288209
891313.6608613719323-0.660861371932323
90714.1601608623626-7.16016086236258
911713.81870120793323.18129879206682
921314.1404486334939-1.14044863349386
931513.66843809368311.33156190631692
941413.75205812963230.247941870367678
951313.9662290509630-0.966229050962955
961614.06342323216591.9365767678341
971214.2264190646523-2.22641906465229
981414.2588640117573-0.258864011757295
991714.01558062566032.98441937433969
1001513.85167303610051.14832696389952
1011713.62719012179883.37280987820123
1021213.6220341253132-1.62203412531323
1031613.71922830651622.28077169348382
1041113.9710001714374-2.97100017143735
1051514.53087498660950.469125013390517
106913.769561968343-4.76956196834301
1071614.14248448274791.85751551725206
1081513.74044950357671.25955049642333
1091014.1739473427235-4.17394734272347
1101014.1687913462379-4.16879134623793
1111513.93490819603861.06509180396141
1121113.8503764030159-2.8503764030159
1131313.8963954953746-0.896395495374604
1141413.67191258107290.328087418927105
1151813.64378220343604.35621779656398
1161613.55925041041332.44074958958666
1171413.47889252674670.521107473253285
1181413.91761669243510.0823833075649084
1191413.71193424992870.288065750071346
1201413.67857754575020.321422454249791
1211213.8321731423390-1.83217314233897
1221413.64006484508620.359935154913774
1231514.16756504320940.832434956790614
1241513.74672959224281.25327040775716
1251513.51284644204351.48715355795651
1261313.7499917445255-0.749991744525462
1271713.49313421317483.50686578682522
1281713.73967975155443.26032024844561
1291913.86090073109425.13909926890583
1301514.36437413088050.63562586911951
1311313.5383118785161-0.53831187851608
132913.5279295554890-4.52792955548897
1331513.89145183399631.10854816600374
1341513.70456986328511.29543013671491
1351513.50306133013471.49693866986528
1361613.71723225146542.28276774853465
1371113.5909256054961-2.59092560549606
1381414.1131994770777-0.113199477077649
1391113.1743343939416-2.17433439394161
1401513.76240991680671.23759008319335
1411313.7008525049353-0.700852504935298
1421513.61632071191261.38367928808739
1431613.42421241465992.57578758534013
1441414.0686893529107-0.0686893529107224
1451513.68962875489081.31037124510922
1461613.82442387968432.17557612031573
1471613.98741971217072.01258028782934
1481113.8893137738943-2.88931377389428
1491213.4590780870301-1.45907808703009
150913.3087446427240-4.30874464272396
1511613.59811745123572.40188254876432
1521313.3736345369340-0.373634536933968
1531613.84890722902742.15109277097262
1541213.4844731934466-1.48447319344664
155913.5357186123469-4.53571861234692
1561313.6423130294475-0.642313029447498


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.8098702671675010.3802594656649980.190129732832499
80.8489847844262460.3020304311475070.151015215573754
90.7802105271637850.439578945672430.219789472836215
100.6806847636657770.6386304726684460.319315236334223
110.6240858730830390.7518282538339220.375914126916961
120.6675689937330820.6648620125338360.332431006266918
130.760546758160440.4789064836791190.239453241839560
140.7412304547279010.5175390905441970.258769545272099
150.743940633878290.5121187322434210.256059366121711
160.7081684237899660.5836631524200670.291831576210034
170.666960425977530.666079148044940.33303957402247
180.7258969765399650.5482060469200690.274103023460035
190.6972803065996090.6054393868007810.302719693400391
200.6476550084068180.7046899831863630.352344991593182
210.674082754658480.651834490683040.32591724534152
220.6911699207806160.6176601584387680.308830079219384
230.6335665128146240.7328669743707520.366433487185376
240.6200770257045880.7598459485908250.379922974295412
250.680511315957470.6389773680850590.319488684042530
260.782043626762870.435912746474260.21795637323713
270.740783673537380.5184326529252410.259216326462620
280.6940472727332280.6119054545335440.305952727266772
290.6507066962578690.6985866074842620.349293303742131
300.6172995774028280.7654008451943440.382700422597172
310.6119145275638880.7761709448722240.388085472436112
320.5655261407980740.8689477184038530.434473859201926
330.6547517805718090.6904964388563830.345248219428191
340.6027440466974840.7945119066050320.397255953302516
350.5711567077823380.8576865844353250.428843292217662
360.6173769016300720.7652461967398550.382623098369928
370.7939239445144430.4121521109711140.206076055485557
380.755134806364260.489730387271480.24486519363574
390.7864952515238640.4270094969522720.213504748476136
400.7467419731847720.5065160536304560.253258026815228
410.7145495738256460.5709008523487070.285450426174354
420.7116712581196670.5766574837606650.288328741880333
430.6812944076606930.6374111846786150.318705592339307
440.7170583915896080.5658832168207840.282941608410392
450.7120263770391140.5759472459217720.287973622960886
460.7024353302879320.5951293394241360.297564669712068
470.6969071906011760.6061856187976490.303092809398824
480.6565916561102960.6868166877794090.343408343889704
490.669960591035480.6600788179290390.330039408964520
500.6278841635748860.7442316728502290.372115836425114
510.6082699488119340.7834601023761320.391730051188066
520.5740625600755130.8518748798489740.425937439924487
530.5921264992859490.8157470014281020.407873500714051
540.5899904827686190.8200190344627620.410009517231381
550.5535510776906210.8928978446187580.446448922309379
560.5213867146013910.9572265707972180.478613285398609
570.5210439987805780.9579120024388440.478956001219422
580.506626874724270.9867462505514590.493373125275729
590.503004135060350.99399172987930.49699586493965
600.465662036433330.931324072866660.53433796356667
610.7171987496504650.5656025006990690.282801250349535
620.6777171119729530.6445657760540930.322282888027047
630.6748458279602640.6503083440794720.325154172039736
640.6469583989343460.7060832021313070.353041601065654
650.613635638178570.772728723642860.38636436182143
660.6620696860765390.6758606278469230.337930313923461
670.6767843716322550.646431256735490.323215628367745
680.6566535492585580.6866929014828830.343346450741442
690.6460011803195130.7079976393609730.353998819680486
700.6082632953016620.7834734093966760.391736704698338
710.5733569489533580.8532861020932830.426643051046642
720.5810302830152150.837939433969570.418969716984785
730.5496509755864520.9006980488270970.450349024413548
740.5170699150215910.9658601699568180.482930084978409
750.4768532934601080.9537065869202170.523146706539892
760.4579159292058630.9158318584117260.542084070794137
770.509620122709360.980759754581280.49037987729064
780.4707833654069480.9415667308138950.529216634593052
790.4456977079024840.8913954158049680.554302292097516
800.4128271973542050.825654394708410.587172802645795
810.3759180196335260.7518360392670510.624081980366475
820.3748889180623110.7497778361246220.625111081937689
830.3473219999307010.6946439998614020.652678000069299
840.3387198605809340.6774397211618680.661280139419066
850.3094709837913570.6189419675827130.690529016208643
860.2701698336831830.5403396673663670.729830166316817
870.2398058079250570.4796116158501140.760194192074943
880.2066423986097940.4132847972195880.793357601390206
890.1774381941811930.3548763883623860.822561805818807
900.4956138241114250.991227648222850.504386175888575
910.5422185692244570.9155628615510870.457781430775543
920.5053375934925010.9893248130149970.494662406507499
930.4762470412972180.9524940825944360.523752958702782
940.4306843426371120.8613686852742240.569315657362888
950.3921570878013420.7843141756026840.607842912198658
960.3803924404306620.7607848808613230.619607559569338
970.3769222529770920.7538445059541850.623077747022908
980.3342961699066000.6685923398131990.6657038300934
990.3598085079118190.7196170158236380.640191492088181
1000.3265231673840910.6530463347681810.673476832615909
1010.3790102812743030.7580205625486060.620989718725697
1020.3498137826933220.6996275653866450.650186217306678
1030.3486901952417210.6973803904834420.651309804758279
1040.3718693801293390.7437387602586780.628130619870661
1050.3276789902482800.6553579804965590.67232100975172
1060.4763649348474240.9527298696948480.523635065152576
1070.4520038019762780.9040076039525560.547996198023722
1080.4143201788494670.8286403576989330.585679821150533
1090.548199581999910.903600836000180.45180041800009
1100.7277552708661750.5444894582676490.272244729133825
1110.6892820830025830.6214358339948340.310717916997417
1120.7716954156892170.4566091686215670.228304584310783
1130.7852699364070760.4294601271858480.214730063592924
1140.7590613653674450.4818772692651090.240938634632555
1150.827558830443050.3448823391138990.172441169556950
1160.8247509819070690.3504980361858630.175249018092931
1170.7904300612198740.4191398775602520.209569938780126
1180.760781883188870.478436233622260.23921811681113
1190.7149275452511370.5701449094977260.285072454748863
1200.6671772443487930.6656455113024140.332822755651207
1210.7023966744939540.5952066510120920.297603325506046
1220.6628653979379240.6742692041241530.337134602062077
1230.6195889680535650.7608220638928710.380411031946435
1240.5651381174536990.8697237650926020.434861882546301
1250.5173034967397450.965393006520510.482696503260255
1260.5408060796568590.9183878406862810.459193920343141
1270.595834489669640.8083310206607190.404165510330359
1280.5775232746694840.8449534506610320.422476725330516
1290.7453736061814150.5092527876371690.254626393818584
1300.7524787155821010.4950425688357980.247521284417899
1310.7341234483672030.5317531032655950.265876551632797
1320.8789654869141180.2420690261717640.121034513085882
1330.8499186557631590.3001626884736830.150081344236841
1340.8212471485021870.3575057029956250.178752851497812
1350.7928429412166010.4143141175667970.207157058783398
1360.7570639456397030.4858721087205930.242936054360297
1370.7580924511648350.4838150976703290.241907548835165
1380.7989163168598070.4021673662803850.201083683140193
1390.7519091587963950.496181682407210.248090841203605
1400.7029485374928220.5941029250143550.297051462507177
1410.6969789738139180.6060420523721630.303021026186082
1420.610264885339570.779470229320860.38973511466043
1430.5706458037843140.8587083924313720.429354196215686
1440.4803217389532810.9606434779065610.519678261046719
1450.3919386995621390.7838773991242790.60806130043786
1460.3080751304235950.616150260847190.691924869576405
1470.2179238972513580.4358477945027160.782076102748642
1480.4410935700261510.8821871400523030.558906429973849
1490.3748516150988790.7497032301977580.625148384901121


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 level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/10wc8g1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/10wc8g1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/1ptt41292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/1ptt41292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/2ikap1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/2ikap1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/3ikap1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/3ikap1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/4ikap1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/4ikap1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/5bcrs1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/5bcrs1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/6bcrs1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/6bcrs1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/7l39v1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/7l39v1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/8l39v1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/8l39v1292935039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/9wc8g1292935039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292935255bwz6pye1fjz9ows/9wc8g1292935039.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by