Home » date » 2010 » Nov » 21 »

Multiple regression 1

*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: Sun, 21 Nov 2010 12:49:51 +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/21/t1290343724obbctt2vg5gv0rj.htm/, Retrieved Sun, 21 Nov 2010 13:48:56 +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/21/t1290343724obbctt2vg5gv0rj.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 «
4 4 4 4 4 4 4 4 4 3 4 4 5 4 4 4 5 5 5 4 5 4 4 4 3 4 4 3 3 2 3 4 2 2 4 3 4 2 3 4 5 4 5 4 5 4 3 4 4 3 4 4 4 3 3 4 2 2 4 2 4 2 4 4 4 4 5 3 4 2 4 4 4 2 2 3 4 4 3 2 4 4 4 4 4 3 4 4 2 2 3 2 4 3 4 3 5 5 5 4 5 4 5 5 3 3 4 4 4 3 3 4 4 4 4 4 4 4 4 3 4 4 5 4 4 4 4 4 3 3 3 3 3 3 3 4 4 4 4 4 5 3 4 4 2 2 4 2 3 2 2 3 4 3 4 4 4 2 4 4 3 4 4 3 4 3 4 4 3 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 4 3 5 3 4 4 5 4 4 4 5 4 4 4 2 4 4 3 4 3 4 4 4 4 4 4 4 4 4 4 4 4 3 4 4 4 3 4 4 4 4 5 2 4 4 4 2 4 4 4 3 3 4 4 4 4 3 4 2 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 4 4 5 3 5 4 3 3 3 4 4 4 4 4 4 4 4 4 4 3 4 4 4 4 3 4 4 3 4 4 4 3 4 2 3 3 3 3 4 4 4 4 4 3 4 4 4 4 4 4 2 2 3 2 4 2 3 2 2 2 5 2 4 2 2 3 4 4 5 4 4 2 4 4 4 2 4 4 4 4 4 2 5 4 5 5 4 4 4 5 4 4 4 4 4 3 4 4 4 3 4 3 5 3 4 4 4 4 4 4 4 4 4 4 5 4 4 4 5 4 4 4 3 3 4 3 4 4 3 4 2 1 4 4 4 4 2 4 4 4 4 4 4 3 4 4 4 4 4 3 3 4 4 3 2 2 4 3 4 4 4 4 2 2 4 2 3 3 2 3 4 4 4 4 4 3 4 4 4 4 4 4 4 2 4 4 4 3 4 4 3 2 4 4 3 3 4 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Leadership[t] = + 1.02830814409858 + 0.0842475032129696Preferleader[t] + 0.207213675242005Jobcontrol[t] + 0.386522109686850Influenceothers[t] -0.134026305664132Destinycontrol[t] + 0.00410101084894554Handlingsituations[t] + 0.279829847242845Organization[t] -0.068409636934505Ability[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.028308144098580.4785982.14860.033340.01667
Preferleader0.08424750321296960.0649631.29680.1967580.098379
Jobcontrol0.2072136752420050.074492.78180.0061310.003065
Influenceothers0.3865221096868500.0904064.27543.5e-051.7e-05
Destinycontrol-0.1340263056641320.071517-1.87410.0629490.031474
Handlingsituations0.004101010848945540.0788350.0520.9585850.479292
Organization0.2798298472428450.0794933.52020.0005780.000289
Ability-0.0684096369345050.062201-1.09980.2732510.136626


Multiple Linear Regression - Regression Statistics
Multiple R0.571118664491289
R-squared0.326176528930313
Adjusted R-squared0.29342122130887
F-TEST (value)9.95797483265836
F-TEST (DF numerator)7
F-TEST (DF denominator)144
p-value4.14612011390147e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.604931442781952
Sum Squared Residuals52.6956552671406


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.06622095863846-0.0662209586384641
233.93219465297436-0.932194652974364
354.223655831429340.776344168570663
443.441445782462070.55855421753793
523.22317197358497-1.22317197358497
643.943825984186490.0561740158135078
733.7822901005467-0.782290100546702
823.11647971114096-1.11647971114096
943.878710502495760.121289497504241
1023.1222609250938-1.12226092509380
1144.06211994778955-0.0621199477895489
1222.98177668368241-0.98177668368241
1354.435076041737680.564923958262323
1433.69804259733373-0.698042597333733
1544.134630595573-0.134630595573000
1644.2734346338805-0.273434633880500
1733.23833311806901-0.238333118069011
1843.928093642125420.0719063578745837
1922.75925595925391-0.75925595925391
2034.0580189369406-1.05801893694060
2143.591350334889730.408649665110271
2223.77475978018352-1.77475978018352
2344.06622095863849-0.0662209586384942
2444.06622095863849-0.0662209586384942
2544.06622095863849-0.0662209586384942
2633.54157153243857-0.541571532438566
2744.01644215618733-0.0164421561873315
2843.507102831676760.492897168323241
2944.06622095863849-0.0662209586384942
3043.579177436153640.420822563846357
3144.72079567965361-0.72079567965361
3244.02765124702774-0.0276512470277418
3344.12705989472475-0.127059894724754
3454.066220958638490.933779041361506
3544.06622095863849-0.0662209586384942
3644.13183762736812-0.131837627368122
3753.725376640553861.27462335944614
3844.06622095863849-0.0662209586384942
3943.977872444576580.022127555423421
4043.624749703538470.375250296461529
4133.77475978018352-0.774759780183519
4244.11879272929453-0.118792729294535
4333.32440978159118-0.324409781591183
4453.463319344116071.53668065588393
4554.334273569966760.66572643003324
4643.269656620792360.730343379207642
4754.553264481123350.446735518876655
4844.20024726430263-0.200247264302627
4944.2953081955345-0.295308195534501
5043.997811321703990.00218867829601101
5144.52115270525985-0.52115270525985
5243.907478043203580.092521956796416
5343.805276427301690.194723572698306
5444.20024726430263-0.200247264302627
5543.329474600335800.670525399664196
5643.827331550839560.172668449160441
5742.942770928765091.05722907123491
5844.20024726430263-0.200247264302627
5944.33427356996676-0.33427356996676
6043.931913594001450.0680864059985549
6144.25281903495867-0.252819034958668
6243.349667958885920.650332041114084
6343.997811321703990.00218867829601101
6444.55230067322767-0.55230067322767
6544.23852988981213-0.238529889812126
6655.02813510487211-0.0281351048721104
6744.31843570368830-0.318435703688295
6843.586572602246360.413427397753639
6933.61322389654373-0.61322389654373
7043.961493010774160.0385069892258418
7143.750043170412740.249956829587259
7223.18759050772217-1.18759050772217
7343.11787282814360.8821271718564
7454.384333431390840.615666568609161
7544.21608513058109-0.216085130581092
7654.93978659081020.0602134091898048
7733.40668694309615-0.406686943096148
7844.50348567867218-0.503485678672182
7944.48668400449804-0.486684004498042
8033.72059890791049-0.720598907910494
8143.602410468524830.397589531475174
8243.977872444576580.022127555423421
8344.35265769883391-0.352657698833910
8444.03871138066284-0.0387113806628388
8543.984726043145340.0152739568546587
8643.727311325080450.272688674919547
8754.100161894811190.899838105188808
8844.37521400941067-0.37521400941067
8943.624960751973250.375039248026750
9044.05038309236003-0.0503830923600296
9143.74782139978490.252178600215104
9254.02355023617880.976449763821204
9344.06144322599513-0.0614432259951267
9443.693264864690370.306735135309634
9533.03111944282701-0.0311194428270053
9643.188554315617850.811445684382152
9743.931517931179940.0684820688200606
9843.299212434640330.700787565359668
9954.303380083421640.696619916578358
10054.203040232507500.796959767492496
10143.904685074998710.0953149250012938
10243.743149191358920.256850808641082
10354.200247264302630.799752735697373
10454.300085928177870.699914071822131
10544.3691722869068-0.369172286906796
10654.484854844188840.51514515581116
10744.11599976108966-0.115999761089657
10843.859007283396490.140992716603511
10944.18440939802416-0.184409398024162
11044.25281903495867-0.252819034958668
11123.76577551247382-1.76577551247382
11243.743149191358920.256850808641082
11354.628281011010420.37171898898958
11443.804599705507270.195400294492728
11544.02765124702774-0.0276512470277418
11643.242434128917960.757565871082044
11743.904685074998710.0953149250012938
11844.18918713066753-0.189187130667530
11933.48662238702539-0.486622387025393
12043.68641126612160.313588733878396
12144.10729655235287-0.107296552352871
12234.02765124702774-1.02765124702774
12343.836169913846810.163830086153189
12454.245925055904840.754074944095156
12554.203040232507500.796959767492496
12634.03938810245726-1.03938810245726
12754.043489113306210.956510886693793
12844.18440939802416-0.184409398024162
12943.597632735881460.402367264118541
13034.341844270815-1.34184427081501
13133.69804259733373-0.698042597333733
13243.854800748330150.145199251669846
13354.527480507196360.472519492803644
13423.46752587918241-1.46752587918241
13544.20024726430263-0.200247264302627
13644.20304023250750-0.203040232507505
13743.591350334889730.408649665110271
13854.050383092360030.94961690763997
13943.228953187537800.771046812462197
14044.04218107066214-0.0421810706621389
14143.966135589147060.0338644108529403
14243.713203741817780.286796258182224
14344.06622095863849-0.0662209586384942
14444.20024726430263-0.200247264302627
14554.118792729294530.881207270705465
14633.66392612640551-0.663926126405508
14744.06622095863849-0.0662209586384942
14843.754384859749540.245615140250458
14944.134630595573-0.134630595573000
15044.18030838717522-0.180308387175217
15143.487930429669460.512069570330539
15254.894108799207980.105891200792022


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.4438858518421510.8877717036843010.55611414815785
120.2945416903563560.5890833807127120.705458309643644
130.2236507074052170.4473014148104330.776349292594783
140.1359277994820620.2718555989641250.864072200517938
150.1016495445676280.2032990891352570.898350455432372
160.2061075498216150.4122150996432300.793892450178385
170.1371487967287260.2742975934574520.862851203271274
180.1820074928062440.3640149856124880.817992507193756
190.1431358609890470.2862717219780950.856864139010953
200.2806062192196710.5612124384393430.719393780780329
210.3552123322125930.7104246644251850.644787667787407
220.5134872802859130.9730254394281730.486512719714087
230.4365142857328030.8730285714656050.563485714267197
240.3628665391675810.7257330783351620.637133460832419
250.2949514858233660.5899029716467320.705048514176634
260.2705564734090920.5411129468181840.729443526590908
270.2144614417647970.4289228835295950.785538558235203
280.4790368251019920.9580736502039850.520963174898007
290.4118442967437740.8236885934875480.588155703256226
300.5163266361011260.9673467277977480.483673363898874
310.5505074104910330.8989851790179330.449492589508966
320.5860767745924150.827846450815170.413923225407585
330.5244050701473370.9511898597053270.475594929852663
340.6464587501050740.7070824997898530.353541249894926
350.5890093154181370.8219813691637260.410990684581863
360.5732827344797990.8534345310404020.426717265520201
370.7519537664061590.4960924671876830.248046233593841
380.7044259943840850.591148011231830.295574005615915
390.6900987597565010.6198024804869980.309901240243499
400.685728567212460.628542865575080.31427143278754
410.6702078939359980.6595842121280040.329792106064002
420.632380488536720.735239022926560.36761951146328
430.6587227381961230.6825545236077540.341277261803877
440.9611307023580030.07773859528399330.0388692976419966
450.9596918285307020.08061634293859670.0403081714692983
460.9594748332312290.08105033353754240.0405251667687712
470.9513620184103350.09727596317933020.0486379815896651
480.9416177011081180.1167645977837630.0583822988918816
490.9267045423424970.1465909153150060.0732954576575028
500.9080406566134970.1839186867730050.0919593433865027
510.892294790792790.2154104184144220.107705209207211
520.8999872644928460.2000254710143070.100012735507154
530.881858001723330.2362839965533400.118141998276670
540.8605314009061330.2789371981877340.139468599093867
550.895553127925350.2088937441493020.104446872074651
560.8841943809931180.2316112380137650.115805619006882
570.9317582471852550.1364835056294910.0682417528147453
580.9167124928319010.1665750143361970.0832875071680986
590.9052351409863060.1895297180273880.094764859013694
600.8826816046402190.2346367907195620.117318395359781
610.8593820926363870.2812358147272250.140617907363613
620.8548086214135790.2903827571728430.145191378586421
630.8252048496444860.3495903007110270.174795150355514
640.8198648013468320.3602703973063360.180135198653168
650.792383275627780.4152334487444390.207616724372220
660.7557647981760160.4884704036479670.244235201823984
670.7226123291527950.554775341694410.277387670847205
680.6985503362651280.6028993274697450.301449663734872
690.6988284330054130.6023431339891750.301171566994587
700.6578745877389910.6842508245220180.342125412261009
710.6292055663548510.7415888672902980.370794433645149
720.7380544853526620.5238910292946750.261945514647337
730.7818470643321340.4363058713357310.218152935667866
740.7849720439050730.4300559121898540.215027956094927
750.7519651614913380.4960696770173250.248034838508662
760.7130043925547240.5739912148905520.286995607445276
770.7014702173309020.5970595653381970.298529782669098
780.7023857535415490.5952284929169010.297614246458451
790.6759793822578670.6480412354842660.324020617742133
800.6956362767323220.6087274465353560.304363723267678
810.6649780930517520.6700438138964960.335021906948248
820.6213662621488560.7572674757022880.378633737851144
830.5887261214072630.8225477571854740.411273878592737
840.540578142855680.918843714288640.45942185714432
850.4923584884451760.9847169768903520.507641511554824
860.4550755449451990.9101510898903980.544924455054801
870.5156865102686140.9686269794627730.484313489731386
880.4807632906780060.9615265813560130.519236709321994
890.4448941351175210.8897882702350410.555105864882479
900.40212372897380.80424745794760.5978762710262
910.3643029110802570.7286058221605140.635697088919743
920.440052807635180.880105615270360.55994719236482
930.3947440674136760.7894881348273520.605255932586324
940.3628606548428020.7257213096856050.637139345157198
950.3209934220277290.6419868440554590.67900657797227
960.3357344181334930.6714688362669870.664265581866507
970.3052793857624850.610558771524970.694720614237515
980.2990063216634170.5980126433268340.700993678336583
990.3191537231798320.6383074463596640.680846276820168
1000.3378751659429010.6757503318858020.662124834057099
1010.2925502958930070.5851005917860140.707449704106993
1020.266172001843450.53234400368690.73382799815655
1030.2924897459786330.5849794919572650.707510254021367
1040.3051690228169400.6103380456338790.69483097718306
1050.2732461724739220.5464923449478450.726753827526078
1060.2538781724729720.5077563449459440.746121827527028
1070.2133495806664930.4266991613329870.786650419333507
1080.1772101215824700.3544202431649400.82278987841753
1090.1456831860075880.2913663720151770.854316813992412
1100.1205839266000670.2411678532001340.879416073399933
1110.5282290355946690.9435419288106620.471770964405331
1120.493839207298550.98767841459710.50616079270145
1130.4525184743626070.9050369487252140.547481525637393
1140.4014294517521580.8028589035043160.598570548247842
1150.3529744106087070.7059488212174150.647025589391293
1160.3534853838577800.7069707677155590.64651461614222
1170.3054713544861970.6109427089723940.694528645513803
1180.2560082050161150.5120164100322290.743991794983885
1190.2585054958179300.5170109916358590.74149450418207
1200.2451950000489790.4903900000979580.754804999951021
1210.2154225532299230.4308451064598460.784577446770077
1220.2580644390054150.516128878010830.741935560994585
1230.2086843443629560.4173686887259110.791315655637044
1240.2914103681097510.5828207362195010.708589631890249
1250.2844668693457180.5689337386914360.715533130654282
1260.2953655572957760.5907311145915510.704634442704224
1270.5842298549141770.8315402901716450.415770145085823
1280.5093767279165950.981246544166810.490623272083405
1290.5021888117431210.9956223765137580.497811188256879
1300.8905896418694660.2188207162610690.109410358130534
1310.9748859472890660.05022810542186860.0251140527109343
1320.976096088619650.04780782276070030.0239039113803501
1330.9611108539030480.07777829219390310.0388891460969515
1340.9742326805883130.05153463882337490.0257673194116875
1350.9520226673451290.09595466530974260.0479773326548713
1360.9455540631748340.1088918736503310.0544459368251655
1370.9209129000164720.1581741999670570.0790870999835284
1380.9730348915438530.05393021691229370.0269651084561468
1390.9512107366611530.09757852667769480.0487892633388474
1400.8884867480208830.2230265039582340.111513251979117
1410.8573047848086740.2853904303826530.142695215191326


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.00763358778625954OK
10% type I error level110.083969465648855OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/10fg691290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/10fg691290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/18x8x1290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/18x8x1290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/28x8x1290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/28x8x1290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/31pq01290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/31pq01290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/41pq01290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/41pq01290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/51pq01290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/51pq01290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/6uy7l1290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/6uy7l1290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/7uy7l1290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/7uy7l1290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/847oo1290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/847oo1290343780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/947oo1290343780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290343724obbctt2vg5gv0rj/947oo1290343780.ps (open in new window)


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