Home » date » 2010 » Nov » 23 »

WS7 - Multiple regression model (incl. day) (incl. trend)

*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: Tue, 23 Nov 2010 20:52:04 +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/23/t1290545502az8zgx85nnzv49c.htm/, Retrieved Tue, 23 Nov 2010 21:51:53 +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/23/t1290545502az8zgx85nnzv49c.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 «
13 13 14 13 3 2 1 12 12 8 13 5 1 1 15 10 12 16 6 0 1 12 9 7 12 6 3 1 10 10 10 11 5 3 1 12 12 7 12 3 1 1 15 13 16 18 8 3 1 9 12 11 11 4 1 1 12 12 14 14 4 4 1 11 6 6 9 4 0 1 11 5 16 14 6 3 1 11 12 11 12 6 2 1 15 11 16 11 5 4 1 7 14 12 12 4 3 1 11 14 7 13 6 1 1 11 12 13 11 4 1 1 10 12 11 12 6 2 1 14 11 15 16 6 3 1 10 11 7 9 4 1 2 6 7 9 11 4 1 2 11 9 7 13 2 2 2 15 11 14 15 7 3 2 11 11 15 10 5 4 2 12 12 7 11 4 2 2 14 12 15 13 6 1 2 15 11 17 16 6 2 2 9 11 15 15 7 2 2 13 8 14 14 5 4 2 13 9 14 14 6 2 2 16 12 8 14 4 3 2 13 10 8 8 4 3 2 12 10 14 13 7 3 2 14 12 14 15 7 4 2 11 8 8 13 4 2 3 9 12 11 11 4 2 3 16 11 16 15 6 4 3 12 12 10 15 6 3 3 10 7 8 9 5 4 3 13 11 14 13 6 2 3 16 11 16 16 7 5 3 14 12 13 13 6 3 3 15 9 5 11 3 1 3 5 15 8 12 3 1 3 8 11 10 12 4 1 3 11 11 8 12 6 2 3 16 11 13 14 7 3 3 17 11 15 14 5 9 3 9 15 6 8 4 0 3 9 11 12 13 5 0 3 13 12 16 16 6 2 3 10 12 5 13 6 2 3 6 9 15 11 6 3 4 12 12 12 14 5 1 4 8 12 8 13 4 2 4 14 13 13 13 5 0 4 12 11 14 13 5 5 4 11 9 1 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
Popularity[t] = -0.0931214533089994 + 0.114501138766228FindingFriends[t] + 0.209268449968476KnowingPeople[t] + 0.358378633517791Liked[t] + 0.6165874587436Celebrity[t] + 0.213464699493470Sum_friends[t] + 0.104200617441747Day[t] -0.00667926178074984t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.09312145330899941.454348-0.0640.9490330.474516
FindingFriends0.1145011387662280.0972561.17730.2409570.120479
KnowingPeople0.2092684499684760.0641123.26410.0013640.000682
Liked0.3583786335177910.0973793.68030.0003260.000163
Celebrity0.61658745874360.1574413.91630.0001376.8e-05
Sum_friends0.2134646994934700.1207261.76820.0790930.039547
Day0.1042006174417470.1953410.53340.5945370.297269
t-0.006679261780749840.011864-0.5630.57430.28715


