Home » date » 2010 » Dec » 05 »

Paper: Multiple Linear Regression + tijd

*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, 05 Dec 2010 12:22:18 +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/05/t1291551706x1dj1frkfqw96ae.htm/, Retrieved Sun, 05 Dec 2010 13:21:56 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae.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 «
9 13 14 13 3 9 12 8 13 5 9 15 12 16 6 9 12 7 12 6 9 10 10 11 5 9 12 7 12 3 9 15 16 18 8 9 9 11 11 4 9 12 14 14 4 9 11 6 9 4 9 11 16 14 6 9 11 11 12 6 9 15 16 11 5 9 7 12 12 4 9 11 7 13 6 9 11 13 11 4 9 10 11 12 6 9 14 15 16 6 9 10 7 9 4 9 6 9 11 4 9 11 7 13 2 9 15 14 15 7 9 11 15 10 5 9 12 7 11 4 9 14 15 13 6 9 15 17 16 6 9 9 15 15 7 9 13 14 14 5 9 13 14 14 6 9 16 8 14 4 9 13 8 8 4 9 12 14 13 7 9 14 14 15 7 9 11 8 13 4 9 9 11 11 4 9 16 16 15 6 9 12 10 15 6 9 10 8 9 5 9 13 14 13 6 9 16 16 16 7 9 14 13 13 6 9 15 5 11 3 9 5 8 12 3 9 8 10 12 4 9 11 8 12 6 9 16 13 14 7 9 17 15 14 5 9 9 6 8 4 9 9 12 13 5 9 13 16 16 6 9 10 5 13 6 10 6 15 11 6 10 12 12 14 5 10 8 8 13 4 10 14 13 13 5 10 12 14 13 5 10 11 12 12 4 10 16 16 16 6 10 8 10 15 2 10 15 15 15 8 10 7 8 12 3 10 16 16 14 6 10 14 19 12 6 10 16 14 15 6 10 9 6 12 5 10 14 13 13 5 10 11 15 12 6 10 13 7 12 5 10 15 13 13 6 10 5 4 5 2 10 15 14 13 5 10 13 13 13 5 10 11 11 14 5 10 11 14 17 6 10 12 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 3.49514166391521 -0.240396339657892Tijd[t] + 0.242393786561951KnowingPeople[t] + 0.365785984054008Liked[t] + 0.62160080454706Celebrity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.495141663915213.539260.98750.324960.16248
Tijd-0.2403963396578920.363679-0.6610.5096110.254806
KnowingPeople0.2423937865619510.0614633.94380.0001226.1e-05
Liked0.3657859840540080.09713.76710.0002360.000118
Celebrity0.621600804547060.1564273.97380.0001095.5e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.705290485738547
R-squared0.497434669273315
Adjusted R-squared0.484121680379893
F-TEST (value)37.3646123538115
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10922287268072
Sum Squared Residuals671.771990122567


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.34510782520481.65489217479524
21211.13394671492720.866053285072809
31513.82248061788411.17751938211590
41211.14736774885830.852632251141696
51010.8871623199431-0.88716231994308
6129.282565335217122.71743466478288
71516.7668293413340-1.76682934133403
8910.5079553019580-1.50795530195797
91212.3324946138059-0.332494613805853
10118.56441440104022.4355855989598
111114.0604837960239-3.06048379602387
121112.1169428951061-1.11694289510610
131512.34152503931482.65847496068521
14711.1161350725739-4.11613507257393
151111.5131537329123-0.513153732912306
161110.99274287508190.00725712491812329
171012.1169428951061-2.11694289510610
181414.5496619775699-0.549661977569941
19108.806808187602151.19319181239785
20610.0231677288341-4.02316772883407
21119.026750514724071.97324948527593
221514.56308301150100.436916988498959
231111.7333452686988-0.73334526869883
24129.538380155710172.46161984428983
251413.45230402540790.547695974592085
261515.0344495506938-0.034449550693843
27914.805476798063-5.80547679806299
281312.95409541835290.0459045816470873
291313.5756962229000-0.575696222899973
301610.87813189443415.12186810556585
31138.68341599011014.31658400988990
321213.8315110433930-1.83151104339302
331414.5630830115010-0.563083011501041
341110.51234591038010.487654089619862
35910.5079553019580-1.50795530195797
361614.42626978007791.57373021992212
371212.9719070607062-0.971907060706176
38109.670802778711160.329197221288836
391313.2099102388460-0.209910238845964
401615.41365656867900.586343431321049
411412.9675164522841.03248354771599
42158.43199177803926.56800822196079
4359.52495912177907-4.52495912177907
44810.6313474994500-2.63134749945003
451111.3897615354202-0.389761535420249
461613.95490324088512.04509675911492
471713.19648920491493.80351079508514
4898.19862841698620.801371583013807
49912.103521861175-3.103521861175
501314.7920557641319-1.79205576413189
511011.0283661597884-1.02836615978840
52612.480335717642-6.48033571764201
531212.2289115055711-0.228911505571119
54810.2719495707222-2.27194957072225
551412.10551930807911.89448069192094
561212.3479130946410-0.347913094641013
571110.87573873291600.124261267083957
581614.5516594244741.448340575526
59810.2451075028600-2.24510750286005
601515.1866812629522-0.186681262952160
6179.28456278212118-2.28456278212118
621613.8200874563662.17991254363402
631413.81569684794380.18430315205618
641613.70108586729612.29891413270391
65910.0429768180914-1.04297681809140
661412.10551930807911.89448069192094
671112.8461217016960-1.84612170169602
681310.28537060465332.71462939534665
691512.72712011262612.27287988737388
7055.13288494294826-0.132884942948255
711512.34791309464102.65208690535899
721312.10551930807910.894480691920938
731111.9865177190092-0.986517719009168
741114.4326578354041-3.43265783540411
751212.4847263260642-0.484726326064171
761213.2119076857500-1.21190768575002
771211.9821271105870.0178728894129951
781212.1055193080791-0.105519308079062
791410.63773555477633.36226444522374
8067.81238842039621-1.81238842039621
8179.66376980010629-2.66376980010629
821412.36133412857211.63866587142789
831413.82447806478810.175521935211853
841011.2549457509012-1.25494575090115
85138.557381422435334.44261857756467
861212.1189403420102-0.118940342010162
8799.17459161856022-0.174591618560221
881212.3523037030632-0.352303703063177
891614.94428747639021.05571252360979
901010.1485573732302-0.148557373230189
911413.09729670510230.902703294897706
921013.4586920807341-3.45869208073414
931615.17326022902110.82673977097894
941513.45430147231201.54569852768802
951211.25494575090120.745054249098849
96109.540377602614230.45962239738577
97810.5455760335686-2.54557603356856
9888.31059702745121-0.310597027451210
991113.0794850627490-2.07948506274903
1001312.24233253950220.75766746049778
1011615.4156540155830.584345984416989
1021614.56508045840511.4349195415949
1031415.5256251791440-1.52562517914397
104118.923167406489332.07683259351067
10546.9618148632183-2.96181486321830
1061414.3404983141964-0.340498314196413
107910.3775301258610-1.37753012586104
1081415.1866812629522-1.18668126295216
109810.5009223233531-2.5009223233531
110811.2459153253922-3.24591532539222
1111112.2289115055711-1.22891150557112
1121213.8335084902971-1.83350849029708
1131111.2727573932544-0.272757393254415
1141413.45869208073410.541307919265861
1151514.20368508277330.796314917226744
1161613.33529988324212.66470011675792
1171613.33529988324212.66470011675792
1181112.6125091319784-1.61250913197839
1191413.57769366980400.422306330195967
1201410.87573873291603.12426126708396
1211211.24152471697010.758475283029949
1221412.46691468371091.53308531628909
123810.1485573732302-2.14855737323019
1241313.5776936698040-0.577693669804033
1251613.57769366980402.42230633019597
1261210.77454878619941.22545121380059
1271615.31007346044420.689926539555782
1281213.2119076857500-1.21190768575002
1291111.7441239324472-0.744123932447217
13046.49508814111227-2.49508814111227
1311615.31007346044420.689926539555782
1321512.48472632606422.51527367393583
1331011.3693075228843-1.36930752288427
1341312.97390450761020.0260954923897635
1351513.09290609668011.90709390331987
1361210.51434335728421.48565664271580
1371413.57769366980400.422306330195967
138710.4965317149309-3.49653171493093
1391913.94347965385805.05652034614196
1401212.7136990786950-0.713699078695022
1411212.2110998632179-0.211099863217856
1421313.3352998832421-0.335299883242082
1431512.82367024225602.17632975774402
14488.1962352554681-0.196235255468090
1451210.75673714384611.24326285615385
1461010.5455760335686-0.545576033568562
147811.2593363593233-3.25933635932331
1481013.9434796538580-3.94347965385804
1491513.8200874563661.17991254363402
1501614.45949990326631.54050009673369
1511313.1063271306112-0.106327130611230
1521614.93086644245911.06913355754089
153910.1485573732302-1.14855737323019
1541413.21629829417220.783701705827813
1551412.60372791513411.39627208486594
1561210.12171530536801.87828469463201


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.1275149572627650.2550299145255300.872485042737235
90.06353130006594710.1270626001318940.936468699934053
100.08477512208235770.1695502441647150.915224877917642
110.04338532980955460.08677065961910930.956614670190445
120.01961127082802250.0392225416560450.980388729171978
130.3465716306215250.693143261243050.653428369378475
140.6967396025812050.6065207948375890.303260397418795
150.6215007253830420.7569985492339160.378499274616958
160.5309860573130980.9380278853738050.469013942686902
170.4879259860377190.9758519720754370.512074013962281
180.4066836869244120.8133673738488250.593316313075588
190.3324685262301370.6649370524602730.667531473769863
200.599799771503740.800400456992520.40020022849626
210.5316365742899750.936726851420050.468363425710025
220.4989665906809760.9979331813619510.501033409319024
230.4297682693526710.8595365387053430.570231730647329
240.4164511487005410.8329022974010830.583548851299459
250.3833000930235950.766600186047190.616699906976405
260.3279954562988150.655990912597630.672004543701185
270.5989338988084720.8021322023830570.401066101191528
280.5382373366262640.9235253267474710.461762663373736
290.4786154445468230.9572308890936450.521384555453177
300.6487661983535750.702467603292850.351233801646425
310.7730778363494610.4538443273010790.226922163650539
320.7361237224116290.5277525551767420.263876277588371
330.694208777569020.611582444861960.30579122243098
340.6492218049057540.7015563901884930.350778195094246
350.638718227504690.722563544990620.36128177249531
360.6573037293950.685392541210.342696270605
370.6161636255807460.7676727488385090.383836374419254
380.5617739394531820.8764521210936370.438226060546818
390.5117227733966460.9765544532067080.488277226603354
400.4936747001821790.9873494003643580.506325299817821
410.4662137917917830.9324275835835650.533786208208217
420.7534774468757550.4930451062484890.246522553124245
430.9291151615306060.1417696769387880.0708848384693939
440.9435235970976110.1129528058047770.0564764029023886
450.9284635890764740.1430728218470520.0715364109235262
460.9346052315710960.1307895368578080.065394768428904
470.9697340250869220.06053194982615680.0302659749130784
480.967009976441790.06598004711642070.0329900235582103
490.970974364461390.05805127107721960.0290256355386098
500.964146485888550.07170702822289960.0358535141114498
510.9573110574936350.08537788501273030.0426889425063651
520.9846797989436320.03064040211273690.0153202010563684
530.9877279118146270.02454417637074530.0122720881853727
540.9851445033038120.02971099339237610.0148554966961881
550.9912255000853540.01754899982929230.00877449991464617
560.989001851904360.02199629619128140.0109981480956407
570.9856300626338280.02873987473234330.0143699373661716
580.9862785673896980.02744286522060480.0137214326103024
590.987690752332530.02461849533493870.0123092476674693
600.9854928729046740.02901425419065280.0145071270953264
610.985254084626630.02949183074674020.0147459153733701
620.9884509823610080.0230980352779830.0115490176389915
630.9858412443511230.02831751129775350.0141587556488767
640.9876782979979420.02464340400411540.0123217020020577
650.9841766385571920.03164672288561530.0158233614428077
660.983790986119050.03241802776190160.0162090138809508
670.9825650273993570.03486994520128650.0174349726006433
680.9863427953458180.02731440930836310.0136572046541815
690.9871929625597340.02561407488053270.0128070374402664
700.9833437488718270.03331250225634620.0166562511281731
710.9858948848065720.02821023038685540.0141051151934277
720.981947576048180.03610484790364090.0180524239518204
730.9775845219534220.04483095609315680.0224154780465784
740.9868841476373980.02623170472520460.0131158523626023
750.9826136056666120.03477278866677650.0173863943333883
760.9793503780796720.04129924384065590.0206496219203280
770.9728308172230860.05433836555382870.0271691827769143
780.9646435819921830.0707128360156330.0353564180078165
790.9784336347259520.04313273054809580.0215663652740479
800.976942917315980.04611416536803950.0230570826840197
810.9797171480569420.04056570388611640.0202828519430582
820.9774498980545040.04510020389099260.0225501019454963
830.9704187815154120.05916243696917540.0295812184845877
840.9647297587043680.07054048259126360.0352702412956318
850.991122696849520.01775460630096170.00887730315048086
860.9878421745794490.02431565084110290.0121578254205514
870.9837183780020190.03256324399596240.0162816219979812
880.9782744732975970.04345105340480540.0217255267024027
890.9729233648110180.05415327037796310.0270766351889815
900.964754481924640.07049103615072150.0352455180753608
910.9570652977459020.0858694045081960.042934702254098
920.9758310500079020.04833789998419510.0241689499920975
930.969205790209480.06158841958104130.0307942097905206
940.9639390167151540.07212196656969150.0360609832848457
950.9549825181978910.0900349636042170.0450174818021086
960.9450750364726160.1098499270547670.0549249635273837
970.9460726828906160.1078546342187690.0539273171093843
980.932651953461620.1346960930767610.0673480465383807
990.9359255482815810.1281489034368380.0640744517184188
1000.9214768552277340.1570462895445330.0785231447722663
1010.903705841388130.1925883172237400.0962941586118698
1020.8880967875491330.2238064249017340.111903212450867
1030.8939023652934110.2121952694131770.106097634706589
1040.9213019472310.1573961055380000.0786980527689998
1050.9205078767083370.1589842465833250.0794921232916627
1060.9005216005718260.1989567988563490.0994783994281743
1070.8835894426589970.2328211146820070.116410557341003
1080.8825346101099420.2349307797801150.117465389890058
1090.8860361460400420.2279277079199160.113963853959958
1100.9164465896825320.1671068206349350.0835534103174675
1110.9060606780894560.1878786438210880.0939393219105441
1120.916732749413090.1665345011738200.0832672505869099
1130.8938313873201110.2123372253597780.106168612679889
1140.8675458529044920.2649082941910170.132454147095508
1150.8375362788297720.3249274423404560.162463721170228
1160.843194908883620.3136101822327620.156805091116381
1170.8497630588304430.3004738823391130.150236941169556
1180.8366676645969080.3266646708061850.163332335403092
1190.8000007246586080.3999985506827850.199999275341392
1200.8548033277229280.2903933445541440.145196672277072
1210.8239762746796790.3520474506406420.176023725320321
1220.799281082983580.4014378340328420.200718917016421
1230.7883735981926520.4232528036146960.211626401807348
1240.7559064501223050.4881870997553890.244093549877695
1250.7508071589490710.4983856821018580.249192841050929
1260.7287374544023690.5425250911952620.271262545597631
1270.6755508494949460.6488983010101080.324449150505054
1280.6572441104237030.6855117791525940.342755889576297
1290.6013296817969720.7973406364060550.398670318203028
1300.5618664957881930.8762670084236130.438133504211807
1310.497790250608640.995580501217280.50220974939136
1320.5059264578954980.9881470842090050.494073542104502
1330.4597104248689030.9194208497378050.540289575131097
1340.3906443250902960.7812886501805930.609355674909704
1350.35498248391980.70996496783960.6450175160802
1360.3316706770238140.6633413540476280.668329322976186
1370.2649567204770790.5299134409541570.735043279522921
1380.3813062220636380.7626124441272760.618693777936362
1390.676630216746440.646739566507120.32336978325356
1400.6130693296034740.7738613407930510.386930670396526
1410.5433174124681450.913365175063710.456682587531855
1420.4561549937042110.9123099874084230.543845006295789
1430.4054717038769340.8109434077538680.594528296123066
1440.3125519907424690.6251039814849370.687448009257531
1450.2488398344987550.497679668997510.751160165501245
1460.1761232823276600.3522465646553190.82387671767234
1470.2090210682955750.4180421365911510.790978931704425
1480.8481226529627860.3037546940744270.151877347037214


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level350.24822695035461NOK
10% type I error level510.361702127659574NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/10asmj1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/10asmj1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/1397p1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/1397p1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/2397p1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/2397p1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/3397p1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/3397p1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/4e06a1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/4e06a1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/5e06a1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/5e06a1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/6prnd1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/6prnd1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/7ij4y1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/7ij4y1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/8ij4y1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/8ij4y1291551726.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/9ij4y1291551726.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291551706x1dj1frkfqw96ae/9ij4y1291551726.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by