Home » date » 2010 » Nov » 30 »

ws4q1

*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, 30 Nov 2010 13:13:58 +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/30/t1291122841cxhfjmqtndlra2i.htm/, Retrieved Tue, 30 Nov 2010 14:14:24 +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/30/t1291122841cxhfjmqtndlra2i.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 13 3 25 55 147 12 8 13 5 158 7 71 10 12 16 6 0 0 0 9 7 12 6 143 10 0 10 10 11 5 67 74 43 12 7 12 3 0 0 0 13 16 18 8 148 138 8 12 11 11 4 28 0 0 12 14 14 4 114 113 34 6 6 9 4 0 0 0 5 16 14 6 123 115 103 12 11 12 6 145 9 0 11 16 11 5 113 114 73 14 12 12 4 152 59 159 14 7 13 6 0 0 0 12 13 11 4 36 114 113 12 11 12 6 0 0 0 11 15 16 6 8 102 44 11 7 9 4 108 0 0 7 9 11 4 112 86 0 9 7 13 2 51 17 41 11 14 15 7 43 45 74 11 15 10 5 120 123 0 12 7 11 4 13 24 0 12 15 13 6 55 5 0 11 17 16 6 103 123 32 11 15 15 7 127 136 126 8 14 14 5 14 4 154 9 14 14 6 135 76 129 12 8 14 4 38 99 98 10 8 8 4 11 98 82 10 14 13 7 43 67 45 12 14 15 7 141 92 8 8 8 13 4 62 13 0 12 11 11 4 62 24 129 11 16 15 6 135 129 31 12 10 15 6 117 117 117 7 8 9 5 82 11 99 11 14 13 6 145 20 55 11 16 16 7 87 91 132 12 13 13 6 76 111 58 9 5 11 3 124 0 0 15 8 12 3 151 58 0 11 10 12 4 131 0 0 11 8 12 6 127 146 101 11 13 14 7 76 129 31 11 15 14 5 25 48 147 15 6 8 4 0 0 0 11 12 13 5 58 111 132 12 16 16 6 115 32 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Liked[t] = + 6.43355012221171 + 0.193380953793444FindingFriends[t] -0.0464345383611361KnowingPeople[t] -0.0364209175232498Celebrity[t] + 0.00735267314025024firstbestfriend[t] -0.00158359380850347secondbestfriend[t] + 0.0410246866096088thirdbestfriend[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.433550122211711.2905034.98532e-061e-06
FindingFriends0.1933809537934440.085542.26070.0252260.012613
KnowingPeople-0.04643453836113610.094326-0.49230.6232490.311625
Celebrity-0.03642091752324980.005816-6.262500
firstbestfriend0.007352673140250240.0048761.5080.1336760.066838
secondbestfriend-0.001583593808503470.004979-0.31810.7508910.375446
thirdbestfriend0.04102468660960880.0062746.538600


Multiple Linear Regression - Regression Statistics
Multiple R0.692252665096913
R-squared0.479213752333779
Adjusted R-squared0.458242494038495
F-TEST (value)22.8509775420363
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.98677930956923
Sum Squared Residuals1329.20674596655


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11314.3155043325520-1.31550433255197
21312.26393062200990.736069377990063
3167.591619694673048.40838030532696
4128.6660077536563.333992246344
5119.860414371699241.13958562830077
6128.319817046635353.68018295336465
7189.111039739622758.88896026037725
8118.303532823594552.69646717640544
91410.01245234293853.98754765706153
1097.169544944712571.83045505528743
111411.38678500132382.61321499867616
12129.07670140168082.92329859831920
131111.2808079057255-0.280807905725493
141215.9850847984374-3.98508479843742
15138.597316201652494.40268379834751
161112.7247450247107-1.72474502471068
17128.024816140621053.97518385937895
18169.34807806086056.65192193913951
1998.884103874465680.115896125534322
20117.910932607599333.08906739240067
21139.806172489180433.19382751081957
221510.93644068698014.0635593130199
23108.369656689290411.63034331070959
24118.340974628531272.65902537146873
25138.235557040847754.76444295915225
26169.428161223168116.57183877683189
271513.49680735952581.50319264047418
281413.56281441449640.437185585503645
291413.46981198128440.530188018715643
301412.38000667078031.61999332921972
31811.1399111964614-3.1399111964614
32139.518504757720923.48149524227908
33159.068325383284225.93167461671578
34137.898716790762155.10128320923785
351113.8077020315985-2.80770203159851
36159.659355052556635.34064494744337
371513.54612129412081.45387870587922
38911.8805795442187-2.88057954421874
391310.98295506443892.01704493556111
401613.47367573659502.52632426340501
411310.69440313317122.30559686682878
42118.744274731368322.25572526863168
43129.871930572939122.12806942706087
44128.913911741608023.08608825839198
451212.8168169422518-0.816816942251775
46149.328430034842034.67156996515797
471413.82055120821690.179448791783113
4888.90997352885356-0.909973528853565
491313.4873563278487-0.487356327848704
501613.63356231105392.36643768894609
511310.68187115024282.31812884975725
521112.8825246638535-1.88252466385354
531414.4653255201928-0.465325520192839
54138.183916937782264.81608306221774
55138.161748935215474.83825106478453
561313.2494694760819-0.249469476081869
571212.9529266975861-0.952926697586074
581614.46703441394701.53296558605302
59159.015418691054065.98458130894594
6087.369992737759020.630007262240984
6137.91567953154094-4.91567953154094
6268.35781748343513-2.35781748343513
6368.28775936850893-2.28775936850893
6467.45583656471599-1.45583656471599
6558.08344700919629-3.08344700919629
6655.511976948737-0.511976948736998
6768.89147364422693-2.89147364422693
6854.845046093410770.154953906589231
6964.810019094673351.18998090532665
7023.83470360018407-1.83470360018407
7158.38872147939064-3.38872147939064
7258.14696316584733-3.14696316584733
7353.756955380406311.24304461959369
7468.64614466766673-2.64614466766673
7567.14385127058835-1.14385127058835
7665.340555255552050.659444744447947
7758.62854438999498-3.62854438999498
7859.16797337694351-4.16797337694351
7942.29001835849571.7099816415043
8025.42651802844346-3.42651802844346
8145.09819485093413-1.09819485093413
8265.11483240581860.885167594181396
8365.028328691042150.97167130895785
8455.93431490424386-0.934314904243865
8536.17690695434677-3.17690695434677
8664.257161517382181.74283848261782
8745.32903865947798-1.32903865947798
8854.464010640671520.535989359328476
8987.412584232884020.587415767115976
9045.79425528101841-1.79425528101841
9164.819007883643731.18099211635627
9268.42201390247452-2.42201390247452
9375.291598051297071.70840194870293
9463.804331895481422.19566810451858
9558.37733346491905-3.37733346491905
9644.26058255462206-0.260582554622060
9767.13674586461564-1.13674586461564
9836.88622964004309-3.88622964004309
9958.65463320667478-3.65463320667478
10062.967530066346733.03246993365327
10177.7689078576824-0.768907857682404
10277.01602018530557-0.0160201853055708
10368.49692186558065-2.49692186558065
10435.17090585905829-2.17090585905829
10525.20463452039079-3.20463452039079
10685.79988019707862.20011980292140
10737.71620447360656-4.71620447360656
10887.86699810108680.133001898913202
10937.87981089352825-4.87981089352825
11047.70313697133771-3.70313697133771
11155.3616431665055-0.361643166505503
11277.10401220964308-0.104012209643079
11364.567462878847061.43253712115294
11463.556734509938672.44326549006133
11575.129768421388661.87023157861134
11666.02203664825643-0.0220366482564316
11767.56181266301417-1.56181266301417
11866.43512286675337-0.435122866753366
11965.951368356555160.048631643444842
12048.8168156411907-4.8168156411907
12149.38340187752423-5.38340187752423
12259.30798102815149-4.30798102815149
12346.68280863610045-2.68280863610045
12467.91640904965717-1.91640904965717
12565.00750800262290.992491997377104
12657.43604854723178-2.43604854723178
12785.591091001153572.40890899884643
12868.819880491615-2.819880491615
12954.570556863447420.429443136552582
13047.90039393084315-3.90039393084315
13187.877106070893460.122893929106540
13268.31742118095685-2.31742118095685
13347.07896863176426-3.07896863176426
13468.35651877783786-2.35651877783786
13568.86689485117578-2.86689485117578
13646.32722140752693-2.32722140752693
13766.37121510410733-0.371215104107333
13838.88258430050816-5.88258430050816
13966.22768861828547-0.227688618285467
14058.04317230387878-3.04317230387878
14147.2791941882781-3.2791941882781
14268.68898412379803-2.68898412379803
14343.56574372022240.434256279777599
14447.02504147435917-3.02504147435917
14546.53786233632064-2.53786233632064
14663.735856090715692.26414390928431
14755.14147386535727-0.141473865357265
14865.347137916520720.65286208347928
14969.7587852777116-3.75878527771159
15086.382521404592421.61747859540758
15177.8928414732326-0.892841473232592
15278.06172628598513-1.06172628598513
15348.5878689598422-4.58786895984219
15464.65700217307581.34299782692420
15566.14188311156431-0.141883111564314
15623.45444477561568-1.45444477561568


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.2635823125255390.5271646250510780.736417687474461
110.1447141508770340.2894283017540670.855285849122966
120.1321052381692630.2642104763385260.867894761830737
130.1854107302658250.370821460531650.814589269734175
140.1190049604792860.2380099209585720.880995039520714
150.09544000992545710.1908800198509140.904559990074543
160.0703731868514870.1407463737029740.929626813148513
170.07065705195198850.1413141039039770.929342948048012
180.06176516618527470.1235303323705490.938234833814725
190.04463202917591890.08926405835183780.955367970824081
200.03074495567784910.06148991135569810.96925504432215
210.08585334361592630.1717066872318530.914146656384074
220.06259783393171050.1251956678634210.93740216606829
230.09053794255994480.1810758851198900.909462057440055
240.06873344877651560.1374668975530310.931266551223484
250.06077546973823170.1215509394764630.939224530261768
260.07475268431793430.1495053686358690.925247315682066
270.05216338954776670.1043267790955330.947836610452233
280.03556641170911350.0711328234182270.964433588290887
290.02351924647556220.04703849295112440.976480753524438
300.01970578333922920.03941156667845850.98029421666077
310.04725261940204650.0945052388040930.952747380597954
320.04664213203902000.09328426407804010.95335786796098
330.05510010993100590.1102002198620120.944899890068994
340.08465452156922220.1693090431384440.915345478430778
350.07565826912487180.1513165382497440.924341730875128
360.09678235970756020.1935647194151200.90321764029244
370.08635362532555320.1727072506511060.913646374674447
380.1015346097705830.2030692195411670.898465390229417
390.09092145077929020.1818429015585800.90907854922071
400.07755396169795050.1551079233959010.92244603830205
410.07213461451338220.1442692290267640.927865385486618
420.08123357011770740.1624671402354150.918766429882293
430.08496998582509330.1699399716501870.915030014174907
440.1159994067305580.2319988134611160.884000593269442
450.09431405281223580.1886281056244720.905685947187764
460.1415511666527090.2831023333054180.85844883334729
470.1144849094960620.2289698189921240.885515090503938
480.1602623543524610.3205247087049210.83973764564754
490.1309839188364510.2619678376729020.86901608116355
500.1336848813230560.2673697626461130.866315118676944
510.1752345775808670.3504691551617350.824765422419133
520.2164972763583350.4329945527166700.783502723641665
530.1869844607142580.3739689214285160.813015539285742
540.455228768664360.910457537328720.54477123133564
550.7790720120165260.4418559759669490.220927987983474
560.7461559420917140.5076881158165730.253844057908286
570.7074307032849610.5851385934300790.292569296715039
580.6977182053097920.6045635893804150.302281794690208
590.9998911117420830.0002177765158332460.000108888257916623
600.9999829053830573.41892338854004e-051.70946169427002e-05
610.9999999943866221.12267549963632e-085.61337749818159e-09
620.9999999971686235.6627538295087e-092.83137691475435e-09
630.99999999446181.10764001892749e-085.53820009463744e-09
640.9999999958654458.26910938794447e-094.13455469397223e-09
650.9999999998338783.32244216904573e-101.66122108452287e-10
660.9999999999484541.03091502986249e-105.15457514931245e-11
670.9999999999860052.79909869098885e-111.39954934549443e-11
680.999999999975734.85393561900936e-112.42696780950468e-11
690.9999999999786274.27460368261367e-112.13730184130684e-11
700.9999999999545969.08077927007784e-114.54038963503892e-11
710.9999999999829943.40116280416127e-111.70058140208064e-11
720.9999999999906981.8603695594998e-119.301847797499e-12
730.9999999999871322.57358424944906e-111.28679212472453e-11
740.9999999999962227.55568715449036e-123.77784357724518e-12
750.9999999999938231.23530247009649e-116.17651235048244e-12
760.99999999998872.26018830969202e-111.13009415484601e-11
770.9999999999924531.50937844902276e-117.5468922451138e-12
780.9999999999973185.36316233354578e-122.68158116677289e-12
790.9999999999962637.47324943916945e-123.73662471958473e-12
800.9999999999987442.51241692455181e-121.25620846227591e-12
810.9999999999975924.81603390464634e-122.40801695232317e-12
820.9999999999953719.25809267085742e-124.62904633542871e-12
830.9999999999892952.14107906756972e-111.07053953378486e-11
840.9999999999750874.98267680180559e-112.49133840090280e-11
850.9999999999843543.12927092675092e-111.56463546337546e-11
860.9999999999759044.81919179205085e-112.40959589602543e-11
870.999999999949981.00041482533270e-105.00207412666352e-11
880.99999999989582.08398922090946e-101.04199461045473e-10
890.9999999999108111.78377242550908e-108.9188621275454e-11
900.999999999840453.19098903952809e-101.59549451976405e-10
910.9999999996326427.34715958726463e-103.67357979363231e-10
920.9999999994903861.01922790240372e-095.09613951201858e-10
930.9999999990306981.93860390428540e-099.6930195214270e-10
940.9999999985765042.84699154829328e-091.42349577414664e-09
950.9999999985398252.92035062382435e-091.46017531191217e-09
960.9999999967879936.42401489702765e-093.21200744851383e-09
970.9999999976237044.75259186919359e-092.37629593459679e-09
980.99999999712975.74059842356264e-092.87029921178132e-09
990.9999999974753645.04927255294656e-092.52463627647328e-09
1000.9999999965889986.82200438806172e-093.41100219403086e-09
1010.9999999927982951.44034103947680e-087.20170519738401e-09
1020.9999999850181662.99636684108531e-081.49818342054265e-08
1030.999999979689714.06205810610318e-082.03102905305159e-08
1040.9999999697736126.04527753232706e-083.02263876616353e-08
1050.9999999748615795.02768427219898e-082.51384213609949e-08
1060.9999999848450443.03099114289308e-081.51549557144654e-08
1070.9999999942943161.14113674658132e-085.70568373290659e-09
1080.9999999944070631.11858740718162e-085.59293703590808e-09
1090.999999996426037.14793816832067e-093.57396908416033e-09
1100.9999999964374897.12502233172949e-093.56251116586474e-09
1110.999999992648641.47027182844689e-087.35135914223446e-09
1120.999999989526892.09462197209658e-081.04731098604829e-08
1130.9999999819872533.60254932229619e-081.80127466114810e-08
1140.9999999610912467.78175074080563e-083.89087537040281e-08
1150.9999999326978481.34604303444207e-076.73021517221035e-08
1160.9999998658108822.68378236135561e-071.34189118067781e-07
1170.9999997157514295.68497141843663e-072.84248570921831e-07
1180.9999993642950551.27140989035312e-066.3570494517656e-07
1190.999998619861972.76027606046535e-061.38013803023268e-06
1200.9999979657729124.06845417683544e-062.03422708841772e-06
1210.9999982160481973.56790360613776e-061.78395180306888e-06
1220.9999970168915425.9662169156031e-062.98310845780155e-06
1230.9999949311237531.01377524932722e-055.06887624663609e-06
1240.9999886836279122.26327441755489e-051.13163720877745e-05
1250.9999750549470654.98901058698661e-052.49450529349330e-05
1260.9999491944959170.0001016110081664185.08055040832088e-05
1270.9999771559365084.56881269843372e-052.28440634921686e-05
1280.9999528417746879.43164506252129e-054.71582253126064e-05
1290.9998958919990820.0002082160018359730.000104108000917986
1300.9998332562170180.0003334875659637560.000166743782981878
1310.9997595132171930.0004809735656143390.000240486782807170
1320.9995310871166240.0009378257667526340.000468912883376317
1330.9993306796561880.001338640687623430.000669320343811715
1340.998660729491670.002678541016661160.00133927050833058
1350.9973754725145680.005249054970863520.00262452748543176
1360.9971752674153760.005649465169248940.00282473258462447
1370.9948145152027720.01037096959445580.00518548479722792
1380.9938671042942030.01226579141159460.00613289570579732
1390.9871139548075890.02577209038482230.0128860451924111
1400.9794950733144880.04100985337102380.0205049266855119
1410.9713543285386260.05729134292274710.0286456714613735
1420.9485139894377640.1029720211244730.0514860105622363
1430.9165231262114820.1669537475770350.0834768737885176
1440.875848623986790.2483027520264180.124151376013209
1450.8120441039412030.3759117921175940.187955896058797
1460.6883346114526060.6233307770947890.311665388547394


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level780.569343065693431NOK
5% type I error level840.613138686131387NOK
10% type I error level900.656934306569343NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/10agng1291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/10agng1291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/1lf841291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/1lf841291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/2w6771291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/2w6771291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/3w6771291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/3w6771291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/4w6771291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/4w6771291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/5og7a1291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/5og7a1291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/6og7a1291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/6og7a1291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/7z7od1291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/7z7od1291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/8z7od1291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/8z7od1291122827.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/9agng1291122827.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291122841cxhfjmqtndlra2i/9agng1291122827.ps (open in new window)


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