Home » date » 2010 » Dec » 02 »

gelukte blog minitut7

*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: Thu, 02 Dec 2010 15:54:35 +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/02/t129130517439i12ssse3ow4xe.htm/, Retrieved Thu, 02 Dec 2010 16:52:54 +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/02/t129130517439i12ssse3ow4xe.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 «
2 13 3 13 13 3 1 12 3 7 13 5 0 15 4 10 16 6 3 12 3 9 12 6 3 10 2 10 11 5 1 12 3 6 12 3 3 15 4 15 18 8 1 9 2 10 11 4 4 12 3 14 14 4 0 11 4 5 9 4 3 11 3 15 14 6 2 11 3 10 12 6 4 15 4 16 11 5 3 7 2 13 12 4 1 11 2 6 13 6 1 11 3 12 11 4 2 10 2 10 12 6 3 14 4 15 16 6 1 10 2 6 9 4 1 6 1 8 11 4 2 11 3 8 13 2 3 15 4 13 15 7 4 11 2 15 10 5 2 12 3 7 11 4 1 14 3 12 13 6 2 15 4 15 16 6 2 9 3 13 15 7 4 13 3 15 14 5 2 13 4 13 14 6 3 16 4 9 14 4 3 13 4 9 8 4 3 12 3 15 13 7 4 14 4 14 15 7 2 11 3 9 13 4 2 9 2 9 11 4 4 16 4 16 15 6 3 12 3 12 15 6 4 10 2 10 9 5 2 13 4 13 13 6 5 16 4 17 16 7 3 14 4 13 13 6 1 15 4 5 11 3 1 5 2 6 12 3 1 8 2 9 12 4 2 11 3 9 12 6 3 16 4 13 14 7 9 17 5 20 14 5 0 9 2 5 8 4 0 9 3 8 13 5 2 13 3 14 16 6 2 10 2 6 13 6 3 6 2 14 11 6 1 12 3 9 14 5 2 8 2 8 13 4 0 14 4 9 13 5 5 12 3 16 13 5 2 11 3 12 12 4 4 16 4 16 16 6 3 8 1 11 15 2 0 15 4 11 15 8 0 7 2 6 12 3 4 16 4 16 14 6 1 14 4 15 12 6 1 16 4 11 15 6 4 9 2 9 12 5 2 14 4 12 13 5 4 11 2 15 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Ihavemanyfriends[t] = + 0.0496203608625268 -0.0502689740190555sum[t] + 0.282977054518711Popularity[t] + 0.0269440633049747KnowingPeople[t] -0.0242599319071114Liked[t] -0.0409210098415009Celebrity[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.04962036086252680.2022780.24530.8065560.403278
sum-0.05026897401905550.032126-1.56480.1197610.059881
Popularity0.2829770545187110.01589217.806800
KnowingPeople0.02694406330497470.0168691.59730.112320.05616
Liked-0.02425993190711140.019572-1.23950.2171090.108555
Celebrity-0.04092100984150090.031395-1.30340.1944450.097222


Multiple Linear Regression - Regression Statistics
Multiple R0.895389490189128
R-squared0.801722339141146
Adjusted R-squared0.795068726360648
F-TEST (value)120.494288680425
F-TEST (DF numerator)5
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.404795214699169
Sum Squared Residuals24.4150157106586


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.53991480021537-0.539914800215375
233.06370032020287-0.0637003202028701
343.930031842130150.0699681578698532
433.00038942084032-0.000389420840319157
522.52656031685648-0.526560316856485
633.14285820848801-0.142858208488009
743.783583353100630.216416646899371
822.38504222021739-0.385042220217386
933.11816291921492-0.118162919214916
1042.915064850563211.08493514943679
1132.830556882337230.169443117662766
1232.794625403645640.205374596354361
1344.05284099526083-0.0528409952608306
1421.775122421149670.224877578850334
1522.71285819253768-0.712858192537684
1633.00488445586476-0.00488445586475642
1722.51164834912693-0.511648349126928
1843.630968182079140.369031817920857
1922.60876288533042-0.60876288533042
2011.48222293005130-0.482222930051305
2132.880161384494580.119838615505419
2243.843396032053510.156603967946485
2322.91824864578812-0.918248645788125
2433.10287221983954-0.102872219839538
2533.72345373592366-0.723453735923664
2643.964214210616910.0357857893830908
2732.195802678960310.804197321039694
2833.3871630271971-0.387163027197100
2943.392891838783760.607108161216239
3044.16561979478394-0.165619794783941
3143.462248222670480.537751777329523
3233.09687285892156-0.0968728589215549
3343.537094066820720.462905933179277
3432.825263428116550.174736571883446
3522.30782918289336-0.307829182893356
3644.19785731230960-0.197857312309595
3733.00844181503391-0.008441815033909
3822.52481120665165-0.524811206651652
3943.417151770690870.582848229309127
4044.1093514598469-0.109351459846902
4143.649859851190530.350140148809472
4243.989105240646280.0108947593537228
4321.162018826857030.837981173142966
4422.05086117048659-0.050861170486589
4532.767681340340660.232318659659336
4644.15063301847934-0.150633018479337
4754.402446691701540.597553308298461
4822.3733706734329-0.373370673432902
4932.291982193970770.708017806029232
5033.37131603827451-0.371316038274513
5122.37961216399992-0.379612163999918
5221.461507342160040.53849265783996
5333.09332851490571-0.093328514905708
5421.949388201255450.0506117987445524
5543.733811529869300.266188470130704
5633.10512099387142-0.105120993871420
5732.930355549938590.0696444500614104
5844.17359738040248-0.173597380402484
5912.01327357302010-1.01327357302010
6043.899393817659230.100606182340769
6121.778241909913510.221758090086489
6244.22211724421671-0.222117244216706
6343.82854585774570.171454142254301
6444.21394391784189-0.213943917841888
6522.14211029310663-0.142110293106632
6643.714105771746110.285894228253891
6722.8288077721324-0.828807772132401
6843.370937306628690.629062693371308
6943.909511994995160.0904880050048423
7011.29554632272428-0.295546322724285
7143.927108094122580.0728919058774222
7243.357534832494260.642465167505738
7332.767320791549730.23267920845027
7432.680564049291870.319435950708131
7533.03363676813405-0.0336367681340510
7633.11084980545808-0.110849805458081
7733.14908668390172-0.149086683901719
7833.09788268868963-0.0978826886896326
7943.649934659765570.350065340234425
8011.48323275981938-0.483232759819382
8131.713995989357931.28600401064207
8243.627469961669480.372530038330522
8333.55375514475511-0.553755144755113
8432.552569358968430.447430641031571
8543.352241378273580.647758621726417
8633.10454652146932-0.104546521469324
8722.30514505149549-0.305145051495492
8833.04574367228452-0.045743672284516
8944.10877698744481-0.108776987444805
9032.543221394790870.456778605209126
9143.546516839573330.453483160426675
9232.469431769301460.530568230698538
9344.13267637056098-0.132676370560983
9443.986725032319190.0132749676808122
9533.06825449398679-0.0682544939867946
9622.61051199553525-0.610511995535253
9711.81003890237160-0.810038902371603
9822.03614494351331-0.0361449435133078
9922.81665474437575-0.816654744375754
10033.31299467006187-0.312994670061868
10144.15962043386596-0.159620433865957
10244.12999223916312-0.129992239163119
10333.68298626630303-0.682986266303031
10432.758408184738160.241591815261844
10510.8912696086700170.108730391329983
10633.44134990917624-0.441349909176243
10732.330793544816500.669206455183498
10843.546442030998280.453557969001722
10922.04326231651387-0.0432623165138671
11021.978081374765250.0219186252347451
11132.864239586996950.135760413003053
11233.11657861704474-0.116578617044742
11332.736183103251760.263816896748235
11443.647989808804470.352010191195533
11543.792192036841430.207807963158571
11644.21849809162581-0.218498091625812
11744.26152876046308-0.26152876046308
11822.64369754940724-0.643697549407243
11933.60589416116023-0.605894161160229
12043.725398586884770.274601413115228
12133.13880369853113-0.138803698531134
12243.768928919549090.231071080450911
12321.903673401020320.0963265989796834
12443.34624201735560.6537579826444
12544.22211724421671-0.222117244216706
12633.00887717239989-0.00887717239989009
12744.08813620812859-0.0881362081285879
12833.18082453760032-0.180824537600323
12932.787026549672920.212973450327083
13011.05552512846779-0.0555251284677942
13144.04510553929132-0.0451055392913202
13243.878948779099290.121051220900711
13322.46588742528562-0.465887425285616
13433.22144413741038-0.221444137410377
13543.931901884516210.0680981154837921
13633.13156539334935-0.131565393349346
13743.652543982588390.347456017411609
13821.862693252419330.137306747580671
13955.06649423398891-0.0664942339889137
14033.10418597267839-0.104185972678390
14143.266285709874220.733714290125781
14233.36594777547879-0.365947775478786
14344.03881792511812-0.0388179251181231
14422.10312111907293-0.103121119072934
14533.13518454594024-0.135184545940240
14632.375993011409020.624006988590976
14721.907532170220920.092467829779084
148NANA0.0375348995879236
14944.12848274556799-0.128482745567992
15044.29901772352534-0.299017723525342
15133.12905721797009-0.129057217970089
15244.33021907241441-0.330219072414406
15321.570776771480440.429223228519564
15443.654414024974450.345585975025548
15544.21971069702110-0.219710697021105
1563NANA


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.07637492844870030.1527498568974010.9236250715513
100.7897130702693340.4205738594613310.210286929730666
110.7735615644846290.4528768710307430.226438435515371
120.6712506293495920.6574987413008150.328749370650408
130.6342168582773580.7315662834452840.365783141722642
140.6810951705095050.637809658980990.318904829490495
150.8519031688164550.2961936623670890.148096831183545
160.8030451209864220.3939097580271570.196954879013578
170.8305759602525610.3388480794948770.169424039747439
180.82790824564240.3441835087151990.172091754357600
190.8479657351605020.3040685296789950.152034264839498
200.8154657925832150.369068414833570.184534207416785
210.800129588590450.3997408228191010.199870411409551
220.7466819614719680.5066360770560640.253318038528032
230.8480456483195720.3039087033608560.151954351680428
240.8038858392756340.3922283214487320.196114160724366
250.87987401696820.2402519660635990.120125983031799
260.8429371578655230.3141256842689530.157062842134477
270.9219142737028450.1561714525943100.0780857262971552
280.909187721495620.181624557008760.09081227850438
290.9313923763985120.1372152472029760.0686076236014878
300.9100034936577660.1799930126844690.0899965063422344
310.9551242101108260.08975157977834780.0448757898891739
320.9398255513842470.1203488972315050.0601744486157527
330.9396755821705250.1206488356589510.0603244178294754
340.925812443276360.1483751134472800.0741875567236399
350.9101222788889430.1797554422221150.0898777211110573
360.8919026704308460.2161946591383080.108097329569154
370.8635241652168350.272951669566330.136475834783165
380.8608124255018720.2783751489962560.139187574498128
390.8845212062548420.2309575874903160.115478793745158
400.8584623714871660.2830752570256690.141537628512834
410.8484996698213380.3030006603573250.151500330178662
420.8154946725743350.369010654851330.184505327425665
430.9103135645791870.1793728708416260.089686435420813
440.8877800040990820.2244399918018370.112219995900918
450.868229185196440.2635416296071190.131770814803560
460.8429714510610060.3140570978779890.157028548938994
470.8855988253481030.2288023493037940.114401174651897
480.875166705895920.2496665882081600.124833294104080
490.913985970785950.1720280584280980.0860140292140492
500.9153882704017510.1692234591964980.084611729598249
510.9174841357129490.1650317285741030.0825158642870515
520.932614290379560.1347714192408790.0673857096204395
530.9162700292970470.1674599414059050.0837299707029527
540.8959526733773510.2080946532452980.104047326622649
550.8828166753500970.2343666492998050.117183324649903
560.8585492165961620.2829015668076770.141450783403838
570.830176060955050.33964787808990.16982393904495
580.8056864910529230.3886270178941540.194313508947077
590.9256563677048670.1486872645902650.0743436322951327
600.9100442019918370.1799115960163260.0899557980081628
610.897085852277420.2058282954451610.102914147722581
620.8815112983564150.2369774032871700.118488701643585
630.8609455740728680.2781088518542640.139054425927132
640.8423490037217780.3153019925564440.157650996278222
650.815305289831060.3693894203378790.184694710168940
660.7980382264572910.4039235470854180.201961773542709
670.881331634398690.2373367312026190.118668365601309
680.9084244021324880.1831511957350240.0915755978675119
690.8883408092445070.2233183815109850.111659190755493
700.880674485100660.2386510297986810.119325514899341
710.8578513624421070.2842972751157850.142148637557893
720.8918575363054090.2162849273891820.108142463694591
730.8759687342779820.2480625314440350.124031265722018
740.867721738604570.2645565227908610.132278261395431
750.840848052434430.318303895131140.15915194756557
760.8125522218479980.3748955563040050.187447778152002
770.7844498684807010.4311002630385980.215550131519299
780.7508740657349730.4982518685300540.249125934265027
790.7359443312183490.5281113375633020.264055668781651
800.7574742741723720.4850514516552560.242525725827628
810.9639583002446430.0720833995107130.0360416997553565
820.9615202125589590.07695957488208210.0384797874410411
830.9703766010278350.05924679794433060.0296233989721653
840.9727116352624020.05457672947519550.0272883647375977
850.9802350203296320.03952995934073570.0197649796703678
860.9741447668522050.05171046629558940.0258552331477947
870.971522305571270.056955388857460.02847769442873
880.9629318976822240.07413620463555260.0370681023177763
890.9534039803557780.09319203928844370.0465960196442218
900.9559959276737010.0880081446525980.044004072326299
910.9615519175176280.07689616496474420.0384480824823721
920.9727128504063840.05457429918723270.0272871495936164
930.9648639899378180.07027202012436330.0351360100621817
940.954112186270970.091775627458060.04588781372903
950.9414513926584350.1170972146831290.0585486073415647
960.961834493442050.07633101311590090.0381655065579505
970.9843128123418650.03137437531627020.0156871876581351
980.9793426144493670.04131477110126530.0206573855506326
990.9925893621190930.01482127576181410.00741063788090707
1000.9919030176761940.01619396464761130.00809698232380563
1010.9888992973524910.02220140529501790.0111007026475090
1020.9848998019199420.03020039616011510.0151001980800575
1030.9916489548293490.01670209034130290.00835104517065145
1040.9897508839842740.0204982320314510.0102491160157255
1050.9857083420697680.02858331586046480.0142916579302324
1060.9866315414182530.0267369171634940.013368458581747
1070.9938665102231540.01226697955369140.00613348977684568
1080.9947054435151490.01058911296970230.00529455648485116
1090.9921730727986750.01565385440265040.00782692720132518
1100.9886720019711020.02265599605779660.0113279980288983
1110.9845044214300630.03099115713987320.0154955785699366
1120.9791701550065390.04165968998692250.0208298449934613
1130.9751636968184870.04967260636302580.0248363031815129
1140.9745626041558480.05087479168830430.0254373958441522
1150.9698212733922150.06035745321556910.0301787266077846
1160.9625391173228570.07492176535428560.0374608826771428
1170.957352290742970.08529541851405950.0426477092570298
1180.972836094288680.05432781142264090.0271639057113204
1190.9863123007223030.02737539855539330.0136876992776967
1200.983656266942850.03268746611429970.0163437330571498
1210.977246050712110.04550789857578050.0227539492878903
1220.9703157799609790.05936844007804230.0296842200390212
1230.9580598207460890.08388035850782250.0419401792539112
1240.9812417265973760.03751654680524850.0187582734026242
1250.9757521610249390.04849567795012190.0242478389750609
1260.9639510713650130.07209785726997480.0360489286349874
1270.949130759394280.1017384812114380.0508692406057192
1280.9381776639149620.1236446721700770.0618223360850384
1290.9231054833738530.1537890332522940.0768945166261469
1300.9050116379566250.189976724086750.094988362043375
1310.8688048789130170.2623902421739650.131195121086983
1320.8283276472010640.3433447055978730.171672352798936
1330.8347513478947080.3304973042105840.165248652105292
1340.7991497693443680.4017004613112650.200850230655632
1350.7368142732400630.5263714535198740.263185726759937
1360.6723956961155750.6552086077688510.327604303884425
1370.6459223431671850.708155313665630.354077656832815
1380.5641763513083810.8716472973832380.435823648691619
1390.4725450688491170.9450901376982340.527454931150883
1400.3844843345671150.768968669134230.615515665432885
1410.9099753486458850.1800493027082310.0900246513541153
1420.8768515526320960.2462968947358080.123148447367904
1430.8706570749195970.2586858501608050.129342925080403
1440.7866679406672470.4266641186655060.213332059332753
1450.690515187497080.618969625005840.30948481250292
1460.5385351896925230.9229296206149540.461464810307477
1470.4299484199825760.8598968399651520.570051580017424


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level230.165467625899281NOK
10% type I error level460.330935251798561NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/105dgc1291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/105dgc1291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/1gcj11291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/1gcj11291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/2gcj11291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/2gcj11291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/3rmj41291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/3rmj41291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/4rmj41291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/4rmj41291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/5rmj41291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/5rmj41291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/61d061291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/61d061291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/7umz91291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/7umz91291305264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/8umz91291305264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129130517439i12ssse3ow4xe/8umz91291305264.ps (open in new window)


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