Home » date » 2010 » Nov » 12 »

mini tutorial

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 12 Nov 2010 10:00:34 +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/12/t1289556026fxdpe2hqveigs2p.htm/, Retrieved Fri, 12 Nov 2010 11:00:29 +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/12/t1289556026fxdpe2hqveigs2p.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 «
11 24 7 25 17 30 10 19 12 22 12 22 11 25 11 23 12 17 13 21 14 19 16 19 11 15 10 16 11 23 15 27 9 22 11 14 17 22 17 23 11 23 18 21 14 19 10 18 11 20 15 23 15 25 13 19 16 24 13 22 9 25 18 26 18 29 12 32 17 25 9 29 9 28 12 17 18 28 12 29 18 26 14 25 15 14 16 25 10 26 11 20 14 18 9 32 12 25 17 25 5 23 12 21 12 20 6 15 24 30 12 24 12 26 14 24 7 22 13 14 12 24 13 24 14 24 8 24 11 19 9 31 11 22 13 27 10 19 11 25 12 20 9 21 15 27 18 23 15 25 12 20 13 21 14 22 10 23 13 25 13 25 11 17 13 19 16 25 8 19 16 20 11 26 9 23 16 27 12 17 14 17 8 19 9 17 15 22 11 21 21 32 14 21 18 21 12 18 13 18 15 23 12 19 19 20 15 21 11 20 11 17 10 18 13 19 15 22 12 15 12 14 16 18 9 24 18 35 8 29 13 21 17 25 9 20 15 22 8 13 7 26 12 17 14 25 6 20 8 19 17 21 10 22 11 24 14 21 11 26 13 24 12 16 11 23 9 18 12 16 20 26 12 19 13 21 12 21 12 22 9 23 15 29 24 21 7 21 17 23 11 27 17 25 11 21 12 10 14 20 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
ParentalExpectations[t] = + 7.64931751839037 + 0.207693455751869`PersonalStandards `[t] + 0.00758410824477988t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.649317518390371.5480614.94122e-061e-06
`PersonalStandards `0.2076934557518690.0634473.27350.0013080.000654
t0.007584108244779880.0058111.30520.1937580.096879


