Home » date » 2010 » Nov » 21 »

multiple regression

*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 15:21:47 +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/t12903529268e570phu358xke9.htm/, Retrieved Sun, 21 Nov 2010 16:22:17 +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/t12903529268e570phu358xke9.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PersonalStandards[t] = + 7.96604226904438 + 0.329539554855599ConcernoverMistakes[t] -0.359820551945857Doubtsaboutactions[t] + 0.188740986166915ParentalExpectations[t] + 0.0212197379128775ParentalCriticism[t] + 0.389772656468926Organization[t] -0.00400911738275325t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.966042269044382.3799023.34720.0010290.000514
ConcernoverMistakes0.3295395548555990.0556875.917700
Doubtsaboutactions-0.3598205519458570.107409-3.350.0010190.00051
ParentalExpectations0.1887409861669150.1013821.86170.0645790.032289
ParentalCriticism0.02121973791287750.1289020.16460.8694620.434731
Organization0.3897726564689260.0740015.267100
t-0.004009117382753250.006096-0.65760.5117740.255887


Multiple Linear Regression - Regression Statistics
Multiple R0.60733895095595
R-squared0.368860601348274
Adjusted R-squared0.343947204033075
F-TEST (value)14.8057126325052
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.75557354711964e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.41561362661657
Sum Squared Residuals1773.29529984198


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.29837151193660.70162848806344
22522.69420273952112.30579726047887
33024.51993511762995.4800648823701
41920.5858100273213-1.58581002732133
52220.8606942020931.13930579790698
62223.3332519599709-1.33325195997087
72522.83591023622922.16408976377076
82319.74336988699273.25663011300733
91719.0929718105762-2.09297181057616
102121.9165848536408-0.91658485364079
111923.0752389807623-4.07523898076229
121923.7342338570091-4.7342338570091
131523.4781157584617-8.47811575846172
141617.4275376017424-1.42753760174238
152319.71187995318813.28812004681191
162724.24671696668932.75328303331074
172221.26493260408910.73506739591091
181416.8815876921881-2.88158769218814
192224.3137744057991-2.31377440579911
202324.3015654059286-1.30156540592860
212321.83446478081931.16553521918072
222124.7512657180051-3.75126571800509
231922.6592344387476-3.65923443874758
241824.0700007888973-6.07000078889733
252023.3285829375965-3.32858293759652
262322.63250986818940.367490131810628
272523.52317920454451.47682079545548
281923.5348868834222-4.53488688342217
292424.0368676229268-0.0368676229268342
302221.75527855902670.244721440973291
312525.2818977678332-0.281897767833189
322623.41050786591732.58949213408273
332922.96308800726426.03691199273582
343225.34740314497026.65259685502984
352521.77431081758143.22568918241862
362924.56992733868234.43007266131771
372825.13546991000872.86453008999129
381717.2865701563726-0.286570156372563
392826.26407887142131.73592112857875
402923.10452091995245.89547908004764
412627.6235426441229-1.62354264412289
422523.60726712461721.39273287538279
431419.7541645453067-5.75416454530668
442522.24415413625602.75584586374397
452621.80015642823144.19984357176864
462020.3970947317837-0.397094731783665
471821.5400320626448-3.54003206264476
483224.79145327589877.2085467241013
492525.1274579247346-0.127457924734565
502521.84986915041863.15013084958137
512320.95560451537612.04439548462387
522122.2400886775895-1.24008867758950
532024.0944287438478-4.0944287438478
541516.6692490942680-1.66924909426796
553026.84371548902493.1562845109751
562425.3699497214645-1.36994972146448
572624.34769872755911.65230127244095
582421.80181215395352.19818784604654
592221.48493537405800.515064625942025
601415.8014939418454-1.80149394184544
612422.28545946067091.71454053932907
622422.97509712672411.02490287327593
632423.36141914569390.638580854306098
642420.01895285445823.98104714554175
651918.54966030444860.450339695551412
663126.7980088003254.20199119967499
672226.6350456957499-4.63504569574993
682721.52490537108125.47509462891882
691917.73664668890821.26335331109178
702522.30839424082142.69160575917856
712025.0183664969683-5.01836649696831
722121.5122305319075-0.512230531907487
732727.4773598801703-0.477359880170346
742324.4242323611766-1.42423236117657
752525.6977515557749-0.697751555774884
762022.2624291133288-2.26242911332878
772119.22913437582351.77086562417652
782222.4437103446138-0.443710344613850
792322.9533017172840.0466982827160052
802524.070344032940.92965596706001
812523.37291771943781.62708228056219
821723.7900811387154-6.79008113871542
831921.4341587206824-2.43415872068244
842523.92810000349191.07189999650813
851922.3070776295078-3.30707762950784
862023.1065004540058-3.10650045400576
872622.47616748190853.52383251809147
882320.69067935135822.30932064864181
892724.41042228635312.58957771364688
901720.8669235126350-3.86692351263496
911723.2984287511115-6.29842875111146
921920.0852863307246-1.08528633072460
931719.6773398225854-2.6773398225854
942221.99473627178970.00526372821031451
952123.4202526440523-2.42025264405233
963228.55097431401693.44902568598311
972124.613423111583-3.61342311158302
982124.2893290728572-3.28932907285723
991821.1906620081360-3.19066200813604
1001821.2458664145162-3.24586641451617
1012322.77086361308650.22913638691355
1021920.5588978025442-1.55889780254422
1032020.9401479280230-0.940147928023032
1042122.2205522470208-1.22055224702084
1052023.6787622428558-3.67876224285576
1061718.7709163550548-1.77091635505484
1071820.2409161325215-2.24091613252153
1081920.7160419870612-1.71604198706124
1092221.97980731386510.0201926861349317
1101518.6671601095724-3.66716010957239
1111418.7455905094174-4.74559050941741
1121826.4946006314453-8.49460063144532
1132421.28231736311642.71768263688361
1143523.485637923197311.5143620768027
1152919.02004255721539.97995744278472
1162121.8093283797562-0.809328379756237
1172520.4344756245494.56552437545098
1182018.36878055490931.63121944509066
1192223.0665946336186-1.06659463361856
1201316.7795645839044-3.7795645839044
1212623.06062438227552.93937561772454
1221716.78225014781840.217749852181626
1232519.96677470683505.03322529316504
1242020.537521377052-0.537521377052012
1251917.93252556598811.06747443401193
1262122.4367842714509-1.43678427145089
1272220.84824583727671.15175416272327
1282422.46563808909071.53436191090932
1292122.7498131103562-1.74981311035621
1302625.27239975514150.727600244858547
1312420.43564978097473.56435021902534
1321620.0909622078513-4.09096220785126
1332322.11295572776320.887044272236804
1341820.5712079278172-2.57120792781721
1351622.146357390973-6.146357390973
1362623.87317910072282.12682089927719
1371918.85850139057060.141498609429418
1382116.73830442975674.26169557024325
1392121.9427962002931-0.942796200293108
1402218.36430714089023.63569285910977
1412319.59591934378523.40408065621478
1422924.58339823696004.41660176304003
1432119.11610506355581.8838949364442
1442119.69358108669461.30641891330535
1452321.64439604941221.35560395058783
1462722.73824242140864.26175757859139
1472525.1592981257535-0.159298125753546
1482120.74524116860090.254758831399111
1491016.9258456985059-6.92584569850592
1502022.3860047677318-2.38600476773182
1512622.27483970910803.72516029089204
1522423.37079256891680.629207431083179
1532931.3326302350857-2.33263023508567
1541918.8070875428520.19291245714798
1552421.82352354600942.17647645399060
1561920.4705844558619-1.47058445586194
1572423.12668315506020.873316844939805
1582221.52311536804530.476884631954731
1591723.5082376477324-6.5082376477324


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.3051447322949120.6102894645898240.694855267705088
110.3473011954127330.6946023908254650.652698804587267
120.2507095454228780.5014190908457560.749290454577122
130.3442948766753230.6885897533506460.655705123324677
140.2639392160078860.5278784320157730.736060783992114
150.5328737315774650.934252536845070.467126268422535
160.4698705627897650.939741125579530.530129437210235
170.4929797695456170.9859595390912340.507020230454383
180.4664732403314050.932946480662810.533526759668595
190.3831949303952460.7663898607904910.616805069604754
200.4887115309540490.9774230619080980.511288469045951
210.5406729702826670.9186540594346660.459327029717333
220.4767067492909850.953413498581970.523293250709015
230.4161064625613410.8322129251226820.583893537438659
240.4177517265528380.8355034531056760.582248273447162
250.3626249882528930.7252499765057860.637375011747107
260.3222921749468790.6445843498937570.677707825053121
270.3059485337334730.6118970674669450.694051466266527
280.2834336663747250.566867332749450.716566333625275
290.2568160346382360.5136320692764710.743183965361764
300.2126062655387410.4252125310774810.78739373446126
310.1842313782705350.3684627565410710.815768621729465
320.248961586650290.497923173300580.75103841334971
330.4215850995212280.8431701990424570.578414900478772
340.6562484000634370.6875031998731270.343751599936563
350.6247781760676930.7504436478646140.375221823932307
360.6598449473386620.6803101053226760.340155052661338
370.6364684299410920.7270631401178160.363531570058908
380.6085727669250450.782854466149910.391427233074955
390.5672989260597780.8654021478804430.432701073940222
400.617406331102760.765187337794480.38259366889724
410.5962516170276150.807496765944770.403748382972385
420.5439021164388280.9121957671223430.456097883561172
430.6711497789278360.6577004421443280.328850221072164
440.6371213016072730.7257573967854530.362878698392727
450.6343906038294080.7312187923411840.365609396170592
460.5918461846772950.816307630645410.408153815322705
470.599888518109020.800222963781960.40011148189098
480.686502943430890.626994113138220.31349705656911
490.6511906417973290.6976187164053410.348809358202671
500.6318402789978940.7363194420042110.368159721002106
510.5937994922180660.8124010155638690.406200507781934
520.5623811859864790.8752376280270420.437618814013521
530.6114206514407530.7771586971184940.388579348559247
540.5813626258920060.8372747482159870.418637374107994
550.6186962037459880.7626075925080240.381303796254012
560.590886086038340.818227827923320.40911391396166
570.5486595991315760.9026808017368470.451340400868424
580.5146318859199350.970736228160130.485368114080065
590.4681611567968910.9363223135937810.531838843203109
600.4283448275223610.8566896550447210.57165517247764
610.3905833983766580.7811667967533170.609416601623342
620.3514216906724350.7028433813448690.648578309327565
630.3111095329842180.6222190659684370.688890467015782
640.3308969829957880.6617939659915750.669103017004212
650.2905633689201920.5811267378403850.709436631079808
660.3023174620863130.6046349241726260.697682537913687
670.3788306921100580.7576613842201150.621169307889943
680.4489743354900260.8979486709800530.551025664509974
690.4107237662347030.8214475324694060.589276233765297
700.3940750053608470.7881500107216940.605924994639153
710.4721031219225020.9442062438450050.527896878077498
720.4286827980441180.8573655960882350.571317201955882
730.3905751278238420.7811502556476850.609424872176157
740.3560603274574540.7121206549149070.643939672542546
750.3266880802097560.6533761604195130.673311919790244
760.3008870029247430.6017740058494860.699112997075257
770.2820832237670130.5641664475340250.717916776232987
780.2460283227579910.4920566455159810.753971677242009
790.2136140183607860.4272280367215720.786385981639214
800.1897617586588990.3795235173177980.8102382413411
810.1713883137159410.3427766274318820.828611686284059
820.2611402588100000.5222805176200010.73885974119
830.2369248755163030.4738497510326070.763075124483697
840.2104803199285810.4209606398571630.789519680071419
850.2058918678587650.411783735717530.794108132141235
860.1945777888700040.3891555777400090.805422211129996
870.2140754241891010.4281508483782030.785924575810899
880.209412061572560.418824123145120.79058793842744
890.2064562804700410.4129125609400810.79354371952996
900.2011589171330570.4023178342661150.798841082866943
910.2588088364192470.5176176728384950.741191163580753
920.2222892882000240.4445785764000470.777710711799976
930.1985491689985400.3970983379970790.80145083100146
940.1704379697745090.3408759395490180.829562030225491
950.1500106457393720.3000212914787430.849989354260628
960.1674661384603750.3349322769207490.832533861539625
970.1571727892441720.3143455784883440.842827210755828
980.1429186173726310.2858372347452620.857081382627369
990.1290954630129430.2581909260258860.870904536987057
1000.1180507489571740.2361014979143490.881949251042826
1010.09750658419828190.1950131683965640.902493415801718
1020.07902519363739920.1580503872747980.9209748063626
1030.06283762009294840.1256752401858970.937162379907052
1040.04984855287881420.09969710575762840.950151447121186
1050.05094501777337260.1018900355467450.949054982226627
1060.04109537333602130.08219074667204260.958904626663979
1070.03627715224526530.07255430449053060.963722847754735
1080.03343709088586460.06687418177172910.966562909114135
1090.02662740746983810.05325481493967630.973372592530162
1100.02756617061127040.05513234122254080.97243382938873
1110.03857565824763300.07715131649526590.961424341752367
1120.2552142767876180.5104285535752350.744785723212382
1130.2690892318182090.5381784636364180.730910768181791
1140.6377199850075950.7245600299848110.362280014992406
1150.8833281573612060.2333436852775880.116671842638794
1160.8549621203791240.2900757592417530.145037879620876
1170.883004261319170.2339914773616600.116995738680830
1180.8578175403907610.2843649192184770.142182459609239
1190.8386303898667660.3227392202664680.161369610133234
1200.8898202554576160.2203594890847680.110179744542384
1210.8662363754184910.2675272491630180.133763624581509
1220.8355907387856680.3288185224286650.164409261214332
1230.844403208440750.3111935831184990.155596791559249
1240.8054841385822720.3890317228354560.194515861417728
1250.774778235809550.4504435283809010.225221764190450
1260.7390629410084360.5218741179831270.260937058991564
1270.6942201626701290.6115596746597430.305779837329872
1280.6451874940326520.7096250119346960.354812505967348
1290.5923266275604720.8153467448790560.407673372439528
1300.5432383169692010.9135233660615980.456761683030799
1310.5167643509920050.966471298015990.483235649007995
1320.5417899727504930.9164200544990130.458210027249507
1330.4777963333875270.9555926667750550.522203666612473
1340.4492012310281150.898402462056230.550798768971885
1350.7466912438374810.5066175123250380.253308756162519
1360.685006008837380.6299879823252410.314993991162620
1370.6744818654120140.6510362691759730.325518134587986
1380.6243874791220840.7512250417558330.375612520877916
1390.6506277308366930.6987445383266140.349372269163307
1400.5797244192121190.8405511615757620.420275580787881
1410.5216738583358510.9566522833282980.478326141664149
1420.4828077063851970.9656154127703940.517192293614803
1430.5083982772405070.9832034455189870.491601722759493
1440.4520728532428260.9041457064856520.547927146757174
1450.3475505515068440.6951011030136880.652449448493156
1460.3131904900579390.6263809801158780.686809509942061
1470.2723325554926660.5446651109853320.727667444507334
1480.1748781587514660.3497563175029310.825121841248534
1490.3474358726632270.6948717453264540.652564127336773


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


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/1bl9n1290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/1bl9n1290352896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/2md981290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/2md981290352896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/3md981290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/3md981290352896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/4md981290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/4md981290352896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/5f4qt1290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/5f4qt1290352896.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/8pdpw1290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/8pdpw1290352896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/9im6h1290352896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t12903529268e570phu358xke9/9im6h1290352896.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by