Home » date » 2010 » Dec » 17 »

Multiple Regression Paper

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 17 Dec 2010 13:46:43 +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/17/t1292593565r4n81vc9fe4m8pv.htm/, Retrieved Fri, 17 Dec 2010 14:46:08 +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/17/t1292593565r4n81vc9fe4m8pv.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 «
15 10 12 16 6 12 9 7 12 6 9 12 11 11 4 10 12 11 12 6 13 9 14 14 6 16 11 16 16 7 14 12 13 13 6 16 11 13 14 7 10 12 5 13 6 8 12 8 13 4 12 11 14 13 5 15 11 15 15 8 14 12 8 14 4 14 6 13 12 6 12 13 12 12 6 12 11 11 12 5 10 12 8 11 4 4 10 4 10 2 14 11 15 15 8 15 12 12 16 7 16 12 14 14 6 12 12 9 13 4 12 11 16 13 4 12 12 10 13 4 12 12 8 13 5 12 12 14 14 4 11 6 6 9 4 11 5 16 14 6 11 12 11 12 6 11 14 7 13 6 11 12 13 11 4 11 9 7 13 2 15 11 14 15 7 15 11 17 16 6 9 11 15 15 7 16 12 8 14 4 13 10 8 8 4 9 12 11 11 4 16 11 16 15 6 12 12 10 15 6 15 9 5 11 3 5 15 8 12 3 11 11 8 12 6 17 11 15 14 5 9 15 6 8 4 13 12 16 16 6 16 9 16 16 6 16 12 16 14 6 14 9 19 12 6 16 11 14 15 6 11 12 15 12 6 11 11 11 14 5 11 6 14 17 6 12 10 12 13 6 12 12 15 13 6 12 13 14 12 5 14 11 13 16 6 10 10 11 12 5 9 11 8 10 4 12 7 11 15 5 10 11 9 12 4 14 11 10 16 6 8 7 4 13 6 16 12 15 15 7 14 14 17 18 6 14 11 12 12 4 12 12 12 13 4 14 11 15 14 6 7 12 13 12 3 19 12 15 15 6 15 12 14 16 4 8 12 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
KnowingPeople[t] = + 0.704773125332251 + 0.388112646909159Popularity[t] -0.072086130850391FindingFriends[t] + 0.267672517283153Liked[t] + 0.6695223593835Celebrity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.7047731253322511.7973720.39210.6955280.347764
Popularity0.3881126469091590.0976943.97270.000115.5e-05
FindingFriends-0.0720861308503910.121313-0.59420.5532570.276628
Liked0.2676725172831530.1250022.14130.0338510.016926
Celebrity0.66952235938350.1998273.35050.0010190.00051