Multiple Linear Regression - Regression Statistics
Multiple R0.263673688616257
R-squared0.0695238140685031
Adjusted R-squared0.0575946321975864
F-TEST (value)5.82804544526245
F-TEST (DF numerator)2
F-TEST (DF denominator)156
p-value0.00362251737467945
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.34479026414091
Sum Squared Residuals1745.26901813033


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11112.64154456468-1.64154456468001
2712.8568221286767-5.85682212867666
31713.90287351568083.09712648431922
41011.625829610655-1.625829610655
51212.2564940861554-0.256494086155389
61212.2640781944002-0.264078194400169
71112.8947426699006-1.89474266990056
81112.4869398666416-1.4869398666416
91211.24836324037520.751636759624836
101312.08672117162740.91327882837258
111411.67891836836852.32108163163154
121611.68650247661324.31349752338676
131110.86331276185050.136687238149455
141011.0785903258472-1.07859032584719
151112.5400286243551-1.54002862435506
161513.37838655560731.62161344439269
17912.3475033850927-3.34750338509275
181110.69353984732260.306460152677425
191712.36267160158234.63732839841769
201712.5779491655794.42205083442104
211112.5855332738237-1.58553327382374
221812.17773047056485.82226952943522
231411.76992766730582.23007233269418
241011.5698183197987-1.56981831979873
251111.9927893395472-0.992789339547249
261512.62345381504762.37654618495236
271513.04642483479621.95357516520385
281311.80784820852971.19215179147028
291612.85389959553383.14610040446616
301312.44609679227490.553903207725114
31913.0767612677753-4.07676126777527
321813.29203883177194.70796116822808
331813.92270330727234.07729669272769
341214.5533677827727-2.5533677827727
351713.10709770075443.89290229924561
36913.9454556320066-4.94545563200665
37913.7453462844996-4.74534628449956
381211.46830237947380.53169762052622
391813.76051450098914.23948549901088
401213.9757920649858-1.97579206498577
411813.36029580597494.63970419402506
421413.16018645846790.839813541532148
431510.88314255344214.11685744655793
441613.17535467495742.82464532504259
451013.3906322389541-3.39063223895406
461112.1520556126876-1.15205561268763
471411.74425280942872.25574719057133
48914.6595452981996-5.65954529819961
491213.2132752161813-1.21327521618131
501713.22085932442613.77914067557391
51512.8130565211671-7.81305652116713
521212.4052537179082-0.405253717908175
531212.2051443704011-0.205144370401085
54611.1742611998865-5.17426119988652
552414.29724714440939.70275285559067
561213.0586705181429-1.0586705181429
571213.4816415378914-1.48164153789142
581413.07383873463250.926161265367539
59712.6660359313735-5.6660359313735
601311.01207239360331.98792760639667
611213.0965910593668-1.0965910593668
621313.1041751676116-0.104175167611581
631413.11175927585640.88824072414364
64813.1193433841011-5.11934338410114
651112.0884602135866-1.08846021358658
66914.5883657908538-5.58836579085378
671112.7267087973317-1.72670879733174
681313.7727601843359-0.772760184335867
691012.1187966465657-2.11879664656569
701113.3725414893217-2.37254148932169
711212.3416583188071-0.341658318807123
72912.5569358828038-3.55693588280377
731513.81068072555981.18931927444023
741812.98749101079715.01250898920293
751513.41046203054561.58953796945441
761212.379578860031-0.379578860031023
771312.59485642402770.405143575972328
781412.81013398802431.18986601197568
791013.025411552021-3.02541155202097
801313.4483825717695-0.448382571769488
811313.4559666800143-0.455966680014267
821111.8020031422441-0.802003142244095
831312.22497416199260.775025838007387
841613.47871900474862.52128099525139
85812.2401423784822-4.24014237848217
861612.45541994247883.54458005752118
871113.7091647852348-2.70916478523482
88913.093668526224-4.09366852622399
891613.93202645747622.06797354252376
901211.86267600820230.137323991797666
911411.87026011644712.12973988355289
92812.2932311361956-4.29323113619563
93911.8854283329367-2.88542833293667
941512.93147971994082.0685202800592
951112.7313703724337-1.73137037243371
962115.0235824939495.97641750605095
971412.74653858892331.25346141107673
981812.75412269716815.24587730283195
991212.1386264381572-0.138626438157222
1001312.1462105464020.853789453597998
1011513.19226193340611.80773806659387
1021212.3690722186434-0.369072218643431
1031912.58434978264016.41565021735992
1041512.79962734663672.20037265336327
1051112.5995179991296-1.59951799912964
1061111.9840217401188-0.984021740118812
1071012.1992993041155-2.19929930411546
1081312.41457686811210.58542313188789
1091513.04524134361251.9547586563875
1101211.59897126159420.401028738405806
1111211.39886191408710.601138085912896
1121612.23721984533943.76278015466064
113913.4909646880954-4.49096468809536
1141815.78317680961072.2168231903893
115814.5446001833443-6.54460018334426
1161312.89063664557410.109363354425913
1171713.72899457682633.27100542317366
118912.6981114063118-3.69811140631178
1191513.12108242606031.8789175739397
120811.2594254325383-3.25942543253825
121713.9670244655573-6.96702446555733
1221212.1053674720353-0.10536747203529
1231413.7744992262950.225500773704977
124612.7436160557805-6.74361605578046
125812.5435067082734-4.54350670827337
1261712.96647772802194.03352227197811
1271013.1817552920185-3.18175529201854
1281113.6047263117671-2.60472631176705
1291412.98923005275621.01076994724377
1301114.0352814397604-3.03528143976035
1311313.6274786365014-0.627478636501393
1321211.97351509873120.0264849012687799
1331113.4349533972391-2.43495339723908
134912.4040702267245-3.40407022672452
1351211.99626742346560.00373257653444032
1362014.0807860892295.91921391077097
1371212.6345160072107-0.634516007210727
1381313.0574870269592-0.0574870269592447
1391213.065071135204-1.06507113520402
1401213.2803486992007-1.28034869920067
141913.4956262631973-4.49562626319732
1421514.74937110595330.250628894046683
1432413.095407568183110.9045924318169
144713.1029916764279-6.10299167642792
1451713.52596269617643.47403730382356
1461114.3643206274287-3.3643206274287
1471713.95651782416973.04348217583026
1481113.133328109407-2.13332810940704
1491210.85628420438131.14371579561874
1501412.94080287014471.05919712985527
1511114.1945477129007-3.19454771290073
1521613.78674490964182.21325509035823
1532114.83279629664596.16720370335411
1541412.7634458473721.23655415262802
1552013.80949723437616.19050276562389
1561312.77861406386150.221385936138456
1571113.8246654508657-2.82466545086567
1581513.41686264760671.58313735239329
1591912.38597947709216.61402052290785


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.4400228439640630.8800456879281270.559977156035937
70.4399645541936980.8799291083873960.560035445806302
80.3152716672558170.6305433345116340.684728332744183
90.2523208774423370.5046417548846730.747679122557663
100.1620287303755480.3240574607510960.837971269624452
110.1123691068254720.2247382136509450.887630893174528
120.09610561820033420.1922112364006680.903894381799666
130.06916510831825160.1383302166365030.930834891681748
140.07130986389877020.142619727797540.92869013610123
150.1002857340631270.2005714681262550.899714265936873
160.06525952850588380.1305190570117680.934740471494116
170.1048380229558250.209676045911650.895161977044175
180.07084500719534870.1416900143906970.929154992804651
190.0859590074096070.1719180148192140.914040992590393
200.07714622174950380.1542924434990080.922853778250496
210.0908930559253120.1817861118506240.909106944074688
220.1124649777953470.2249299555906950.887535022204653
230.08281042525800640.1656208505160130.917189574741994
240.09810787226999620.1962157445399920.901892127730004
250.09489088728834780.1897817745766960.905109112711652
260.07054191273725710.1410838254745140.929458087262743
270.0514463071287260.1028926142574520.948553692871274
280.0372991583483560.07459831669671190.962700841651644
290.0275256604490840.0550513208981680.972474339550916
300.02153053785215660.04306107570431330.978469462147843
310.0575627669121120.1151255338242240.942437233087888
320.05995895831737070.1199179166347410.94004104168263
330.05205207798202210.1041041559640440.947947922017978
340.07207278443380940.1441455688676190.92792721556619
350.06499146463235160.1299829292647030.935008535367648
360.1376683281225760.2753366562451530.862331671877424
370.20165569927840.40331139855680.7983443007216
380.1690676459433370.3381352918866740.830932354056663
390.182458473271990.364916946543980.81754152672801
400.1678676102758790.3357352205517570.832132389724121
410.1858031274846760.3716062549693520.814196872515324
420.1539434880362310.3078869760724620.846056511963769
430.1448021969419110.2896043938838210.85519780305809
440.1274522359763130.2549044719526270.872547764023687
450.154094565574950.30818913114990.84590543442505
460.1440775565902220.2881551131804430.855922443409779
470.123716702544010.247433405088020.87628329745599
480.1835592081235380.3671184162470760.816440791876462
490.1594092475078880.3188184950157750.840590752492112
500.1646354634513480.3292709269026970.835364536548652
510.3789313009333120.7578626018666230.621068699066688
520.3365939270117030.6731878540234060.663406072988297
530.2958790694217920.5917581388435840.704120930578208
540.3746433632002040.7492867264004080.625356636799796
550.7367889155397580.5264221689204840.263211084460242
560.700891497330580.598217005338840.29910850266942
570.665530412625210.6689391747495790.33446958737479
580.6273407574818340.7453184850363320.372659242518166
590.6945640375334670.6108719249330650.305435962466533
600.6728536947045980.6542926105908030.327146305295402
610.6317558701152530.7364882597694930.368244129884747
620.5873164918474030.8253670163051930.412683508152597
630.5483239761694830.9033520476610330.451676023830517
640.5908869379033240.8182261241933520.409113062096676
650.5465705843516330.9068588312967340.453429415648367
660.6012456016144390.7975087967711220.398754398385561
670.5610269271863810.8779461456272380.438973072813619
680.5157257802269230.9685484395461540.484274219773077
690.478892034631590.957784069263180.52110796536841
700.4462807554441250.892561510888250.553719244555875
710.4015664192310640.8031328384621280.598433580768936
720.3915276539351730.7830553078703450.608472346064827
730.3624933491917180.7249866983834350.637506650808282
740.4413364896719550.882672979343910.558663510328045
750.414167652255030.828335304510060.58583234774497
760.3700099893768210.7400199787536420.629990010623179
770.3305329749904060.6610659499808130.669467025009594
780.2999507402659590.5999014805319180.700049259734041
790.2828340633836310.5656681267672630.717165936616369
800.2455754013012130.4911508026024270.754424598698787
810.2111534260416080.4223068520832160.788846573958392
820.1797212566308140.3594425132616280.820278743369186
830.1549910563453430.3099821126906860.845008943654657
840.1494455229953860.2988910459907720.850554477004614
850.15605017531740.31210035063480.8439498246826
860.1679941584403830.3359883168807650.832005841559617
870.1526700948564360.3053401897128720.847329905143564
880.1579967418927350.315993483785470.842003258107265
890.1456389882747170.2912779765494340.854361011725283
900.1215394170955830.2430788341911670.878460582904417
910.1120135220941150.224027044188230.887986477905885
920.1188511534137320.2377023068274630.881148846586268
930.1084603802577350.2169207605154690.891539619742265
940.09860709019890020.19721418039780.9013929098011
950.0829537152982450.165907430596490.917046284701755
960.1362566779197640.2725133558395280.863743322080236
970.1180397328774690.2360794657549380.881960267122531
980.1666091727553640.3332183455107280.833390827244636
990.1393482040200390.2786964080400790.86065179597996
1000.118902287217730.2378045744354610.88109771278227
1010.1083731914585010.2167463829170010.8916268085415
1020.08830780510652370.1766156102130470.911692194893476
1030.1741324823842880.3482649647685760.825867517615712
1040.1722023132447040.3444046264894070.827797686755296
1050.146130762542980.2922615250859610.85386923745702
1060.1217495932943310.2434991865886620.878250406705669
1070.1028827313332540.2057654626665080.897117268666746
1080.08791435879175790.1758287175835160.912085641208242
1090.08592691433230840.1718538286646170.914073085667692
1100.0732560953591430.1465121907182860.926743904640857
1110.06417896534072980.128357930681460.93582103465927
1120.09446968012410920.1889393602482180.90553031987589
1130.09184409662219110.1836881932443820.908155903377809
1140.09801137638219570.1960227527643910.901988623617804
1150.1263270098644830.2526540197289650.873672990135517
1160.1099108219475810.2198216438951630.890089178052419
1170.1453617486795710.2907234973591420.85463825132043
1180.1287449427151530.2574898854303060.871255057284847
1190.1408647081312660.2817294162625320.859135291868734
1200.1207570336021130.2415140672042260.879242966397887
1210.1591284488136640.3182568976273280.840871551186336
1220.1375755239030490.2751510478060980.862424476096951
1230.1203009769559690.2406019539119390.87969902304403
1240.1565856135885920.3131712271771830.843414386411408
1250.152884421348020.3057688426960390.84711557865198
1260.2066781989691490.4133563979382980.793321801030851
1270.1779870463021950.3559740926043890.822012953697805
1280.1480149538329120.2960299076658250.851985046167088
1290.1294792702045860.2589585404091710.870520729795414
1300.1088070304237360.2176140608474710.891192969576264
1310.0837528131738810.1675056263477620.91624718682612
1320.06490378568836590.1298075713767320.935096214311634
1330.05072809114066240.1014561822813250.949271908859338
1340.0445527222394860.0891054444789720.955447277760514
1350.03184257905978310.06368515811956620.968157420940217
1360.06892563000430280.1378512600086060.931074369995697
1370.04978239181810390.09956478363620790.950217608181896
1380.0355616731555730.0711233463111460.964438326844427
1390.02425874627607520.04851749255215050.975741253723925
1400.01621749475500790.03243498951001580.983782505244992
1410.01930658728820410.03861317457640820.980693412711796
1420.0123735389379360.0247470778758720.987626461062064
1430.2688606914653930.5377213829307860.731139308534607
1440.3627723977231720.7255447954463450.637227602276828
1450.3916018887054760.7832037774109520.608398111294524
1460.371878034460890.7437560689217790.62812196553911
1470.3575794313290280.7151588626580550.642420568670972
1480.298961730769280.5979234615385590.70103826923072
1490.2187019628587990.4374039257175990.7812980371412
1500.1499663526447560.2999327052895120.850033647355244
1510.2074368859551550.414873771910310.792563114044845
1520.1317057813415640.2634115626831280.868294218658436
1530.1471383396088360.2942766792176710.852861660391164


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


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/1pari1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/1pari1289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/2pari1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/2pari1289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/3i18l1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/3i18l1289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/4i18l1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/4i18l1289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/5i18l1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/5i18l1289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/6ssqo1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/6ssqo1289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/73k791289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/73k791289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/83k791289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/83k791289556022.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/9wtou1289556022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556026fxdpe2hqveigs2p/9wtou1289556022.ps (open in new window)


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