Multiple Linear Regression - Regression Statistics
Multiple R0.714498470884513
R-squared0.510508064896307
Adjusted R-squared0.487356419317078
F-TEST (value)22.050616797379
F-TEST (DF numerator)7
F-TEST (DF denominator)148
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10259968841939
Sum Squared Residuals654.296966561714


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.35828701682061.64171298317940
21211.00120613445650.998793865543455
31513.08085705482071.91914294517927
41211.12021396884060.879786031159374
51010.8808751034701-0.880875103470149
6129.173667086360092.82633291363991
71516.8250435068735-1.82504350687353
8910.2555911878983-1.25559118789830
91212.5922472750568-0.592247275056757
10117.5786616153683.421338384632
111113.2156278980623-2.21562789806234
121112.0338923912738-1.03389239127376
131512.41101754729472.58898245270529
14711.4390943772195-4.43909437721946
151111.5506970176144-0.550697017614382
161110.62069399358920.37930600641075
171012.00049608237-2.00049608237001
181414.3633687152616-0.363368715261566
19108.617987720076081.38201227992392
2069.28859807020295-3.28859807020295
21118.789431235059562.21056876494044
221514.48979266083760.510207339162353
231111.8807784634427-0.880778463442691
24129.629314516467612.37068548353239
251413.03325033946400.96674966053602
261514.61920743890080.380792561099205
27914.4522001024089-5.4522001024089
281312.72812482234290.271875177657057
291313.0256047590851-0.0256047590850806
301611.08710799579844.91289200420157
31138.701154655378484.29884534462152
321213.5917416372283-1.59174163722834
331414.7442866195091-0.744286619509097
341110.1347436780410.865256321958994
35910.4971170541950-1.49711705419502
361614.51589775403571.48410224596428
371213.1546442317169-1.15464423171687
38109.603527815811160.396472184188844
391312.9336364027340.0663635972660046
401615.67761149866760.322388501332421
411413.03897526746370.961024732536281
42158.021195947383166.97880405261684
4359.687707501623-4.6877075016230
44810.2581480434579-2.25814804345788
451111.2795714987209-0.279571498720851
461613.86604391205512.13395608794487
471714.32551482968502.67448517031504
4898.205382517961260.794617482038739
49911.404790027259-2.40479002725901
501314.4683384624023-1.4683384624023
511011.0845703504149-1.08457035041494
52612.4279802219199-6.4279802219199
531212.1686180693552-0.168618069355242
54810.5633636149327-2.56336361493267
551411.90718580151722.09281419848281
561212.9480962096398-0.948096209639807
571110.67851757964780.321482420352153
581614.60253096828631.39746903171370
59810.5310501162415-2.53105011624149
601514.62984375828430.370156241715689
6179.11471329121909-2.11471329121909
621614.20256007042641.79743992957359
631413.12303137673640.876968623263592
641613.37414804319912.62585195680089
65910.4129896433215-1.41298964332153
661412.14614218214961.85385781785035
671113.2431380445186-2.2431380445186
681310.30532962576602.69467037423397
691513.27382187197971.72617812802031
7055.85242053591145-0.852420535911449
711512.95210790037032.04789209962970
721312.63719662789380.362803372106162
731112.4558579609277-1.45585796092770
741114.1962017145182-3.19620171451821
751212.7954755737943-0.795475573794256
761213.4321392399579-1.43213923995792
771212.3557265747135-0.355726574713532
781211.92565180265100.0743481973490444
791410.85896132137353.14103867862654
8067.91196964212172-1.91196964212172
8179.70611238131443-2.70611238131443
821412.35507070220831.64492929779175
831414.1409469688363-0.140946968836333
841011.1241982765507-1.1241982765507
85139.071200374497823.92879962550218
861212.2801990780000-0.280199077999961
8799.36171217173182-0.361712171731819
881211.93331433112410.0666856688758652
891614.86220735054451.13779264945548
901010.4811648028871-0.481164802887096
911413.13697874313970.863021256860287
921013.6131908972401-3.61319089724007
931615.53724891588580.462751084114163
941513.39637931778221.60362068221781
951211.48289285266390.517107147336102
96109.347549189002150.652450810997852
97810.0946873175326-2.09468731753260
9888.69138666096395-0.691386660963952
991112.6021489402075-1.60214894020754
1001312.53896377478780.461036225212233
1011615.57858213284210.421417867157914
1021614.90948847637281.09051152362718
1031415.3685027353908-1.36850273539084
104118.964406674597192.03559332540281
10547.05673560355099-3.05673560355099
1061414.7124317109416-0.712431710941592
107910.517644906001-1.51764490600101
1081415.2622351436140-1.26223514361397
109810.2264671670019-2.22646716700188
110810.6419821312154-2.64198213121536
1111111.8648204608645-0.864820460864535
1121213.1317405554262-1.13174055542617
1131111.0788660907255-0.078866090725452
1141413.25801949528460.741980504715392
1151514.44396727478370.556032725216287
1161613.40797904839452.59202095160549
1171612.87540682689963.12459317310043
1181112.7568035313305-1.75680353133049
1191414.1386402507739-0.138640250773902
1201410.79932821731833.20067178268169
1211211.47899342731500.521006572684956
1221412.45309565186781.54690434813222
123810.7918791805510-2.79187918055104
1241314.0062803811429-1.00628038114291
1251613.88509998059592.11490001940407
1261210.52455841238141.47544158761858
1271615.39894049209530.601059507904733
1281212.652824763762-0.652824763762011
1291111.3105192708351-0.310519270835101
13045.839463016272-1.83946301627200
1311616.0126175434527-0.0126175434526787
1321512.52419532644782.47580467355223
1331011.2099749876386-1.20997498763857
1341313.8877219959662-0.88772199596624
1351512.97284106386452.02715893613546
1361210.32406975171141.67593024828857
1371413.47698300096720.523016999032764
138710.2770195532042-3.27701955320419
1391913.82724016763805.17275983236197
1401212.8342534850819-0.8342534850819
1411211.74525207126250.254747928737472
1421313.2395552988095-0.239555298809516
1431512.28952898759022.71047101240979
14488.70031081069254-0.700310810692544
1451210.79089016258841.20910983741163
1461010.6628115577567-0.662811557756726
147811.1204961318578-3.12049613185784
1481014.5375596268969-4.53755962689691
1491513.71030092700851.28969907299154
1501614.03640907408641.96359092591364
1511313.3264786636824-0.326478663682361
1521615.13724179112660.862758208873362
153910.2535821517534-1.25358215175342
1541413.49544731813940.504552681860618
1551413.58706429298890.412935707011149
1561210.56259301488341.43740698511655


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2319584747297550.4639169494595110.768041525270245
120.1449268784994100.2898537569988190.85507312150059
130.6768478263210990.6463043473578020.323152173678901
140.8073181993361370.3853636013277260.192681800663863
150.7427820218024780.5144359563950440.257217978197522
160.6564143692218070.6871712615563850.343585630778193
170.5691292595775270.8617414808449470.430870740422473
180.5435395227044080.9129209545911840.456460477295592
190.453608716939860.907217433879720.54639128306014
200.5914348900930330.8171302198139350.408565109906967
210.6103375666608220.7793248666783550.389662433339178
220.6363470471424890.7273059057150230.363652952857511
230.5644095754790910.8711808490418180.435590424520909
240.5674442513545720.8651114972908560.432555748645428
250.5218915715124870.9562168569750260.478108428487513
260.4564734427289110.9129468854578230.543526557271089
270.6938932297488370.6122135405023260.306106770251163
280.6504963336102830.6990073327794330.349503666389717
290.5966517173438250.806696565312350.403348282656175
300.7587721327316230.4824557345367550.241227867268377
310.8366734460293590.3266531079412820.163326553970641
320.8031135085395840.3937729829208320.196886491460416
330.7590393768953890.4819212462092220.240960623104611
340.7286910718496080.5426178563007830.271308928150392
350.7213769451524270.5572461096951460.278623054847573
360.7198323164941010.5603353670117980.280167683505899
370.6935478961783770.6129042076432460.306452103821623
380.6452524397324750.709495120535050.354747560267525
390.5968964568718790.8062070862562430.403103543128121
400.5536627193147780.8926745613704440.446337280685222
410.5138071823535110.9723856352929780.486192817646489
420.7908096310402280.4183807379195430.209190368959772
430.9575481789638050.08490364207239070.0424518210361953
440.9610054888882020.07798902222359580.0389945111117979
450.948781088740270.1024378225194590.0512189112597295
460.955660657867870.08867868426425970.0443393421321299
470.9552245153391780.0895509693216450.0447754846608225
480.9452516322537930.1094967354924140.0547483677462069
490.9427397396916950.114520520616610.057260260308305
500.9316304234485710.1367391531028580.068369576551429
510.9235814689922570.1528370620154860.0764185310077431
520.9881598475417860.02368030491642820.0118401524582141
530.9846222344529020.03075553109419700.0153777655470985
540.9876017303194760.02479653936104850.0123982696805243
550.9921896529579870.01562069408402690.00781034704201347
560.9896348987410580.02073020251788490.0103651012589424
570.9859361410521050.02812771789579030.0140638589478951
580.9842134220869230.03157315582615480.0157865779130774
590.9892847733593410.02143045328131740.0107152266406587
600.9884596493009830.02308070139803370.0115403506990168
610.9883191446167540.02336171076649280.0116808553832464
620.9887439274879760.02251214502404840.0112560725120242
630.9873524917003880.02529501659922420.0126475082996121
640.989822895124790.02035420975041950.0101771048752097
650.9886495271764450.02270094564710960.0113504728235548
660.9879518045146280.02409639097074380.0120481954853719
670.9883478927985830.02330421440283440.0116521072014172
680.990574911589240.01885017682151920.00942508841075962
690.9900789493311990.01984210133760250.00992105066880124
700.9869745531686440.02605089366271250.0130254468313562
710.9873788704735060.02524225905298820.0126211295264941
720.9831882897789630.03362342044207480.0168117102210374
730.98007770065040.03984459869919860.0199222993495993
740.9860153341751650.02796933164967070.0139846658248354
750.9815516481873150.03689670362537070.0184483518126854
760.9784707077825160.04305858443496830.0215292922174841
770.9719950173170360.05600996536592750.0280049826829638
780.9633421745961010.07331565080779850.0366578254038992
790.9761693473976830.04766130520463320.0238306526023166
800.9743585991756780.05128280164864330.0256414008243217
810.9774080009230240.04518399815395250.0225919990769763
820.9771642896836990.0456714206326030.0228357103163015
830.9697342846648830.06053143067023330.0302657153351166
840.9626228150805280.07475436983894480.0373771849194724
850.9879650254467460.02406994910650810.0120349745532540
860.983786048791810.032427902416380.01621395120819
870.9782640535604810.04347189287903780.0217359464395189
880.9719500995470730.05609980090585360.0280499004529268
890.9669478428138830.06610431437223350.0330521571861167
900.9574459635708760.08510807285824720.0425540364291236
910.9503476572705780.09930468545884440.0496523427294222
920.9692205841614410.06155883167711710.0307794158385585
930.9606494664071380.07870106718572320.0393505335928616
940.9566776399742890.08664472005142280.0433223600257114
950.9465688480127750.1068623039744510.0534311519872253
960.9352303554882080.1295392890235850.0647696445117925
970.9279499091593940.1441001816812130.0720500908406064
980.9105084665982970.1789830668034070.0894915334017033
990.9003599976074060.1992800047851870.0996400023925936
1000.8808113267370120.2383773465259770.119188673262988
1010.8549988827912850.2900022344174290.145001117208715
1020.8347835645990550.330432870801890.165216435400945
1030.8365794191650060.3268411616699870.163420580834994
1040.8889876678322380.2220246643355230.111012332167762
1050.886192320307170.2276153593856580.113807679692829
1060.8595331036058050.2809337927883900.140466896394195
1070.8325014232972840.3349971534054310.167498576702715
1080.824718882415220.3505622351695620.175281117584781
1090.8169834303579430.3660331392841130.183016569642057
1100.8370562682068560.3258874635862870.162943731793144
1110.826141327456820.3477173450863590.173858672543179
1120.8834128902021030.2331742195957940.116587109797897
1130.8545885416733370.2908229166533260.145411458326663
1140.8310827584707820.3378344830584360.168917241529218
1150.796939253680710.406121492638580.20306074631929
1160.7854261921374450.4291476157251090.214573807862555
1170.7868210977770570.4263578044458850.213178902222943
1180.7898540323373840.4202919353252320.210145967662616
1190.7485818672777720.5028362654444550.251418132722228
1200.7939435068637470.4121129862725070.206056493136253
1210.754339191950160.4913216160996810.245660808049840
1220.71970700262170.5605859947565980.280292997378299
1230.7173725452581420.5652549094837160.282627454741858
1240.6773157905095250.6453684189809510.322684209490475
1250.6601114978508250.6797770042983510.339888502149175
1260.6414794305415310.7170411389169370.358520569458469
1270.5775341883056950.844931623388610.422465811694305
1280.5463987431385030.9072025137229940.453601256861497
1290.5488826448340610.9022347103318770.451117355165939
1300.5637784200328040.8724431599343930.436221579967196
1310.5052317859481850.989536428103630.494768214051815
1320.4604197437356380.9208394874712760.539580256264362
1330.4448596174385330.8897192348770660.555140382561467
1340.3723994550882290.7447989101764590.62760054491177
1350.3196238039361120.6392476078722240.680376196063888
1360.3016831267821120.6033662535642230.698316873217888
1370.2345382900343890.4690765800687780.765461709965611
1380.3218849580678440.6437699161356870.678115041932156
1390.7053278970489770.5893442059020470.294672102951023
1400.6616925817549830.6766148364900350.338307418245017
1410.5946868672859130.8106262654281750.405313132714087
1420.4931566723027130.9863133446054270.506843327697287
1430.423069683224760.846139366449520.57693031677524
1440.2971134936674150.594226987334830.702886506332585
1450.5276348464315870.9447303071368270.472365153568413


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level310.229629629629630NOK
10% type I error level470.348148148148148NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/10b71m1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/10b71m1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/1ff3v1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/1ff3v1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/2ff3v1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/2ff3v1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/3ff3v1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/3ff3v1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/47o2g1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/47o2g1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/57o2g1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/57o2g1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/67o2g1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/67o2g1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/7ix111290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/7ix111290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/8b71m1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/8b71m1290545513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/9b71m1290545513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545502az8zgx85nnzv49c/9b71m1290545513.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