Multiple Linear Regression - Regression Statistics
Multiple R0.652918056368862
R-squared0.426301988332492
Adjusted R-squared0.411104690010174
F-TEST (value)28.0511693125379
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.65644680094332
Sum Squared Residuals1065.56315054255


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11214.1054959532972-2.10549595329718
2711.9425540742875-4.94255407428748
3118.955240504958682.04475949504132
41110.9500703879180.0499296120820082
51412.86601175576291.13398824423705
61615.09104482873950.908955171260549
71312.77019349283780.229806507162218
81314.5556997941731-1.55569979417314
9511.2177429052011-6.21774290520114
1089.10247289261583-1.10247289261583
111411.39653197048642.60346802951365
121515.1047820239306-0.104782023930638
13811.6988212913539-3.69882129135394
141312.9350377606570.0649622393430255
151211.65420955088590.345790449114081
161111.1288594532032-0.128859453203201
1789.34335315186784-1.34335315186784
1845.55213229606351-1.55213229606351
191514.71666937702150.283330622978522
201214.6308460509799-2.6308460509799
211413.81409130393930.185908696060746
22910.6549234802525-1.65492348025246
231610.72700961110295.27299038889714
241010.6549234802525-0.654923480252464
25811.324445839636-3.32444583963596
261410.92259599753563.07740400246438
2769.62863754931304-3.62863754931304
281612.37813098534623.62186901465381
291111.3381830348271-0.33818303482715
30711.4616832904095-4.46168329040952
31139.7314657987773.268534201223
3279.14402450712748-2.14402450712748
331414.4352596645471-0.435259664547138
341714.03340982244682.96659017755321
351512.10658378309222.89341621690782
36812.4750465851723-4.47504658517226
3789.84884580244664-1.84884580244664
38118.955240504958682.04475949504132
391614.15384995207281.8461500479272
401012.5293132335858-2.52931323358577
41510.8306524195813-5.83065241958131
4286.784681682670521.21531831732948
43811.4102691656775-3.41026916567754
441513.60476772231531.3952322776847
4567.93596456055805-1.93596456055805
461613.18509839777812.81490160222192
471614.56569473105671.43430526894327
481613.81409130393932.18590869606075
491912.71877936810586.2812206318942
501414.1538499520728-0.153849952072798
511511.33818303482713.66181696517285
521111.2760918408603-0.276091840860348
531413.10906240634530.890937593654738
541212.1381404607202-0.138140460720245
551511.99396819901953.00603180098054
561410.98468719150243.01531280849758
571313.6452971755376-0.645297175537633
581110.42472029023530.575279709764726
5988.75965411852592-0.759654118525917
601112.2202215284542-1.22022152845423
6199.68311180000138-0.683111800001383
621013.6452971755376-3.64529717553763
63410.8019482656348-6.80194826563478
641514.75128618060590.248713819394093
651713.96438381755283.03561618244723
661211.2355623876380.76443761236198
671210.65492348025251.34507651974754
681513.10995214097131.89004785902867
69137.777165369040015.22283463095999
701515.2461017619499-0.246101761949886
711412.62227897282941.3777210271706
72810.0396677692825-2.03966776928248
731511.53682954721633.46317045278372
741213.1236893361625-1.12368933616251
751410.30142763692773.69857236307227
761010.1570477729521-0.15704777295212
7779.71772860358581-2.71772860358581
781615.76362731407930.236372685920685
79128.302515466722733.69748453327727
801513.64529717553761.35470282446237
8178.88009424815192-1.88009424815192
8298.151333218483160.848666781516844
831510.20540177172774.79459822827226
84710.1195784456862-3.11957844568616
851512.77019349283782.22980650716222
861412.80766282010371.19233717989626
871413.97506088678760.0249391132124122
88810.5551553567449-2.55515535674487
8989.83796113093699-1.83796113093699
901412.4541669767791.54583302322099
91108.906886506183071.09311349381694
921210.23219402975891.76780597024112
93159.346205675549375.65379432445063
941211.59211835691910.407881643080883
951312.02858500260390.971414997396109
961210.21539670861131.78460329138868
97108.370859339265531.62914066073447
9887.777165369040010.222834630959986
99610.1086937741765-4.1086937741765
1001312.10067113345430.899328866545718
101711.444885969262-4.44488596926197
1021313.1583061397469-0.158306139746941
10344.31353783315534-0.31353783315534
1041412.56086991121381.43913008878617
1051311.71255848654511.28744151345488
1061311.61279036303751.38720963696247
10766.4518578454642-0.451857845464202
10878.44668772842351-1.44668772842351
109510.105841250495-5.10584125049497
1101415.4928946708398-1.4928946708398
1111311.82517407061781.17482592938216
1121615.01895869788910.98104130211094
1131613.30247840144772.69752159855228
11477.55784685053248-0.557846850532476
1151411.76002275069472.23997724930533
1161112.3820808459286-1.38208084592862
1171715.09104482873951.90895517126055
11859.74146073566059-4.74146073566059
1191014.8401696326038-4.84016963260385
120118.965235441842272.03476455815773
121108.844795312216261.15520468778374
12299.9982485814341-0.998248581434088
1231211.34817797171070.651822028289261
1241512.95183508180452.04816491819547
125711.6058555521103-4.6058555521103
1261313.3055385274041-0.305538527404088
127812.4088731039598-4.40887310395976
1281611.90508474702154.09491525297848
1291512.57766723236142.42233276763862
130611.5921183569191-5.59211835691912
13165.429314172832370.570685827167627
1321213.2303922705973-1.23039227059733
133810.6817157382836-2.6817157382836
1341112.8453397496445-1.84533974964454
1351313.4259786570301-0.425978657030095
1361411.73629061861992.2637093813801
1371412.64975336321181.35024663678822
138107.372937533334542.62706246666546
139411.1456567743508-7.14565677435075
1401613.49806478788052.50193521211951
1411215.4208085399894-3.42080853998941
1421515.0189586978891-0.01895869788906
1431213.4497107891049-1.44971078910487
1441412.5746071064051.42539289359498
145119.655637409619011.34436259038099
1461612.02552487664753.97447512335247
1471412.26857552722981.73142447277016
1481413.88617743478960.113822565210355
1491513.03786601012091.96213398987907
15098.906886506183060.093113493816936
1511513.81409130393931.18590869606075
1521415.6884810572726-1.68848105727256
1531511.99396819901953.00603180098054
1541011.4923502334115-1.49235023341152
1551415.6884810572726-1.68848105727256
15699.29499915309222-0.294999153092224


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.5315176023147180.9369647953705650.468482397685282
90.8139124393705410.3721751212589170.186087560629459
100.7202824420225330.5594351159549340.279717557977467
110.6579046309006640.6841907381986720.342095369099336
120.6820461984110080.6359076031779840.317953801588992
130.8396970073549280.3206059852901440.160302992645072
140.7776532517119270.4446934965761460.222346748288073
150.7086308527158970.5827382945682050.291369147284103
160.6267098517047330.7465802965905340.373290148295267
170.5514771622086860.8970456755826280.448522837791314
180.4685317784266220.9370635568532450.531468221573378
190.4033634869576460.8067269739152930.596636513042354
200.3581300583189990.7162601166379980.641869941681001
210.289663820442650.5793276408853010.71033617955735
220.2336596222511390.4673192445022790.76634037774886
230.4998969045902340.9997938091804680.500103095409766
240.4309986384187120.8619972768374250.569001361581288
250.4396816557945390.8793633115890770.560318344205461
260.4817293278124430.9634586556248870.518270672187557
270.4986788046798550.997357609359710.501321195320146
280.5698679224152260.8602641551695480.430132077584774
290.5153707536262730.9692584927474530.484629246373727
300.5482344008544440.9035311982911110.451765599145556
310.6248741592013820.7502516815972370.375125840798618
320.6317079683508810.7365840632982380.368292031649119
330.5743976004744950.851204799051010.425602399525505
340.5802947967360320.8394104065279360.419705203263968
350.5867811634013020.8264376731973960.413218836598698
360.6440655513578840.7118688972842320.355934448642116
370.6037170523939960.7925658952120080.396282947606004
380.6019845169062670.7960309661874650.398015483093733
390.5832037066769270.8335925866461460.416796293323073
400.5800668703650030.8398662592699950.419933129634997
410.6956763591349820.6086472817300370.304323640865018
420.656190427991850.68761914401630.34380957200815
430.6704737321132470.6590525357735060.329526267886753
440.6602851235959490.6794297528081030.339714876404051
450.626174174773560.747651650452880.37382582522644
460.619987988380260.7600240232394790.380012011619739
470.5798487540689950.840302491862010.420151245931005
480.5819429072407750.836114185518450.418057092759225
490.810423788880930.3791524222381390.189576211119069
500.7744664822591610.4510670354816780.225533517740839
510.8118140229228360.3763719541543290.188185977077164
520.7773125966845770.4453748066308460.222687403315423
530.747795868203260.5044082635934810.25220413179674
540.7067534563883610.5864930872232780.293246543611639
550.7182775483778230.5634449032443530.281722451622177
560.7364600495041340.5270799009917320.263539950495866
570.7003078380922540.5993843238154910.299692161907746
580.6587987413447570.6824025173104870.341201258655243
590.6162908958372430.7674182083255130.383709104162757
600.5820546940672270.8358906118655460.417945305932773
610.5368918574567610.9262162850864780.463108142543239
620.5841500919511620.8316998160976760.415849908048838
630.8039974884039130.3920050231921740.196002511596087
640.7694633581160710.4610732837678580.230536641883929
650.7744961646971850.451007670605630.225503835302815
660.7429369158286950.514126168342610.257063084171305
670.7142029704454630.5715940591090730.285797029554537
680.6923965932958330.6152068134083340.307603406704167
690.8025772362501450.3948455274997110.197422763749855
700.7689881895687340.4620236208625330.231011810431266
710.7393777566228040.5212444867543910.260622243377195
720.7240882930074180.5518234139851630.275911706992582
730.7606445665366280.4787108669267430.239355433463372
740.7288307103164290.5423385793671430.271169289683571
750.76437047943030.47125904113940.2356295205697
760.7286923448381090.5426153103237830.271307655161891
770.7301771651491840.5396456697016330.269822834850816
780.6993176706533940.6013646586932120.300682329346606
790.7654787294998770.4690425410002450.234521270500123
800.7390006218627280.5219987562745450.260999378137272
810.7234688404645860.5530623190708280.276531159535414
820.6905903630257620.6188192739484760.309409636974238
830.7821307465547530.4357385068904930.217869253445247
840.7977442862727760.4045114274544470.202255713727224
850.7898901240736590.4202197518526820.210109875926341
860.7621859646283670.4756280707432660.237814035371633
870.7268709278540690.5462581442918630.273129072145931
880.7477373932042460.5045252135915090.252262606795754
890.7803363765726140.4393272468547720.219663623427386
900.755832027870520.4883359442589590.24416797212948
910.7276070120400020.5447859759199970.272392987959998
920.7167402859731810.5665194280536380.283259714026819
930.8776258546301270.2447482907397450.122374145369873
940.8557872157481430.2884255685037130.144212784251857
950.8322429685780950.335514062843810.167757031421905
960.808881187923660.382237624152680.19111881207634
970.8026560150062720.3946879699874560.197343984993728
980.783198604699080.4336027906018390.216801395300919
990.8428328839172360.3143342321655290.157167116082764
1000.814556684888760.3708866302224790.185443315111239
1010.8815302496232830.2369395007534340.118469750376717
1020.8555509171602460.2888981656795080.144449082839754
1030.8257680407657120.3484639184685760.174231959234288
1040.7964329340377160.4071341319245680.203567065962284
1050.7709514863157430.4580970273685140.229048513684257
1060.737544946377030.5249101072459390.26245505362297
1070.7033760280250470.5932479439499060.296623971974953
1080.6705825107127490.6588349785745030.329417489287251
1090.8601212468949540.2797575062100930.139878753105046
1100.8403819215316120.3192361569367770.159618078468388
1110.8731243615243160.2537512769513680.126875638475684
1120.853925905970440.292148188059120.14607409402956
1130.8339723250865820.3320553498268370.166027674913418
1140.7987578185682790.4024843628634420.201242181431721
1150.787682390084740.4246352198305180.212317609915259
1160.7529080171853120.4941839656293750.247091982814688
1170.7382311062526230.5235377874947550.261768893747377
1180.9306930904328110.1386138191343770.0693069095671885
1190.9326985137608330.1346029724783350.0673014862391673
1200.9207882909128930.1584234181742140.0792117090871072
1210.9147960760202150.170407847959570.0852039239797852
1220.8899046028827230.2201907942345550.110095397117277
1230.8683648774367040.2632702451265920.131635122563296
1240.8772558137655860.2454883724688290.122744186234414
1250.8954690211218690.2090619577562630.104530978878132
1260.8642699454314380.2714601091371230.135730054568562
1270.8497554095704970.3004891808590060.150244590429503
1280.8448254288461480.3103491423077030.155174571153852
1290.8918895460963210.2162209078073580.108110453903679
1300.9669168369636120.0661663260727760.033083163036388
1310.9535894148230930.09282117035381360.0464105851769068
1320.9601976647151520.07960467056969530.0398023352848476
1330.9434043068786090.1131913862427830.0565956931213915
1340.918792014353090.1624159712938180.081207985646909
1350.8930002015858370.2139995968283250.106999798414163
1360.892528530529650.2149429389406980.107471469470349
1370.8895202074815310.2209595850369380.110479792518469
1380.8524268257903290.2951463484193410.147573174209671
1390.986561788596730.02687642280654060.0134382114032703
1400.9848939494333260.03021210113334850.0151060505666742
1410.9940319286642840.01193614267143180.00596807133571591
1420.9882554367419530.02348912651609430.0117445632580471
1430.9781534096626980.04369318067460390.021846590337302
1440.960587505775670.07882498844866110.0394124942243306
1450.930492432340450.1390151353190980.0695075676595491
1460.9186516114802950.162696777039410.0813483885197051
1470.9298171996738930.1403656006522140.070182800326107
1480.908698685482330.1826026290353380.0913013145176692


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level50.0354609929078014OK
10% type I error level90.0638297872340425OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/1099mu1292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/1099mu1292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/1kqpi1292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/1kqpi1292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/2kqpi1292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/2kqpi1292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/3vho31292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/3vho31292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/4vho31292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/4vho31292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/5vho31292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/5vho31292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/6nqn61292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/6nqn61292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/7yznr1292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/7yznr1292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/8yznr1292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/8yznr1292593591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/9yznr1292593591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292593565r4n81vc9fe4m8pv/9yznr1292593591.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